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.
Index: testcases/kernel/syscalls/ipc/semctl/semctl01.c
===================================================================
--- testcases/kernel/syscalls/ipc/semctl/semctl01.c
+++ testcases/kernel/syscalls/ipc/semctl/semctl01.c
@@ -400,7 +400,11 @@
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;
Index: testcases/kernel/syscalls/ipc/shmctl/shmctl01.c
===================================================================
--- testcases/kernel/syscalls/ipc/shmctl/shmctl01.c
+++ testcases/kernel/syscalls/ipc/shmctl/shmctl01.c
@@ -324,8 +324,11 @@
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 */
--
Regards,
--Bob
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list