Please ignore the last patch. I attached an earlier incomplete version).
Here is an updated patch which has the necessary  ltp_signal.h include
file for the SIGSETSIZE definition.

Henry Yei <[email protected]>





On Fri, Aug 27, 2010 at 7:31 PM, Henry Yei <[email protected]> wrote:
> The signalfd4 tests have a hardcoded value of 8 instead of using SIGSETSIZE.
>
> Signed-off-by: Henry Yei <[email protected]>
>
> Henry Yei <[email protected]>
>
diff -Nurp -r ltp-dev/testcases/kernel/syscalls/signalfd4/signalfd4_01.c ltp-dev-wdir/testcases/kernel/syscalls/signalfd4/signalfd4_01.c
--- ltp-dev/testcases/kernel/syscalls/signalfd4/signalfd4_01.c	2010-04-30 14:57:17.000000000 -0700
+++ ltp-dev-wdir/testcases/kernel/syscalls/signalfd4/signalfd4_01.c	2010-08-27 19:46:02.908442114 -0700
@@ -65,6 +65,7 @@
 #include "test.h"
 #include "usctest.h"
 #include "linux_syscall_numbers.h"
+#include "ltp_signal.h"
 
 #ifndef O_CLOEXEC
 # define O_CLOEXEC 02000000
@@ -161,7 +162,7 @@ int main(int argc, char *argv[])
 		for (testno = 0; testno < TST_TOTAL; ++testno) {
 			sigemptyset(&ss);
 			sigaddset(&ss, SIGUSR1);
-			fd = syscall(__NR_signalfd4, -1, &ss, 8, 0);
+			fd = syscall(__NR_signalfd4, -1, &ss, SIGSETSIZE, 0);
 			if (fd == -1) {
 				tst_resm(TFAIL, "signalfd4(0) failed");
 				cleanup();
@@ -180,7 +181,7 @@ int main(int argc, char *argv[])
 			}
 			close(fd);
 
-			fd = syscall(__NR_signalfd4, -1, &ss, 8, SFD_CLOEXEC);
+			fd = syscall(__NR_signalfd4, -1, &ss, SIGSETSIZE, SFD_CLOEXEC);
 			if (fd == -1) {
 				tst_resm(TFAIL,
 					 "signalfd4(SFD_CLOEXEC) failed");
diff -Nurp -r ltp-dev/testcases/kernel/syscalls/signalfd4/signalfd4_02.c ltp-dev-wdir/testcases/kernel/syscalls/signalfd4/signalfd4_02.c
--- ltp-dev/testcases/kernel/syscalls/signalfd4/signalfd4_02.c	2010-04-30 14:57:17.000000000 -0700
+++ ltp-dev-wdir/testcases/kernel/syscalls/signalfd4/signalfd4_02.c	2010-08-27 19:46:09.332442968 -0700
@@ -61,6 +61,7 @@
 #include "test.h"
 #include "usctest.h"
 #include "linux_syscall_numbers.h"
+#include "ltp_signal.h"
 
 #define SFD_NONBLOCK O_NONBLOCK
 
@@ -153,7 +154,7 @@ int main(int argc, char *argv[])
 		for (testno = 0; testno < TST_TOTAL; ++testno) {
 			sigemptyset(&ss);
 			sigaddset(&ss, SIGUSR1);
-			fd = syscall(__NR_signalfd4, -1, &ss, 8, 0);
+			fd = syscall(__NR_signalfd4, -1, &ss, SIGSETSIZE, 0);
 			if (fd == -1) {
 				tst_resm(TFAIL, "signalfd4(0) failed");
 				cleanup();
@@ -172,7 +173,7 @@ int main(int argc, char *argv[])
 			}
 			close(fd);
 
-			fd = syscall(__NR_signalfd4, -1, &ss, 8, SFD_NONBLOCK);
+			fd = syscall(__NR_signalfd4, -1, &ss, SIGSETSIZE, SFD_NONBLOCK);
 			if (fd == -1) {
 				tst_resm(TFAIL,
 					 "signalfd4(SFD_NONBLOCK) failed");
------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to