public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] common: introduce XFS_IO_AVOID env var
@ 2015-10-17 18:45 Theodore Ts'o
  2015-10-18 21:37 ` Dave Chinner
  0 siblings, 1 reply; 6+ messages in thread
From: Theodore Ts'o @ 2015-10-17 18:45 UTC (permalink / raw)
  To: fstests; +Cc: Theodore Ts'o

Like FSSTRESS_AVOID and FSX_AVOID, XFS_IO_AVOID can be used to avoid
using various advanced file system features such as "fpunch"
"fcollapse", "finsert", or "zero".  Tests that require an xfs_io
command which is included in the space-separated list found in the
XFS_IO_AVOID environment variable will be skipped using _notrun.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
 README    | 4 ++++
 common/rc | 5 +++++
 2 files changed, 9 insertions(+)

diff --git a/README b/README
index f8a878c..bb0075b 100644
--- a/README
+++ b/README
@@ -78,6 +78,10 @@ Preparing system for tests (IRIX and Linux):
                added to the end of fsstresss and fsx invocations, respectively,
                in case you wish to exclude certain operational modes from these
                tests.
+	     - setenv XFS_IO_AVOID which may contain a list of space separated
+	       xfs_io commands which will be avoided in case you want to
+	       exclude tests that require the use of certain file system
+	       operations such as "fpunch", "fcollapse", "finsert", or "zero".
 
         - or add a case to the switch in common/config assigning
           these variables based on the hostname of your test
diff --git a/common/rc b/common/rc
index adf1edf..61de97e 100644
--- a/common/rc
+++ b/common/rc
@@ -1603,6 +1603,11 @@ _require_xfs_io_command()
 	fi
 	command=$1
 
+	if echo "$XFS_IO_AVOID" | grep -wq "$command"
+	then
+		_notrun "Avoiding xfs_io $command"
+	fi
+
 	testfile=$TEST_DIR/$$.xfs_io
 	case $command in
 	"falloc" )
-- 
2.5.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-10-19  2:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-17 18:45 [PATCH] common: introduce XFS_IO_AVOID env var Theodore Ts'o
2015-10-18 21:37 ` Dave Chinner
2015-10-18 22:08   ` Theodore Ts'o
2015-10-18 23:14     ` Dave Chinner
2015-10-19  0:10       ` Theodore Ts'o
2015-10-19  2:29         ` Dave Chinner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox