From: Subrata <ris...@li...> - 2010-07-03 17:52:16
|
The branch, master, has been updated via 9e365e8e209904086b18420438b4792851c219b8 (commit) from 65f7070cb3f67eba009e68413187727f508623e1 (commit) - Log ----------------------------------------------------------------- commit 9e365e8e209904086b18420438b4792851c219b8 Author: Subrata Modak <sub...@su...> Date: Sat Jul 3 23:13:41 2010 +0530 semctl01 and shmctl01 will hang during uClinux test: ltp test case shmctl01 and semctl01 can not execute. When press ctrl and c, it can not exist. -- root:/> shmctl01 ^Cshmctl01 0 INFO : received unexpected signal 2 ^Cshmctl01 0 INFO : received unexpected signal 2 -- The reason is the child will unlink the pipe if pipename isn't NULLï¼which may make the parent waitting forever. Signed-off-by: Bob Liu <ll...@gm...>. ----------------------------------------------------------------------- Summary of changes: testcases/kernel/syscalls/ipc/semctl/semctl01.c | 4 ++++ testcases/kernel/syscalls/ipc/shmctl/shmctl01.c | 5 ++++- 2 files changed, 8 insertions(+), 1 deletions(-) diff --git a/testcases/kernel/syscalls/ipc/semctl/semctl01.c b/testcases/kernel/syscalls/ipc/semctl/semctl01.c index 7357ded..2bbc3db 100644 --- a/testcases/kernel/syscalls/ipc/semctl/semctl01.c +++ b/testcases/kernel/syscalls/ipc/semctl/semctl01.c @@ -383,7 +383,11 @@ void child_cnt() if (sync_pipe_notify(sync_pipes) == -1) tst_brkm(TBROK, cleanup, "sync_pipe_notify failed"); +#ifdef UCLINUX + if (sync_pipe_close(sync_pipes, NULL) == -1) +#else if (sync_pipe_close(sync_pipes, PIPE_NAME) == -1) +#endif tst_brkm(TBROK, cleanup, "sync_pipe_close failed"); sops.sem_num = SEM4; diff --git a/testcases/kernel/syscalls/ipc/shmctl/shmctl01.c b/testcases/kernel/syscalls/ipc/shmctl/shmctl01.c index a734e1e..3d1507a 100644 --- a/testcases/kernel/syscalls/ipc/shmctl/shmctl01.c +++ b/testcases/kernel/syscalls/ipc/shmctl/shmctl01.c @@ -321,8 +321,11 @@ void do_child() if (sync_pipe_notify(sync_pipes) == -1) tst_brkm(TBROK, cleanup, "sync_pipe_notify failed"); - +#ifdef UCLINUX + if (sync_pipe_close(sync_pipes, NULL) == -1) +#else if (sync_pipe_close(sync_pipes, PIPE_NAME) == -1) +#endif tst_brkm(TBROK, cleanup, "sync_pipe_close failed"); /* do an assignement for fun */ hooks/post-receive -- ltp |