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 2/4] xfstests: Add first statx test [ver #10]
Date: Sat, 8 Apr 2017 23:08:12 +0800 [thread overview]
Message-ID: <20170408150812.GX22845@eguan.usersys.redhat.com> (raw)
In-Reply-To: <149146775556.12770.11943651470996193921.stgit@warthog.procyon.org.uk>
On Thu, Apr 06, 2017 at 09:35:55AM +0100, David Howells wrote:
...
> diff --git a/src/statx.h b/src/statx.h
> new file mode 100644
> index 0000000..711d1ba
> --- /dev/null
> +++ b/src/statx.h
> @@ -0,0 +1,166 @@
> +#ifndef STATX_H
> +#define STATX_H
> +
> +#include <unistd.h>
> +#include <linux/types.h>
> +
> +#ifndef AT_STATX_SYNC_TYPE
> +#define AT_STATX_SYNC_TYPE 0x6000 /* Type of synchronisation required from statx() */
> +#define AT_STATX_SYNC_AS_STAT 0x0000 /* - Do whatever stat() does */
> +#define AT_STATX_FORCE_SYNC 0x2000 /* - Force the attributes to be sync'd with the server */
> +#define AT_STATX_DONT_SYNC 0x4000 /* - Don't sync attributes with the server */
> +#endif
> +
> +#ifndef AT_NO_AUTOMOUNT
> +#define AT_NO_AUTOMOUNT 0x800 /* Suppress terminal automount traversal */
> +#endif
> +
> +#ifdef __i386__
> +#define __NR_statx 383
> +#elif defined (__ILP32__)
> +#define __NR_statx (__X32_SYSCALL_BIT + 332)
> +#else
> +#define __NR_statx 332
> +#endif
I gave it more tests today on ppc64 host, and test failed as
QA output created by 422
Test statx on a fifo
+/mnt/xfstests/mnt1/422-fifo: Bad file descriptor
+stat_test failed
Test statx on a chardev
...
and strace showed it was calling into getpeername(2) (AT_FDCWD == -100)
getpeername(-100, 0x3fffd498f491, 0x100) = -1 EBADF (Bad file descriptor)
Perhaps we should add a new autoconf rule in configure.ac and define
HAVE_STATX if there's statx support, like what src/renameat2.c does?
Thanks,
Eryu
next prev parent reply other threads:[~2017-04-08 15:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-06 8:35 [PATCH 1/4] xfstests: Add an auxiliary program to create an AF_UNIX socket [ver #10] David Howells
2017-04-06 8:35 ` [PATCH 2/4] xfstests: Add first statx test " David Howells
2017-04-08 15:08 ` Eryu Guan [this message]
2017-04-08 21:05 ` David Howells
2017-04-08 21:07 ` David Howells
2017-04-09 7:47 ` Amir Goldstein
2017-04-09 19:39 ` Darrick J. Wong
2017-04-06 8:36 ` [PATCH 3/4] xfstests: Partially expand the documentation " David Howells
2017-04-06 8:36 ` [PATCH 4/4] xfstests: Check the stx_attributes settable by chattr " 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=20170408150812.GX22845@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox