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 3/4] xfstests: Partially expand the documentation [ver #5]
Date: Wed, 5 Apr 2017 18:42:05 +0800 [thread overview]
Message-ID: <20170405104205.GZ22845@eguan.usersys.redhat.com> (raw)
In-Reply-To: <149132132595.18980.156040870381065105.stgit@warthog.procyon.org.uk>
On Tue, Apr 04, 2017 at 04:55:25PM +0100, David Howells wrote:
> Partially expand the documentation available in xfstests to include
> requirements checking and auxiliary programs for testing.
>
> Signed-off-by: David Howells <dhowells@redhat.com>
> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---
>
> doc/auxiliary-programs.txt | 56 ++++++++++++++++++++++++++++++++++
> doc/requirement-checking.txt | 69 ++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 125 insertions(+)
> create mode 100644 doc/auxiliary-programs.txt
> create mode 100644 doc/requirement-checking.txt
>
> diff --git a/doc/auxiliary-programs.txt b/doc/auxiliary-programs.txt
> new file mode 100644
> index 0000000..17797b0
> --- /dev/null
> +++ b/doc/auxiliary-programs.txt
> @@ -0,0 +1,56 @@
> + ==============================
> + AUXILIARY PROGRAMS FOR TESTING
> + ==============================
> +
> +Not everything a test script can do is easily done within a test script;
> +sometimes it makes a lot more sense to write auxiliary program in C and have
> +the test script call them. Auxiliary commands can be found in the src/
> +directory and in other packages.
> +
> +Tests wanting to use an auxiliary program found in the src/ directory should
> +note the dependency with:
> +
> + _require_test_program "<program-name>"
> +
> +
> +Contents:
> +
> + - af_unix -- Create an AF_UNIX socket
> + - stat_test -- statx syscall exercise
> + - xfs_io -- General I/O operation exercise
> +
> +
> +==================
> +QUICK DESCRIPTIONS
> +==================
> +
> +af_unix
> +
> + The af_unix program creates an AF_UNIX socket at the given location.
> +
> +stat_test
> +
> + The stat_test program is primarily designed to exercise the statx()
> + system call. It can check statx() against fstatat() and it can
> + compare and check various file attributes.
> +
> + See also:
> + _require_statx
> +
> +
> +xfs_io
> +
> + The xfs_io program can be found in the xfsprogs package and can be used
> + to perform sequences of I/O commands, though it is limited to what it
> + can do on open files.
> +
> + xfs_io is a debugging tool that is aimed at examining regular file I/O
> + paths rather than a raw XFS volume itself. These code paths include
> + not only the obvious read/write/mmap interfaces for manipulating files,
> + but also cover all of the XFS extensions (such as space preallocation,
> + additional inode flags, etc).
> +
> + Most of its commands can also be used with other filesystems.
> +
> + See also:
> + _require_xfs_io_command
> diff --git a/doc/requirement-checking.txt b/doc/requirement-checking.txt
> new file mode 100644
> index 0000000..29f0b74
> --- /dev/null
> +++ b/doc/requirement-checking.txt
> @@ -0,0 +1,69 @@
> + ========================================
> + TESTING FOR REQUIREMENTS IN TEST SCRIPTS
> + ========================================
> +
> +Test scripts need to indicate to the infrastructure what sorts of requirements
> +they have. This is done with _require_<xxx> macros, which may take parameters.
> +
> + (1) General requirements.
> +
> + _require_command
> + _require_test
> + _require_test_program
> + _require_xfs_io_command
> +
> + (2) System call requirements.
> +
> + _require_statx
> +
> +
> +====================
> +GENERAL REQUIREMENTS
> +====================
> +
> +_require_command "$VAR" name
> +
> + The test requires an external command, called 'name' be present on the
> + system and that '$VAR' should be set with the path to that command. $VAR
> + should then be used to refer to the command when executing it. For
> + example:
> +
> + _require_command "$NC_PROG" "nc"
> +
> + to locate the netcat command and then:
> +
> + $NC_PROG -U -l $TEST_DIR/$seq-sock
Hmm, NC_PROG is not defined/used anymore, perhaps it's not a good
example for document purpose. How about $KILLALL_PROG? It's often
forgotten and it could be a reminder in doc.
Thanks,
Eryu
next prev parent reply other threads:[~2017-04-05 10:42 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-04 15:55 [PATCH 1/4] xfstests: Add an auxiliary program to create an AF_UNIX socket [ver #5] David Howells
2017-04-04 15:55 ` [PATCH 2/4] xfstests: Add first statx test " David Howells
2017-04-05 10:38 ` Eryu Guan
2017-04-05 10:53 ` Does btrfs get nlink on directories wrong? -- was " David Howells
2017-04-05 12:30 ` David Sterba
2017-04-05 12:32 ` Amir Goldstein
2017-04-08 15:43 ` Eryu Guan
2017-04-08 21:02 ` David Howells
2017-04-04 15:55 ` [PATCH 3/4] xfstests: Partially expand the documentation " David Howells
2017-04-05 10:42 ` Eryu Guan [this message]
2017-04-05 10:55 ` David Howells
2017-04-05 10:59 ` Should xfstest generic/388 be using _require_command for fsstress? David Howells
2017-04-05 11:10 ` Eryu Guan
2017-04-05 11:17 ` David Howells
2017-04-05 11:32 ` Eryu Guan
2017-04-04 15:55 ` [PATCH 4/4] xfstests: Check the stx_attributes settable by chattr [ver #5] David Howells
2017-04-05 10:52 ` Eryu Guan
2017-04-05 11:11 ` David Howells
2017-04-05 11:30 ` Eryu Guan
2017-04-05 12:25 ` David Howells
2017-04-06 3:17 ` Eryu Guan
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=20170405104205.GZ22845@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