Re: [PATCH 4/4] xfstests: Check the stx_attributes settable by chattr [ver #12]

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

 



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
>  }
--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux