All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] io_submit test failed in latest kernel
       [not found]   ` <20170922093616.GB27514@spreadtrum.com>
@ 2017-09-22 12:42     ` Jeff Moyer
  2017-09-25  6:23       ` Orson Zhai =?unknown-8bit?b?57+f5Lqs?=
  2017-09-25 10:37       ` Jan Stancek
  0 siblings, 2 replies; 4+ messages in thread
From: Jeff Moyer @ 2017-09-22 12:42 UTC (permalink / raw)
  To: ltp

Hi, Orson,

Orson Zhai <orson.zhai@spreadtrum.com> writes:

> Hi Jeff,
>
> On Fri, Sep 15, 2017 at 08:01:14AM -0400, Jeff Moyer wrote:
>> Orson Zhai <orson.zhai@spreadtrum.com> writes:
>> 
>> > Hi Guys,
>> >
>> > We got some test failed when running ltp(linux test project) on the latest kernel (v4.13-next).
>> >
>> > 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
>
>
>
> 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 <rgoldwyn@suse.com>
Date:   Tue Jun 20 07:05:43 2017 -0500

    fs: Introduce RWF_NOWAIT and FMODE_AIO_NOWAIT

...

diff --git a/fs/aio.c b/fs/aio.c
index 020fa00..34027b6 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [LTP] io_submit test failed in latest kernel
  2017-09-22 12:42     ` [LTP] io_submit test failed in latest kernel Jeff Moyer
@ 2017-09-25  6:23       ` Orson Zhai =?unknown-8bit?b?57+f5Lqs?=
  2017-09-26 13:36         ` Jeff Moyer
  2017-09-25 10:37       ` Jan Stancek
  1 sibling, 1 reply; 4+ messages in thread
From: Orson Zhai =?unknown-8bit?b?57+f5Lqs?= @ 2017-09-25  6:23 UTC (permalink / raw)
  To: ltp

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 <jmoyer@redhat.com>
Sent: Friday, September 22, 2017 20:42
To: Orson Zhai (翟京)
Cc: linux-aio@kvack.org; sumit.semwal@linaro.org; ltp@lists.linux.it
Subject: Re: io_submit test failed in latest kernel

Hi, Orson,

Orson Zhai <orson.zhai@spreadtrum.com> writes:

> Hi Jeff,
>
> On Fri, Sep 15, 2017 at 08:01:14AM -0400, Jeff Moyer wrote:
>> Orson Zhai <orson.zhai@spreadtrum.com> writes:
>>
>> > Hi Guys,
>> >
>> > We got some test failed when running ltp(linux test project) on the latest kernel (v4.13-next).
>> >
>> > 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
>
>
>
> 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 <rgoldwyn@suse.com>
Date:   Tue Jun 20 07:05:43 2017 -0500

    fs: Introduce RWF_NOWAIT and FMODE_AIO_NOWAIT

...

diff --git a/fs/aio.c b/fs/aio.c
index 020fa00..34027b6 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [LTP] io_submit test failed in latest kernel
  2017-09-22 12:42     ` [LTP] io_submit test failed in latest kernel Jeff Moyer
  2017-09-25  6:23       ` Orson Zhai =?unknown-8bit?b?57+f5Lqs?=
@ 2017-09-25 10:37       ` Jan Stancek
  1 sibling, 0 replies; 4+ messages in thread
From: Jan Stancek @ 2017-09-25 10:37 UTC (permalink / raw)
  To: ltp



----- Original Message -----
> > 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [LTP] io_submit test failed in latest kernel
  2017-09-25  6:23       ` Orson Zhai =?unknown-8bit?b?57+f5Lqs?=
@ 2017-09-26 13:36         ` Jeff Moyer
  0 siblings, 0 replies; 4+ messages in thread
From: Jeff Moyer @ 2017-09-26 13:36 UTC (permalink / raw)
  To: ltp

"Orson Zhai (翟京)" <Orson.Zhai@spreadtrum.com> writes:

> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-09-26 13:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20170915043644.GA27514@spreadtrum.com>
     [not found] ` <x49mv5w9nn9.fsf@segfault.boston.devel.redhat.com>
     [not found]   ` <20170922093616.GB27514@spreadtrum.com>
2017-09-22 12:42     ` [LTP] io_submit test failed in latest kernel Jeff Moyer
2017-09-25  6:23       ` Orson Zhai =?unknown-8bit?b?57+f5Lqs?=
2017-09-26 13:36         ` Jeff Moyer
2017-09-25 10:37       ` Jan Stancek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.