linux-m68k.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [viro-vfs:work.xattr2] [fs/xattr]  64d47e878a: xfstests.xfs.046.fail
@ 2024-10-06 14:20 kernel test robot
  2024-10-06 14:59 ` Al Viro
  0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2024-10-06 14:20 UTC (permalink / raw)
  To: Christian Göttsche
  Cc: oe-lkp, lkp, linux-fsdevel, Al Viro, Arnd Bergmann,
	Christian Brauner, linux-alpha, linux-arm-kernel, linux-m68k,
	linux-kernel, linux-mips, linux-parisc, linuxppc-dev, linux-s390,
	linux-sh, sparclinux, audit, linux-api, linux-arch, oliver.sang



Hello,

kernel test robot noticed "xfstests.xfs.046.fail" on:

commit: 64d47e878a8196f374879bfdd0ea754ba77682d1 ("fs/xattr: add *at family syscalls")
https://git.kernel.org/cgit/linux/kernel/git/viro/vfs.git work.xattr2

in testcase: xfstests
version: xfstests-x86_64-f71228e3-1_20240930
with following parameters:

	disk: 4HDD
	fs: xfs
	test: xfs-046



compiler: gcc-12
test machine: 4 threads Intel(R) Xeon(R) CPU E3-1225 v5 @ 3.30GHz (Skylake) with 16G memory

(please refer to attached dmesg/kmsg for entire log/backtrace)




If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <oliver.sang@intel.com>
| Closes: https://lore.kernel.org/oe-lkp/202410062250.ee92fca7-oliver.sang@intel.com

2024-10-06 05:31:34 export TEST_DIR=/fs/sda1
2024-10-06 05:31:34 export TEST_DEV=/dev/sda1
2024-10-06 05:31:34 export FSTYP=xfs
2024-10-06 05:31:34 export SCRATCH_MNT=/fs/scratch
2024-10-06 05:31:34 mkdir /fs/scratch -p
2024-10-06 05:31:34 export SCRATCH_DEV=/dev/sda4
2024-10-06 05:31:34 export SCRATCH_LOGDEV=/dev/sda2
2024-10-06 05:31:34 export SCRATCH_XFS_LIST_METADATA_FIELDS=u3.sfdir3.hdr.parent.i4
2024-10-06 05:31:34 export SCRATCH_XFS_LIST_FUZZ_VERBS=random
2024-10-06 05:31:34 echo xfs/046
2024-10-06 05:31:34 ./check xfs/046
FSTYP         -- xfs (debug)
PLATFORM      -- Linux/x86_64 lkp-skl-d06 6.12.0-rc1-00009-g64d47e878a81 #1 SMP PREEMPT_DYNAMIC Sun Oct  6 12:37:17 CST 2024
MKFS_OPTIONS  -- -f /dev/sda4
MOUNT_OPTIONS -- /dev/sda4 /fs/scratch

xfs/046       - output mismatch (see /lkp/benchmarks/xfstests/results//xfs/046.out.bad)
    --- tests/xfs/046.out	2024-09-30 21:13:44.000000000 +0000
    +++ /lkp/benchmarks/xfstests/results//xfs/046.out.bad	2024-10-06 05:31:50.379495110 +0000
    @@ -34,4 +34,8 @@
     xfsrestore: restore complete: SECS seconds elapsed
     xfsrestore: Restore Status: SUCCESS
     Comparing listing of dump directory with restore directory
    +ls: /fs/scratch/dumpdir/sub/a-link: No such file or directory
    +ls: /fs/scratch/dumpdir/sub/b-link: No such file or directory
    +ls: /fs/scratch/restoredir/dumpdir/sub/a-link: No such file or directory
    +ls: /fs/scratch/restoredir/dumpdir/sub/b-link: No such file or directory
    ...
    (Run 'diff -u /lkp/benchmarks/xfstests/tests/xfs/046.out /lkp/benchmarks/xfstests/results//xfs/046.out.bad'  to see the entire diff)
Ran: xfs/046
Failures: xfs/046
Failed 1 of 1 tests




The kernel config and materials to reproduce are available at:
https://download.01.org/0day-ci/archive/20241006/202410062250.ee92fca7-oliver.sang@intel.com



-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki


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

* Re: [viro-vfs:work.xattr2] [fs/xattr]  64d47e878a: xfstests.xfs.046.fail
  2024-10-06 14:20 [viro-vfs:work.xattr2] [fs/xattr] 64d47e878a: xfstests.xfs.046.fail kernel test robot
@ 2024-10-06 14:59 ` Al Viro
  2024-10-09 14:31   ` Oliver Sang
  0 siblings, 1 reply; 3+ messages in thread
From: Al Viro @ 2024-10-06 14:59 UTC (permalink / raw)
  To: kernel test robot
  Cc: Christian Göttsche, oe-lkp, lkp, linux-fsdevel,
	Arnd Bergmann, Christian Brauner, linux-alpha, linux-arm-kernel,
	linux-m68k, linux-kernel, linux-mips, linux-parisc, linuxppc-dev,
	linux-s390, linux-sh, sparclinux, audit, linux-api, linux-arch

On Sun, Oct 06, 2024 at 10:20:57PM +0800, kernel test robot wrote:

> xfs/046       - output mismatch (see /lkp/benchmarks/xfstests/results//xfs/046.out.bad)
>     --- tests/xfs/046.out	2024-09-30 21:13:44.000000000 +0000
>     +++ /lkp/benchmarks/xfstests/results//xfs/046.out.bad	2024-10-06 05:31:50.379495110 +0000
>     @@ -34,4 +34,8 @@
>      xfsrestore: restore complete: SECS seconds elapsed
>      xfsrestore: Restore Status: SUCCESS
>      Comparing listing of dump directory with restore directory
>     +ls: /fs/scratch/dumpdir/sub/a-link: No such file or directory
>     +ls: /fs/scratch/dumpdir/sub/b-link: No such file or directory
>     +ls: /fs/scratch/restoredir/dumpdir/sub/a-link: No such file or directory
>     +ls: /fs/scratch/restoredir/dumpdir/sub/b-link: No such file or directory
>     ...
>     (Run 'diff -u /lkp/benchmarks/xfstests/tests/xfs/046.out /lkp/benchmarks/xfstests/results//xfs/046.out.bad'  to see the entire diff)
> Ran: xfs/046
> Failures: xfs/046
> Failed 1 of 1 tests

*stares*

D'oh...  Inverted sense for AT_SYMLINK_NOFOLLOW => LOOKUP_FLAGS...

Try this:

diff --git a/fs/xattr.c b/fs/xattr.c
index 0b506b6565b7..b96cca3f4bf8 100644
--- a/fs/xattr.c
+++ b/fs/xattr.c
@@ -721,7 +721,7 @@ static int path_setxattrat(int dfd, const char __user *pathname,
 	if ((at_flags & ~(AT_SYMLINK_NOFOLLOW | AT_EMPTY_PATH)) != 0)
 		return -EINVAL;
 
-	if (at_flags & AT_SYMLINK_NOFOLLOW)
+	if (!(at_flags & AT_SYMLINK_NOFOLLOW))
 		lookup_flags = LOOKUP_FOLLOW;
 
 	error = setxattr_copy(name, &ctx);
@@ -880,7 +880,7 @@ static ssize_t path_getxattrat(int dfd, const char __user *pathname,
 		return file_getxattr(fd_file(f), &ctx);
 	} else {
 		int lookup_flags = 0;
-		if (at_flags & AT_SYMLINK_NOFOLLOW)
+		if (!(at_flags & AT_SYMLINK_NOFOLLOW))
 			lookup_flags = LOOKUP_FOLLOW;
 		return filename_getxattr(dfd, filename, lookup_flags, &ctx);
 	}

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

* Re: [viro-vfs:work.xattr2] [fs/xattr]  64d47e878a: xfstests.xfs.046.fail
  2024-10-06 14:59 ` Al Viro
@ 2024-10-09 14:31   ` Oliver Sang
  0 siblings, 0 replies; 3+ messages in thread
From: Oliver Sang @ 2024-10-09 14:31 UTC (permalink / raw)
  To: Al Viro
  Cc: Christian Göttsche, oe-lkp, lkp, linux-fsdevel,
	Arnd Bergmann, Christian Brauner, linux-alpha, linux-arm-kernel,
	linux-m68k, linux-kernel, linux-mips, linux-parisc, linuxppc-dev,
	linux-s390, linux-sh, sparclinux, audit, linux-api, linux-arch,
	oliver.sang

hi, Al Viro,

On Sun, Oct 06, 2024 at 03:59:04PM +0100, Al Viro wrote:
> On Sun, Oct 06, 2024 at 10:20:57PM +0800, kernel test robot wrote:
> 
> > xfs/046       - output mismatch (see /lkp/benchmarks/xfstests/results//xfs/046.out.bad)
> >     --- tests/xfs/046.out	2024-09-30 21:13:44.000000000 +0000
> >     +++ /lkp/benchmarks/xfstests/results//xfs/046.out.bad	2024-10-06 05:31:50.379495110 +0000
> >     @@ -34,4 +34,8 @@
> >      xfsrestore: restore complete: SECS seconds elapsed
> >      xfsrestore: Restore Status: SUCCESS
> >      Comparing listing of dump directory with restore directory
> >     +ls: /fs/scratch/dumpdir/sub/a-link: No such file or directory
> >     +ls: /fs/scratch/dumpdir/sub/b-link: No such file or directory
> >     +ls: /fs/scratch/restoredir/dumpdir/sub/a-link: No such file or directory
> >     +ls: /fs/scratch/restoredir/dumpdir/sub/b-link: No such file or directory
> >     ...
> >     (Run 'diff -u /lkp/benchmarks/xfstests/tests/xfs/046.out /lkp/benchmarks/xfstests/results//xfs/046.out.bad'  to see the entire diff)
> > Ran: xfs/046
> > Failures: xfs/046
> > Failed 1 of 1 tests
> 
> *stares*
> 
> D'oh...  Inverted sense for AT_SYMLINK_NOFOLLOW => LOOKUP_FLAGS...
> 
> Try this:

we confirm below patch can fix the issue

Tested-by: kernel test robot <oliver.sang@intel.com>

=========================================================================================
compiler/disk/fs/kconfig/rootfs/tbox_group/test/testcase:
  gcc-12/4HDD/xfs/x86_64-rhel-8.3-func/debian-12-x86_64-20240206.cgz/lkp-skl-d06/xfs-046/xfstests

commit:
  4b7d06e4b7a1c ("new helpers: file_removexattr(), filename_removexattr()")
  64d47e878a819 ("fs/xattr: add *at family syscalls")
  6f4ccbcfda377  <--- your patch

4b7d06e4b7a1c647 64d47e878a8196f374879bfdd0e 6f4ccbcfda377af1167d1b7fd48
---------------- --------------------------- ---------------------------
       fail:runs  %reproduction    fail:runs  %reproduction    fail:runs
           |             |             |             |             |
           :6          100%           6:6            0%            :10    xfstests.xfs.046.fail


> 
> diff --git a/fs/xattr.c b/fs/xattr.c
> index 0b506b6565b7..b96cca3f4bf8 100644
> --- a/fs/xattr.c
> +++ b/fs/xattr.c
> @@ -721,7 +721,7 @@ static int path_setxattrat(int dfd, const char __user *pathname,
>  	if ((at_flags & ~(AT_SYMLINK_NOFOLLOW | AT_EMPTY_PATH)) != 0)
>  		return -EINVAL;
>  
> -	if (at_flags & AT_SYMLINK_NOFOLLOW)
> +	if (!(at_flags & AT_SYMLINK_NOFOLLOW))
>  		lookup_flags = LOOKUP_FOLLOW;
>  
>  	error = setxattr_copy(name, &ctx);
> @@ -880,7 +880,7 @@ static ssize_t path_getxattrat(int dfd, const char __user *pathname,
>  		return file_getxattr(fd_file(f), &ctx);
>  	} else {
>  		int lookup_flags = 0;
> -		if (at_flags & AT_SYMLINK_NOFOLLOW)
> +		if (!(at_flags & AT_SYMLINK_NOFOLLOW))
>  			lookup_flags = LOOKUP_FOLLOW;
>  		return filename_getxattr(dfd, filename, lookup_flags, &ctx);
>  	}

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

end of thread, other threads:[~2024-10-09 14:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-06 14:20 [viro-vfs:work.xattr2] [fs/xattr] 64d47e878a: xfstests.xfs.046.fail kernel test robot
2024-10-06 14:59 ` Al Viro
2024-10-09 14:31   ` Oliver Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).