io_submit test failed in latest kernel
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi, Orson,
Quoted 36 lines · Orson Zhai
Hi Jeff,
Quoted 6 lines · Jeff Moyer
Quoted 4 lines · Orson Zhai
Hi Guys,
We got some test failed when running ltp(linux test project) on the latest kernel (v4.13-next).
Quoted 8 lines
Quoted 3 lines
It is only observed at x86 platform but nothing wrong for arm test.
Does anyone here have any comments on this?
What version of ltp are you using? I don't see output like "expected one of ..." in the latest github tree. Can you please just send the test code you are using? Also, why are you using a linux-next tree from August? Can you try to reproduce this on the released 4.13?
Here is my latest test info:
root@harryfengpc:/home/zhai/ltp-full-20170516# uname -a Linux harryfengpc 4.13.0 #3 SMP Thu Sep 14 14:21:05 CST 2017 x86_64 GNU/Linux ^^^^^^ root@harryfengpc:/home/zhai/ltp-full-20170516# ./testcases/kernel/syscalls/io_submit/io_submit01 ^^^^^^^^ io_submit01 1 TPASS : expected failure - returned value = -22 : Invalid argument io_submit01 2 TPASS : expected failure - returned value = -22 : Invalid argument io_submit01 3 TFAIL : io_submit01.c:138: unexpected failure - returned value = -95 : Operation not supported, expected one of -EINVAL, -EBADF, -EFAULT io_submit01 4 TPASS : expected failure - returned value = -14 : Bad address io_submit01 5 TPASS : expected failure - returned value = -22 : Invalid argument io_submit01 6 TPASS : expected failure - returned value = -9 : Bad file descriptor io_submit01 7 TPASS : expected success - returned value = 0 io_submit01 8 TPASS : expected success - returned value = 1
Quoted 1 line
I use 4.13 final release and download ltp src code of stable release from official website.
Thanks. Basically, the test feeds in a garbage iocb, and expects one of the three errnos listed. This change:
commit b745fafaf70c0a98a2e1e7ac8cb14542889ceb0e
Author: Goldwyn Rodrigues <[email protected]> Date: Tue Jun 20 07:05:43 2017 -0500
fs: Introduce RWF_NOWAIT and FMODE_AIO_NOWAIT
...
fs/aio.c +6 -0
@@ -1592,6 +1592,12 @@ static int io_submit_one(struct kioctx *ctx, struct iocb __user *user_iocb, goto out_put_req; } +if ((req->common.ki_flags &IOCB_NOWAIT ) && + !(req->common.ki_flags &IOCB_DIRECT )) { + ret = -EOPNOTSUPP ; + goto out_put_req; + } +
could result in a 4th errno. The test should be updated.
Cheers,
Jeff
Hi Jeff,
But all test itmes will pass on ARM64 test with hikey board (one kind of A53 SoC from Huawei).
Regards,
Orson
--------
Good patches are always welcome!
________________________________________
From: Jeff Moyer <[email protected]>
Sent: Friday, September 22, 2017 20:42
To: Orson Zhai (翟京)
Cc: [email protected]; [email protected]; [email protected]
Subject: Re: io_submit test failed in latest kernel
Hi, Orson,
Quoted 36 lines · Orson Zhai
Hi Jeff,
Quoted 6 lines · Jeff Moyer
Quoted 4 lines · Orson Zhai
Hi Guys,
We got some test failed when running ltp(linux test project) on the latest kernel (v4.13-next).
Quoted 8 lines
Quoted 3 lines
It is only observed at x86 platform but nothing wrong for arm test.
Does anyone here have any comments on this?
What version of ltp are you using? I don't see output like "expected one of ..." in the latest github tree. Can you please just send the test code you are using? Also, why are you using a linux-next tree from August? Can you try to reproduce this on the released 4.13?
Here is my latest test info:
root@harryfengpc:/home/zhai/ltp-full-20170516# uname -a Linux harryfengpc 4.13.0 #3 SMP Thu Sep 14 14:21:05 CST 2017 x86_64 GNU/Linux ^^^^^^ root@harryfengpc:/home/zhai/ltp-full-20170516# ./testcases/kernel/syscalls/io_submit/io_submit01 ^^^^^^^^ io_submit01 1 TPASS : expected failure - returned value = -22 : Invalid argument io_submit01 2 TPASS : expected failure - returned value = -22 : Invalid argument io_submit01 3 TFAIL : io_submit01.c:138: unexpected failure - returned value = -95 : Operation not supported, expected one of -EINVAL, -EBADF, -EFAULT io_submit01 4 TPASS : expected failure - returned value = -14 : Bad address io_submit01 5 TPASS : expected failure - returned value = -22 : Invalid argument io_submit01 6 TPASS : expected failure - returned value = -9 : Bad file descriptor io_submit01 7 TPASS : expected success - returned value = 0 io_submit01 8 TPASS : expected success - returned value = 1
Quoted 1 line
I use 4.13 final release and download ltp src code of stable release from official website.
Thanks. Basically, the test feeds in a garbage iocb, and expects one of the three errnos listed. This change:
commit b745fafaf70c0a98a2e1e7ac8cb14542889ceb0e
Author: Goldwyn Rodrigues <[email protected]> Date: Tue Jun 20 07:05:43 2017 -0500
fs: Introduce RWF_NOWAIT and FMODE_AIO_NOWAIT
...
fs/aio.c +6 -0
@@ -1592,6 +1592,12 @@ static int io_submit_one(struct kioctx *ctx, struct iocb __user *user_iocb, goto out_put_req; } +if ((req->common.ki_flags &IOCB_NOWAIT ) && + !(req->common.ki_flags &IOCB_DIRECT )) { + ret = -EOPNOTSUPP ; + goto out_put_req; + } +
could result in a 4th errno. The test should be updated.
Cheers,
Jeff
Quoted 3 lines · Orson Zhai (翟京)
Hi Jeff,
But all test itmes will pass on ARM64 test with hikey board (one kind of A53 SoC from Huawei).
You're feeding in stack contents as the iocb. The test case was removed from the latest LTP. I don't think we need to worry about this.
Cheers,
Jeff
----- Original Message -----
Quoted 5 lines
Quoted 2 lines
I use 4.13 final release and download ltp src code of stable release from official website.
Thanks. Basically, the test feeds in a garbage iocb, and expects one of the three errnos listed.
Patch [1] removed testing of uninitialized iocb and will be in next LTP release. If you can please retry with latest git. Works for me on 4.14.0-rc1+.
[1] Drop uninitialized iocb test since that
one invokes undefined behavior and may
fail with pretty much any error
https://github.com/linux-test-project/ltp/commit/89d1e69d5953eac71b121b8ec5ee31d769e17ee2#diff-1d2b3d5644576fc779af7d4ee419ea8d
Regards,
Jan