Re: [Lse-tech] Re: [PATCH]updated ipc lock patch

From: Manfred Spraul (manfred@colorfullife.com)
Date: Fri Oct 25 2002 - 15:23:43 EST


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

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); } /*

- 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/



This archive was generated by hypermail 2b29 : Thu Oct 31 2002 - 22:00:28 EST