public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [Bug Fix]semctl01 and shmctl01 will hang during uClinux test
@ 2010-07-02  5:41 Bob Liu
  2010-07-03 17:44 ` Subrata Modak
  0 siblings, 1 reply; 2+ messages in thread
From: Bob Liu @ 2010-07-02  5:41 UTC (permalink / raw)
  To: Ltp-list

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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [LTP] [Bug Fix]semctl01 and shmctl01 will hang during uClinux test
  2010-07-02  5:41 [LTP] [Bug Fix]semctl01 and shmctl01 will hang during uClinux test Bob Liu
@ 2010-07-03 17:44 ` Subrata Modak
  0 siblings, 0 replies; 2+ messages in thread
From: Subrata Modak @ 2010-07-03 17:44 UTC (permalink / raw)
  To: Bob Liu; +Cc: Ltp-list

Ok. Thanks.

Regards--
Subrata

On Fri, 2010-07-02 at 13:41 +0800, Bob Liu wrote:
> 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 */
> 


------------------------------------------------------------------------------
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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-07-03 17:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-02  5:41 [LTP] [Bug Fix]semctl01 and shmctl01 will hang during uClinux test Bob Liu
2010-07-03 17:44 ` Subrata Modak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox