Skip to contentSkip to conversation

Change syscall numbers to symbolic constants in rt_sigprocmask01

PATCH In review Jiri Palecek 2 participants 2 messages Jun 8, 2009 – Jun 9, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Change syscall numbers to symbolic constants in rt_sigprocmask01

Hello,

this patch changes the syscall numbers in rt_sigprocmask01 test to symbolic constants, to make it functional on other architectures than i386.

Regards
Jiri Palecek

---
 .../syscalls/rt_sigprocmask/rt_sigprocmask01.c     |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
testcases/kernel/syscalls/rt_sigprocmask/rt_sigprocmask01.c +4 -4
index c3251ab..6398a28 100644
@@ -163,14 +163,14 @@ int main(int ac, char **av) {
 			
 			/* call rt_sigaction() */
 			act.sa_handler = sig_handler;
-                        TEST(syscall(174, 33, &act, &oact, 8));
+                        TEST(syscall(__NR_rt_sigaction, 33, &act, &oact, 8));
 			if(TEST_RETURN != 0){
 				tst_resm(TFAIL,"Call to rt_sigaction() Failed, errno=%d : %s",TEST_ERRNO, strerror(TEST_ERRNO));
                         	cleanup();
 				tst_exit();
 			}
 			/* call rt_sigprocmask() to block signal#33 */
-                        TEST(syscall(175, SIG_BLOCK, &set, &oset, 8));
+                        TEST(syscall(__NR_rt_sigprocmask, SIG_BLOCK, &set, &oset, 8));
 			if(TEST_RETURN == -1){
 				tst_resm(TFAIL,"Call to rt_sigprocmask()**** Failed, errno=%d : %s",TEST_ERRNO, strerror(TEST_ERRNO));
                         	cleanup();
@@ -192,7 +192,7 @@ int main(int ac, char **av) {
 				}
 				else {
 					/* call rt_sigpending() */
-					TEST(syscall(176, &oset, 8));
+					TEST(syscall(__NR_rt_sigpending, &oset, 8));
 					if(TEST_RETURN == -1){
 						tst_resm(TFAIL,"call rt_sigpending() failed, errno=%d : %s",TEST_ERRNO, strerror(TEST_ERRNO));
                         			cleanup();
@@ -205,7 +205,7 @@ int main(int ac, char **av) {
 						tst_exit();
 					}
 					/* call rt_sigprocmask() to unblock signal#33 */
-					TEST(syscall(175, SIG_UNBLOCK, &set, &oset, 8));
+					TEST(syscall(__NR_rt_sigprocmask, SIG_UNBLOCK, &set, &oset, 8));
 					if(TEST_RETURN == -1){
 						tst_resm(TFAIL,"Call to rt_sigprocmask() Failed, errno=%d : %s",TEST_ERRNO, strerror(TEST_ERRNO));
                         			cleanup();
Signature · 13 lines
1.6.2.4


------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#1 lore raw
Quoted 8 lines · Jiri Palecek

Hello,

this patch changes the syscall numbers in rt_sigprocmask01 test to symbolic constants, to make it functional on other architectures than i386.

Regards
Jiri Palecek

Thanks.

Regards--
Subrata

Quoted 36 lines
---
 .../syscalls/rt_sigprocmask/rt_sigprocmask01.c     |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
testcases/kernel/syscalls/rt_sigprocmask/rt_sigprocmask01.c +3 -3
index c3251ab..6398a28 100644
@@ -163,14 +163,14 @@ int main(int ac, char **av) {
 
 			/* call rt_sigaction() */
 			act.sa_handler = sig_handler;
-                        TEST(syscall(174, 33, &act, &oact, 8));
+                        TEST(syscall(__NR_rt_sigaction, 33, &act, &oact, 8));
 			if(TEST_RETURN != 0){
 				tst_resm(TFAIL,"Call to rt_sigaction() Failed, errno=%d : %s",TEST_ERRNO, strerror(TEST_ERRNO));
                         	cleanup();
 				tst_exit();
 			}
 			/* call rt_sigprocmask() to block signal#33 */
-                        TEST(syscall(175, SIG_BLOCK, &set, &oset, 8));
+                        TEST(syscall(__NR_rt_sigprocmask, SIG_BLOCK, &set, &oset, 8));
 			if(TEST_RETURN == -1){
 				tst_resm(TFAIL,"Call to rt_sigprocmask()**** Failed, errno=%d : %s",TEST_ERRNO, strerror(TEST_ERRNO));
                         	cleanup();
@@ -192,7 +192,7 @@ int main(int ac, char **av) {
 				}
 				else {
 					/* call rt_sigpending() */
-					TEST(syscall(176, &oset, 8));
+					TEST(syscall(__NR_rt_sigpending, &oset, 8));
 					if(TEST_RETURN == -1){
 						tst_resm(TFAIL,"call rt_sigpending() failed, errno=%d : %s",TEST_ERRNO, strerror(TEST_ERRNO));
                         			cleanup();

testcases/kernel/syscalls/rt_sigprocmask/rt_sigprocmask01.c int main(int ac, char **av) { · line 211

Quoted 8 lines
testcases/kernel/syscalls/rt_sigprocmask/rt_sigprocmask01.c +1 -1
@@ -205,7 +205,7 @@ int main(int ac, char **av) {
 						tst_exit();
 					}
 					/* call rt_sigprocmask() to unblock signal#33 */
-					TEST(syscall(175, SIG_UNBLOCK, &set, &oset, 8));
+					TEST(syscall(__NR_rt_sigprocmask, SIG_UNBLOCK, &set, &oset, 8));
 					if(TEST_RETURN == -1){
 						tst_resm(TFAIL,"Call to rt_sigprocmask() Failed, errno=%d : %s",TEST_ERRNO, strerror(TEST_ERRNO));
                         			cleanup();

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list