Hi,
io_submit case always failed on ppc64.
----------
[EMAIL PROTECTED] cvs_ltp]# uname -a
Linux ovislp1.upt.austin.ibm.com 2.6.18-92.el5 #1 SMP Tue Apr 29
13:21:29 EDT
2008 ppc64 ppc64 ppc64 GNU/Linux
[EMAIL PROTECTED] cvs_ltp]# rpm -qa | grep libaio
libaio-0.3.106-3.2
libaio-0.3.106-3.2
libaio-devel-0.3.106-3.2
libaio-devel-0.3.106-3.2
[EMAIL PROTECTED] cvs_ltp]# testcases/kernel/syscalls/io_submit/io_submit01
io_submit01 1 PASS : expected failure - returned value = 22 :
Invalid argument
io_submit01 2 FAIL : unexpected returned value - -22 - expected
-14
io_submit01 3 PASS : expected failure - returned value = 9 : Bad
file descriptor
There could be an issue with the test case here. What is done is "
io_submit(ctx, 0, (void*)-1 ) ".So in compat_sys_io_submit(), we
allocate memory on the user space stack using compat_alloc_user_space.
We then copy from the address specified in the syscall to the address
allocated via the compat_alloc_user_space call. Now, if the size field
is zero, no copy takes place. This valid address (stack pointer or
an address close to it) is then used in sys_io_submit and we dont see
the EFAULT. In order to see this fault, we would have to set nr>0 and
copy_iocb() catches the invalid address specified in the system call.
Retrying the test with nr>0 results in an EFAULT.
Signed-off-by: Sridhar Vinay <[EMAIL PROTECTED]>
Signed-off-by: Jin Bing Guo <[EMAIL PROTECTED]>
------
Thanks,
--Jin Bing Guo
--- cvs_ltp.orig/testcases/kernel/syscalls/io_submit/io_submit01.c 2008-07-21 06:55:35.000000000 -0400
+++ cvs_ltp/testcases/kernel/syscalls/io_submit/io_submit01.c 2008-10-13 22:47:21.000000000 -0400
@@ -128,7 +128,7 @@ main(int argc, char** argv)
EFAULT One of the data structures points to invalid data.
*/
expected_return = -EFAULT;
- TEST(io_submit( ctx, 0, (void*)-1 ));
+ TEST(io_submit( ctx, 1, (void*)-1 ));
if (TEST_RETURN == 0) {
tst_resm(TFAIL, "call succeeded unexpectedly");
} else if (TEST_RETURN == expected_return) {
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list