Skip to contentSkip to conversation

capset01 patch

LTP Veerendra C 2 participants 4 messages Jan 7, 2010 – Jan 13, 2010

lore
Share & tools
lore
#0 lore raw

Hi
Here is a patch/attachment to fix the error number and error message , when the capset() syscall fails.

*After applying patch:*
capset01 1 TBROK capget() failed: errno=???(38): Function not implemented

*Before applying patch:*
capset01 1 TBROK capget() failed: TEST_ERRNO=???(0): Success

Note: This is in the custom built linux kernel where the capset/capget syscall is not implemented. In normal linux kernel this testcase would just work fine without any errors. *
Normal kernel:*
capset01 1 TPASS : capset() returned 0

Regards
Veerendra C

kernel/syscalls/capset/capset01.c renamed from kernel/syscalls/capset.orig/capset01.c +4 -0
@@ -89,6 +89,7 @@ static void cleanup();
 char *TCID = "capset01";	/* Test program identifier.    */
 int TST_TOTAL = 1;		/* Total number of test cases. */
 extern int Tst_count;		/* Test Case counter for tst_* routines */
+static int exp_enos[] = { EFAULT, EINVAL, EPERM, 0 };
 
 static struct __user_cap_header_struct header;	/* cap_user_header_t is a pointer
 						   to __user_cap_header_struct */
@@ -143,6 +144,9 @@ void setup()
 	/* capture signals */
 	tst_sig(NOFORK, DEF_HANDLER, cleanup);
 
+        /* Set up the expected error numbers for -e option */
+        TEST_EXP_ENOS(exp_enos);
+
 	/* Pause if that option was specified */
 	TEST_PAUSE;
 

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev

_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#1 lore raw

Can you please Sign-Off this match with your Signature ?

Regards--
Subrata

Quoted 47 lines · Veerendra C

Hi
Here is a patch/attachment to fix the error number and error message ,
when the capset() syscall fails.

*After applying patch:*
capset01 1 TBROK capget() failed: errno=???(38): Function not
implemented

*Before applying patch:*
capset01 1 TBROK capget() failed: TEST_ERRNO=???(0): Success

Note: This is in the custom built linux kernel where the capset/capget syscall is not implemented. In normal linux kernel this testcase would just work fine without any errors.
*
Normal kernel:*
capset01 1 TPASS : capset() returned 0

Regards
Veerendra C

plain text document attachment (capset01.patch)

kernel/syscalls/capset/capset01.c renamed from kernel/syscalls/capset.orig/capset01.c +4 -1
@@ -89,6 +89,7 @@ static void cleanup();
 char *TCID = "capset01";	/* Test program identifier.    */
 int TST_TOTAL = 1;		/* Total number of test cases. */
 extern int Tst_count;		/* Test Case counter for tst_* routines */
+static int exp_enos[] = { EFAULT, EINVAL, EPERM, 0 };
 
 static struct __user_cap_header_struct header;	/* cap_user_header_t is a pointer
 						   to __user_cap_header_struct */
@@ -143,6 +144,9 @@ void setup()
 	/* capture signals */
 	tst_sig(NOFORK, DEF_HANDLER, cleanup);
 
+        /* Set up the expected error numbers for -e option */
+        TEST_EXP_ENOS(exp_enos);
+
 	/* Pause if that option was specified */
 	TEST_PAUSE;
 
 
------------------------------------------------------------------------------
Quoted 6 lines

This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#2 lore raw

Hi Subrata

Including my signature as requested

Thanks
Veerendra C

Quoted 53 lines · Subrata Modak

Can you please Sign-Off this match with your Signature ?

Regards--
Subrata

Quoted 46 lines · Veerendra C

Hi
Here is a patch/attachment to fix the error number and error message ,
when the capset() syscall fails.

*After applying patch:*
capset01 1 TBROK capget() failed: errno=???(38): Function not
implemented

*Before applying patch:*
capset01 1 TBROK capget() failed: TEST_ERRNO=???(0): Success

Note: This is in the custom built linux kernel where the capset/capget syscall is not implemented. In normal linux kernel this testcase would just work fine without any errors.
*
Normal kernel:*
capset01 1 TPASS : capset() returned 0

Regards
Veerendra C

plain text document attachment (capset01.patch)

kernel/syscalls/capset/capset01.c renamed from kernel/syscalls/capset.orig/capset01.c +4 -0
@@ -89,6 +89,7 @@ static void cleanup();
 char *TCID = "capset01";	/* Test program identifier.    */
 int TST_TOTAL = 1;		/* Total number of test cases. */
 extern int Tst_count;		/* Test Case counter for tst_* routines */
+static int exp_enos[] = { EFAULT, EINVAL, EPERM, 0 };
 
 static struct __user_cap_header_struct header;	/* cap_user_header_t is a pointer
 						   to __user_cap_header_struct */
@@ -143,6 +144,9 @@ void setup()
 	/* capture signals */
 	tst_sig(NOFORK, DEF_HANDLER, cleanup);
 
+        /* Set up the expected error numbers for -e option */
+        TEST_EXP_ENOS(exp_enos);
+
 	/* Pause if that option was specified */
 	TEST_PAUSE;
 
Quoted 10 lines
Quoted 8 lines

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#3 lore raw
Quoted 5 lines · Veerendra C

Hi Subrata

Including my signature as requested

Thanks Veerendra.

Regards--
Subrata

Quoted 71 lines

Thanks
Veerendra C

Quoted 63 lines · Subrata Modak

Can you please Sign-Off this match with your Signature ?

Regards--
Subrata

Quoted 54 lines · Veerendra C

Hi
Here is a patch/attachment to fix the error number and error message ,
when the capset() syscall fails.

*After applying patch:*
capset01 1 TBROK capget() failed: errno=???(38): Function not
implemented

*Before applying patch:*
capset01 1 TBROK capget() failed: TEST_ERRNO=???(0): Success

Note: This is in the custom built linux kernel where the capset/capget syscall is not implemented. In normal linux kernel this testcase would just work fine without any errors.
*
Normal kernel:*
capset01 1 TPASS : capset() returned 0

Regards
Veerendra C

plain text document attachment (capset01.patch)

kernel/syscalls/capset/capset01.c renamed from kernel/syscalls/capset.orig/capset01.c +4 -1
@@ -89,6 +89,7 @@ static void cleanup();
 char *TCID = "capset01";	/* Test program identifier.    */
 int TST_TOTAL = 1;		/* Total number of test cases. */
 extern int Tst_count;		/* Test Case counter for tst_* routines */
+static int exp_enos[] = { EFAULT, EINVAL, EPERM, 0 };
 
 static struct __user_cap_header_struct header;	/* cap_user_header_t is a pointer
 						   to __user_cap_header_struct */
@@ -143,6 +144,9 @@ void setup()
 	/* capture signals */
 	tst_sig(NOFORK, DEF_HANDLER, cleanup);
 
+        /* Set up the expected error numbers for -e option */
+        TEST_EXP_ENOS(exp_enos);
+
 	/* Pause if that option was specified */
 	TEST_PAUSE;
 
 
------------------------------------------------------------------------------

This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list