Re: [PATCH v2 1/4] overlay: Add tests for nesting private xattrs

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

 



On Sun, Dec 10, 2023 at 05:28:34PM +0200, Amir Goldstein wrote:
> On Sun, Dec 10, 2023 at 3:35 PM Zorro Lang <zlang@xxxxxxxxxx> wrote:
> >
> > On Mon, Dec 04, 2023 at 08:58:56PM +0200, Amir Goldstein wrote:
> > > If overlayfs xattr escaping is supported, ensure:
> > >  * We can create "overlay.*" xattrs on a file in the overlayfs
> > >  * We can create an xwhiteout file in the overlayfs
> > >
> > > We check for nesting support by trying to getattr an "overlay.*" xattr
> > > in an overlayfs mount, which will return ENOSUPP in older kernels.
> > >
> > > Signed-off-by: Alexander Larsson <alexl@xxxxxxxxxx>
> > > Signed-off-by: Amir Goldstein <amir73il@xxxxxxxxx>
> > > ---
> >
> > Hi Amir,
> >
> > This test passed with below kernel configuration at first:
> >   CONFIG_OVERLAY_FS=m
> >   # CONFIG_OVERLAY_FS_REDIRECT_DIR is not set
> >   CONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW=y
> >   # CONFIG_OVERLAY_FS_INDEX is not set
> >   # CONFIG_OVERLAY_FS_XINO_AUTO is not set
> >   # CONFIG_OVERLAY_FS_METACOPY is not set
> >
> > But then I found it fails if I enabled below configurations:
> >   CONFIG_OVERLAY_FS_REDIRECT_DIR=y
> >   CONFIG_OVERLAY_FS_INDEX=y
> >   CONFIG_OVERLAY_FS_XINO_AUTO=y
> >   CONFIG_OVERLAY_FS_METACOPY=y
> >
> > Without these configures, this test passed. But with them, it fails as [1].
> > The underlying fs is xfs (with default mkfs options), there're not specific
> > MOUNT_OPTIONS and MKFS_OPTIONS to use.
> >
> > I'll delay merging this patchset temporarily, please check.
> >
> 
> good spotting!
> 
> Here is a fix if you want to fix and test it in your tree:
> 
> diff --git a/tests/overlay/084 b/tests/overlay/084
> index ff451f38..8465caeb 100755
> --- a/tests/overlay/084
> +++ b/tests/overlay/084
> @@ -50,9 +50,10 @@ test_escape()
> 
>         echo -e "\n== Check xattr escape $prefix =="
> 
> -       local extra_options=""
> +       # index feature would require nfs_export on $nesteddir mount
> +       local extra_options="-o index=off"
>         if [ "$prefix" == "user" ]; then
> -            extra_options="-o userxattr"
> +            extra_options+=",userxattr"
>         fi
> 
>         _scratch_mkfs
> @@ -146,9 +147,10 @@ test_escaped_xwhiteout()
> 
>         echo -e "\n== Check escaped xwhiteout $prefix =="
> 
> -       local extra_options=""
> +       # index feature would require nfs_export on $nesteddir mount
> +       local extra_options="-o index=off"
>         if [ "$prefix" == "user" ]; then
> -            extra_options="-o userxattr"
> +            extra_options+=",userxattr"

It works, so it's about the CONFIG_OVERLAY_FS_INDEX=y. I've releated fstests
v2023.12.10 version, this patchset will be in next release. Will send a new
version with this change?

Thanks,
Zorro

>         fi
> 
>         _scratch_mkfs
> 
> 
> Thanks,
> Amir.
> 





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

  Powered by Linux