All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eryu Guan <eguan@redhat.com>
To: David Howells <dhowells@redhat.com>
Cc: linux-xfs@vger.kernel.org, hch@infradead.org, amir73il@gmail.com,
	david@fromorbit.com, fstests@vger.kernel.org,
	linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 4/4] xfstests: Check the stx_attributes settable by chattr [ver #12]
Date: Mon, 10 Apr 2017 16:01:27 +0800	[thread overview]
Message-ID: <20170410080127.GD22845@eguan.usersys.redhat.com> (raw)
In-Reply-To: <149168617693.10019.12322515006388694205.stgit@warthog.procyon.org.uk>

On Sat, Apr 08, 2017 at 10:16:16PM +0100, David Howells wrote:
> diff --git a/src/statx.h b/src/statx.h
> index 711d1ba..f361a68 100644
> --- a/src/statx.h
> +++ b/src/statx.h
> @@ -19,7 +19,7 @@
>  #define __NR_statx 383
>  #elif defined (__ILP32__)
>  #define __NR_statx (__X32_SYSCALL_BIT + 332)
> -#else
> +#elif defined(__x86_64__)
>  #define __NR_statx 332
>  #endif

Seems like this only enables statx(2) test on specific arches, even if
current arch has wired up statx syscall.

For example, I noticed as for 4.11-rc6 kernel, many platforms have
enabled statx syscall:

eguan@eguan:~/workspace/src/kernel$ git lo | grep -i "wire up statx"
1493aa6 xtensa: wire up statx system call
fdfe4a3 generic syscalls: Wire up statx syscall
e3b1ebd m68k: Wire up statx
f717629 powerpc: Wire up statx() syscall
63d32d1 parisc: Wire up statx system call
a1016e9 ARM: wire up statx syscall
8bd49ac s390: wire up statx system call
9cb74b5 MIPS: Wire up statx system call

But many of them are not covered in this test. (Tested with ppc64 host
and test _notrun there.)

How about including <sys/syscall.h> to get __NR_statx definition first
and define our own syscall number only if it's not yet defined?

Thanks,
Eryu

>  
> @@ -159,7 +159,12 @@ static inline
>  int xfstests_statx(int dfd, const char *filename, unsigned flags,
>  		   unsigned int mask, struct statx *buffer)
>  {
> +#ifdef __NR_statx
>  	return syscall(__NR_statx, dfd, filename, flags, mask, buffer);
> +#else
> +	errno = ENOSYS;
> +	return -1;
> +#endif
>  }

  reply	other threads:[~2017-04-10  8:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-08 21:15 [PATCH 1/4] xfstests: Add an auxiliary program to create an AF_UNIX socket [ver #12] David Howells
2017-04-08 21:16 ` [PATCH 2/4] xfstests: Add first statx test " David Howells
2017-04-08 21:16 ` [PATCH 3/4] xfstests: Partially expand the documentation " David Howells
2017-04-08 21:16 ` [PATCH 4/4] xfstests: Check the stx_attributes settable by chattr " David Howells
2017-04-10  8:01   ` Eryu Guan [this message]
2017-04-10 13:35   ` David Howells

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=20170410080127.GD22845@eguan.usersys.redhat.com \
    --to=eguan@redhat.com \
    --cc=amir73il@gmail.com \
    --cc=david@fromorbit.com \
    --cc=dhowells@redhat.com \
    --cc=fstests@vger.kernel.org \
    --cc=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.