Re: [PATCH v2] overlay/026: Fix test expectation for newer kernels

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



On Mon, Dec 4, 2023 at 6:58 PM Zorro Lang <zlang@xxxxxxxxxx> wrote:
>
> On Wed, Nov 22, 2023 at 05:20:13PM +0200, Amir Goldstein wrote:
> > From: Alexander Larsson <alexl@xxxxxxxxxx>
> >
> > The test checks the expectaion from old kernels that set/get of
> > trusted.overlay.* xattrs is not supported on an overlayfs filesystem.
> >
> > New kernels support set/get xattr of trusted.overlay.* xattrs, so adapt
> > the test to check that either both set and get work on new kernel, or
> > neither work on old kernel.
> >
> > Signed-off-by: Alexander Larsson <alexl@xxxxxxxxxx>
> > Signed-off-by: Amir Goldstein <amir73il@xxxxxxxxx>
> > ---
> >
> > Zorro,
> >
> > Per your request on v1 [1], I've added a helper to check escaped overlay
> > xattrs support.
> >
> > The helper was taken from the patch that adds test overlay/084 [2], and
> > re-factored, but other than that, overlay/084 itself is unchanged, so
> > I am not re-posting it nor any of the other patches in the overlay tests
> > for v6.7-rc1.
> >
> > Let me know if this works for you.
>
>
>
>
> >
> > Thanks,
> > Amir.
> >
> > [1] https://lore.kernel.org/fstests/20231116075250.ntopaswush4sn2qf@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/
> > [2] https://lore.kernel.org/fstests/20231114064857.1666718-2-amir73il@xxxxxxxxx/
> >
> >  common/overlay        | 19 +++++++++++++++++++
> >  tests/overlay/026     | 42 +++++++++++++++++++++++++++++-------------
> >  tests/overlay/026.out |  2 --
> >  3 files changed, 48 insertions(+), 15 deletions(-)
> >
> > diff --git a/common/overlay b/common/overlay
> > index 7004187f..8f275228 100644
> > --- a/common/overlay
> > +++ b/common/overlay
> > @@ -201,6 +201,25 @@ _require_scratch_overlay_features()
> >       _scratch_unmount
> >  }
> >
> > +_check_scratch_overlay_xattr_escapes()
> > +{
> > +     local testfile=$1
> > +
> > +     touch $testfile
> > +     ! ($GETFATTR_PROG -n trusted.overlay.foo $testfile 2>&1 | grep -E -q "not (permitted|supported)")
> > +}
> > +
> > +_require_scratch_overlay_xattr_escapes()
> > +{
> > +     _scratch_mkfs > /dev/null 2>&1
> > +     _scratch_mount
> > +
> > +        _check_scratch_overlay_xattr_escapes $SCRATCH_MNT/file || \
> > +                  _notrun "xattr escaping is not supported by overlay"
> > +
> > +     _scratch_unmount
> > +}
> > +
>
> Hi Amir,
>
> Sorry for this late review, got a little busy on other things recently.
> Won't this patch be conflict with another patchset which you/Alex have sent:
>   https://lore.kernel.org/fstests/20231114064857.1666718-2-amir73il@xxxxxxxxx/
>
> So you'll rebase that patchset on this, right?

I rebased and pushed to this branch:
https://github.com/amir73il/xfstests/commits/overlayfs-devel

If you want I can re-post the entire series, but really, the only change is
the common/overlay chunk in the first patch which should be ignored.
The version of _require_scratch_overlay_xattr_escapes() in this patch
is newer.

If you remove the overlay/common chunk from the overlay/084 patch,
it will apply cleanly.

Thanks,
Amir.





[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux