linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oliver Sang <oliver.sang@intel.com>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: "Christian Göttsche" <cgzones@googlemail.com>,
	oe-lkp@lists.linux.dev, lkp@intel.com,
	linux-fsdevel@vger.kernel.org, "Arnd Bergmann" <arnd@arndb.de>,
	"Christian Brauner" <brauner@kernel.org>,
	linux-alpha@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-m68k@lists.linux-m68k.org, linux-kernel@vger.kernel.org,
	linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org,
	linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org,
	linux-sh@vger.kernel.org, sparclinux@vger.kernel.org,
	audit@vger.kernel.org, linux-api@vger.kernel.org,
	linux-arch@vger.kernel.org, oliver.sang@intel.com
Subject: Re: [viro-vfs:work.xattr2] [fs/xattr]  64d47e878a: xfstests.xfs.046.fail
Date: Wed, 9 Oct 2024 22:31:26 +0800	[thread overview]
Message-ID: <ZwaTvubyvE0cAj6P@xsang-OptiPlex-9020> (raw)
In-Reply-To: <20241006145904.GE4017910@ZenIV>

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);
>  	}

      reply	other threads:[~2024-10-09 14:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

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=ZwaTvubyvE0cAj6P@xsang-OptiPlex-9020 \
    --to=oliver.sang@intel.com \
    --cc=arnd@arndb.de \
    --cc=audit@vger.kernel.org \
    --cc=brauner@kernel.org \
    --cc=cgzones@googlemail.com \
    --cc=linux-alpha@vger.kernel.org \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@lists.linux-m68k.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=lkp@intel.com \
    --cc=oe-lkp@lists.linux.dev \
    --cc=sparclinux@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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;
as well as URLs for NNTP newsgroup(s).