[LTP] [PATCH] syscalls/copy_file_range02.c: Compatible with new and old kernels

Amir Goldstein amir73il@gmail.com
Thu Jun 27 10:39:44 CEST 2019


On Thu, Jun 27, 2019 at 11:03 AM Yang Xu <xuyang2018.jy@cn.fujitsu.com> wrote:
>
> on 2019/05/31 21:02, Amir Goldstein wrote:
>
> > On Fri, May 31, 2019 at 3:03 PM Li Wang<liwang@redhat.com>  wrote:
> >>
> >>
> >> On Fri, May 31, 2019 at 6:15 PM Xiao Yang<yangx.jy@cn.fujitsu.com>  wrote:
> >>> On 2019/05/31 16:44, Jinhui huang wrote:
> >>>> On new kernels, copy_file_range() returned EISDIR when copyed contents
> >>>> to directory, but on old kernels, it returned EBADF, we should accept
> >>>> EBADF to be compatible with new and old kernels.
> >>>>
> >>>> The patch as follows:
> >>>> commit 11cbfb10775a ("vfs: deny copy_file_range() for non regular files")
> >>> Hi,
> >>>
> >>>  From description of commit, I wonder if we can add more tests for some
> >>> non regular files(e.g. block, pipe)?
> >>
> >> I have no objection on this. But, is there really make sense to test some more non regular files which not being mentioned by Linux Manual Page?
> >>
> > FYI, more changes to copy_file_range checks are in the works:
> > https://lore.kernel.org/linux-fsdevel/20190526061100.21761-1-amir73il@gmail.com/T/#me34d4363449118bd3b2ec8421d282a77e9a7d2d1
>
> Hi Amir
>
>      Meet again.  We can increase ltp copy_file_range02 coverage include( swapfile ->ETXTBUSY,  immutable file->EPERM) as same as xfstests generic/553[4].
> Also the two other checks(overlaping and offset wrap).  I am glad to do it.

That would be great!

>
> PS: Why we don't have test for overlaping and offset wrap check on xfstests? Or, I miss it?

The bounds check test was posted to xfstests:
https://marc.info/?l=linux-xfs&m=155947929219690&w=2

But because the test requires a new feature from xfs_io:
https://marc.info/?l=linux-xfs&m=156152984109774&w=2

I recommended that xfstests maintainer will hold off merging the test,
before the
required change is at least in xfsprogs for-next branch.

Thanks,
Amir.


More information about the ltp mailing list