Skip to contentSkip to conversation

rt_sigqueueinfo01: Fix test failed on mips.

PATCH In review Yi Zhao 2 participants 2 messages Sep 1, 2011

lore
Share & tools
lore

Yi Zhao

author
#0 lore raw

PATCH 1/1 rt_sigqueueinfo01: Fix test failed on mips.

rt_sigqueueinfo01 case test failed on mips arch:

	rt_sigqueueinfo01    1  TFAIL  :  Test Failed
	rt_sigqueueinfo01    2  TFAIL  :  Test Failed

We are sending signal 17 that could be SIGUSR2, SIGCHILD or SIGSTOP and depends on hardware platform. On x86, arm, and powerpc, this number is defined to SIGCHILD. So in this case I think it should be SIGCHILD. However, on mips this number is defined to SIGUSR2 and SIGCHILD is defined as 18.
This made the test case failed. I think that symbolic name rather than number should be used.

And this patch also add a a missing brace.

---
 .../syscalls/rt_sigqueueinfo/rt_sigqueueinfo01.c   |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
testcases/kernel/syscalls/rt_sigqueueinfo/rt_sigqueueinfo01.c +4 -3
index da3c403..61b1991 100644
@@ -85,18 +85,19 @@ int main(int ac, char **av) {
 		else if (TEST_RETURN == 0) {
 			uinfo.si_errno = 0;
 			uinfo.si_code = SI_QUEUE;
-			TEST(syscall(__NR_rt_sigqueueinfo, getpid(), 17,
+			TEST(syscall(__NR_rt_sigqueueinfo, getpid(), SIGCHLD,
 			    &uinfo));
 			if (TEST_RETURN != 0)
 				err(1, "rt_sigqueueinfo");
 			exit(0);
-		} else
+		} else {
 			wait(&status);
 			if (WIFEXITED(status) && WEXITSTATUS(status) == 0)
 				tst_resm(TPASS, "Test Succeeded");
 			else
 				tst_resm(TFAIL, "Test Failed");
+		}
 		cleanup();
 	}
 	tst_exit();
-}
\ No newline at end of file
+}
Signature · 13 lines
1.7.1


------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#1 lore raw

Hi!
Thanks, commited.

Signature · 13 lines
Cyril Hrubis
[email protected]

------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list