mingming cao wrote:
>Here is what I saw:
>
>[root@elm3b83 shmctl]# ./shmctl01
>shmctl01 1 PASS : pid, size, # of attaches and mode are correct -
>pass #1
>shmctl01 0 INFO : shmdt() failed - 22
>shmctl01 0 INFO : shmdt() failed - 22
>shmctl01 0 INFO : shmdt() failed - 22
>shmctl01 0 INFO : shmdt() failed - 22
>
These failures are caused by a bug in the ltp test. See the attached patch.
>shmctl01 2 PASS : pid, size, # of attaches and mode are correct -
>pass #2
>shmctl01 0 INFO : shmdt() failed - 22
>shmctl01 0 INFO : shmdt() failed - 22
>shmctl01 0 INFO : shmdt() failed - 22
>shmctl01 0 INFO : shmdt() failed - 22
>shmctl01 3 FAIL : # of attaches is incorrect - 0
>
This one is odd. The testcase contains races, but they can only increase
# of attaches.
Could you strace shmctl01?
The testcase with shmat(), then fork() fails.
--
Manfred
--------------080304000809090204080808
Content-Type: text/plain;
name="patch-ltp"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="patch-ltp"
diff -u ltp-orig/testcases/kernel/syscalls/ipc/shmctl/shmctl01.c ltp-20021008/testcases/kernel/syscalls/ipc/shmctl/shmctl01.c
--- ltp-orig/testcases/kernel/syscalls/ipc/shmctl/shmctl01.c Tue May 21 15:55:56 2002
+++ ltp-20021008/testcases/kernel/syscalls/ipc/shmctl/shmctl01.c Fri Oct 25 22:14:23 2002
@@ -252,10 +252,12 @@
if (stat_time == FIRST) {
test = set_shmat();
+ } else {
+ test = set_shared;
}
/* do an assignement for fun */
- (int *)test = i;
+ *(int *)test = i;
/* pause until we get a signal from stat_cleanup() */
rval = pause();
@@ -273,7 +275,7 @@
}
}
/* sleep briefly to ensure correct execution order */
- usleep(25000);
+ usleep(250000);
}
/*
--------------080304000809090204080808--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/