testcases: syscall: sockioctl: fix except return val
PATCH 1/1 testcases: syscall: sockioctl: fix except return val
Since new kerenl change, sockioctl01 always fail like this:
sockioctl01 4 TFAIL : ATMARK on UDP ; returned -1 (expected -1), errno
25 (expected 22)
This patch fix the except return val from EINVAL to ENOTTY.
--- sockioctl01.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
testcases/kernel/syscalls/sockioctl/sockioctl01.c +1 -1
@@ -108,7 +108,7 @@ struct test_case_t { /* test case structure */ {PF_INET ,SOCK_DGRAM ,0 ,SIOCATMARK , &optval, (struct sockaddr *)&fsin1,sizeof (fsin1),-1 , - EINVAL, setup1, cleanup1, "ATMARK on UDP"} + ENOTTY, setup1, cleanup1, "ATMARK on UDP"} , {PF_INET ,SOCK_DGRAM ,0 ,SIOCGIFCONF , &ifc, (struct sockaddr *)&fsin1, sizeof(fsin1), 0,
Signature · 14 lines
1.6.3.3 ------------------------------------------------------------------------------ Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 27 lines · Bob Liu
Since new kerenl change, sockioctl01 always fail like this:
sockioctl01 4 TFAIL : ATMARK on UDP ; returned -1 (expected -1), errno
25 (expected 22)This patch fix the except return val from EINVAL to ENOTTY.
Signed-off-by Bob Liu <[email protected]>---
sockioctl01.c| 2 +-1 files changed, 1 insertions(+), 1 deletions(-)testcases/kernel/syscalls/sockioctl/sockioctl01.c +1
-1@@ -108,7 +108,7 @@ struct test_case_t { /* test case structure */ {PF_INET ,SOCK_DGRAM ,0 ,SIOCATMARK , &optval, (struct sockaddr *)&fsin1,sizeof (fsin1),-1 , - EINVAL, setup1, cleanup1, "ATMARK on UDP"} + ENOTTY, setup1, cleanup1, "ATMARK on UDP"} , {PF_INET ,SOCK_DGRAM ,0 ,SIOCGIFCONF , &ifc, (struct sockaddr *)&fsin1, sizeof(fsin1), 0,Signature · 1 line
1.6.3.3
This will fix the later kernel, but break earlier ones. Could you please submit a patch that does a check for the kernel version, a data structure, etc and adjusts the expected values accordingly?
Thanks!
-Garrett
------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 31 lines · Garrett Cooper
On May 12, 2011, at 2:59 AM, Bob Liu wrote:
Since new kerenl change, sockioctl01 always fail like this:
sockioctl01 4 TFAIL : ATMARK on UDP ; returned -1 (expected -1), errno 25 (expected 22)
This patch fix the except return val from EINVAL to ENOTTY.
Signed-off-by Bob Liu <[email protected]>---
sockioctl01.c| 2 +-1 files changed, 1 insertions(+), 1 deletions(-)testcases/kernel/syscalls/sockioctl/sockioctl01.c +1
-2@@ -108,7 +108,7 @@ struct test_case_t { /* test case structure */ {PF_INET ,SOCK_DGRAM ,0 ,SIOCATMARK , &optval, (struct sockaddr *)&fsin1, sizeof(fsin1), -1, - EINVAL, setup1, cleanup1, "ATMARK on UDP"} + ENOTTY, setup1, cleanup1, "ATMARK on UDP"} , {PF_INET ,SOCK_DGRAM ,0 ,SIOCGIFCONF , &ifc, (struct sockaddr *)&fsin1, sizeof(fsin1), 0, --1.6.3.3
Quoted 3 lines
This will fix the later kernel, but break earlier ones. Could you please submit a patch that does a check for the kernel version, a data structure, etc and adjusts the expected values accordingly?
Whether using tst_kvercmp() can be accepted ?
Thanks
Signature · 13 lines
Regards, --Bob ------------------------------------------------------------------------------ Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
Hi!
Quoted 1 line
Whether using
tst_kvercmp()can be accepted ?
Sure. Ideally please add pointer to kernel commit that caused this change in the test souce as a comment.
Signature · 13 lines
Cyril Hrubis [email protected] ------------------------------------------------------------------------------ Simplify data backup and recovery for your virtual environment with vRanger. Installation's a snap, and flexible recovery options mean your data is safe, secure and there when you need it. Data protection magic? Nope - It's vRanger. Get your free trial download today. http://p.sf.net/sfu/quest-sfdev2dev _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
Hi!
Quoted 10 lines
Quoted 5 lines
Quoted 1 line
Whether using
tst_kvercmp()can be accepted ?Sure. Ideally please add pointer to kernel commit that caused this change in the test souce as a comment.
Sorry for that,
tst_kvercmp()can't be used since it's in struct define. Maybe a macro is needed, but I don't know which one to use.Any ideas?
Initalize this field of the structure in test init function depending on the kernel version.
Signature · 13 lines
Cyril Hrubis [email protected] ------------------------------------------------------------------------------ All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2d-c2 _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list