public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Eryu Guan <guaneryu@gmail.com>
Cc: Hou Tao <houtao1@huawei.com>, fstests@vger.kernel.org
Subject: Re: [PATCH 5/5] fsx: check ENOSYS in test_copy_range()
Date: Sat, 29 Dec 2018 10:56:12 -0800	[thread overview]
Message-ID: <20181229185612.GB20474@magnolia> (raw)
In-Reply-To: <20181229081619.GH21777@desktop>

On Sat, Dec 29, 2018 at 04:16:19PM +0800, Eryu Guan wrote:
> On Sat, Dec 29, 2018 at 10:34:52AM +0800, Hou Tao wrote:
> > In configure script, we only check whether or not the build
> > of copy-range test program is successful, but that doesn't
> > mean the kernel has implemented the syscall, so checking
> > for this case.
> > 
> > Signed-off-by: Hou Tao <houtao1@huawei.com>
> > ---
> >  ltp/fsx.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/ltp/fsx.c b/ltp/fsx.c
> > index 316f08eb..b84180f7 100644
> > --- a/ltp/fsx.c
> > +++ b/ltp/fsx.c
> > @@ -1583,7 +1583,7 @@ test_copy_range(void)
> >  	loff_t o1 = 0, o2 = 0;
> >  
> >  	if (syscall(__NR_copy_file_range, fd, &o1, fd, &o2, 0, 0) == -1 &&
> > -	    (errno == EOPNOTSUPP || errno == ENOTTY)) {
> > +	    (errno == ENOSYS || errno == EOPNOTSUPP || errno == ENOTTY)) {
> 
> Should we also check for ENOSYS in other operations like
> {clone,dedupe}_range

Unimplemented ioctls usually return EOPNOTSUPP or ENOTTY, not ENOSYS, so
I don't think that's necessary.... unless there are kernels that don't
implement the ioctl syscall?

In any case, the manpage for clone and dedupe don't say anything about
returning ENOSYS.

> and fallocate?

Yes.

--D

> Other fixes look good to me, thanks a lot for the fixes!
> 
> Thanks,
> Eryu
> 
> >  		if (!quiet)
> >  			fprintf(stderr,
> >  				"main: filesystem does not support "
> > -- 
> > 2.16.2.dirty
> > 

  reply	other threads:[~2018-12-29 18:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-29  2:34 [PATCH 0/5] tiny fixes for xfstests Hou Tao
2018-12-29  2:34 ` [PATCH 1/5] check: use _try_scratch_mount instead of _scratch_mount to mount SCRATCH_DEV Hou Tao
2018-12-29  2:34 ` [PATCH 2/5] generic/019: check scratch device is a block device or not Hou Tao
2018-12-29  2:34 ` [PATCH 3/5] generic/131: wait until the server is ready Hou Tao
2018-12-29  8:14   ` Eryu Guan
2019-01-04  8:56     ` Hou Tao
2018-12-29  2:34 ` [PATCH 4/5] generic/466: explicitly request $SCRATCH_DEV to be a block device Hou Tao
2018-12-29  2:34 ` [PATCH 5/5] fsx: check ENOSYS in test_copy_range() Hou Tao
2018-12-29  8:16   ` Eryu Guan
2018-12-29 18:56     ` Darrick J. Wong [this message]
2019-01-04  8:57       ` Hou Tao
2018-12-29 18:53   ` Darrick J. Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181229185612.GB20474@magnolia \
    --to=darrick.wong@oracle.com \
    --cc=fstests@vger.kernel.org \
    --cc=guaneryu@gmail.com \
    --cc=houtao1@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox