diff mbox

xfstests: introduce FSX_AVOID env var

Message ID 5355478C.8070905@redhat.com
State Not Applicable, archived
Headers show

Commit Message

Eric Sandeen April 21, 2014, 4:30 p.m. UTC
Just like FSSTRESS_AVOID, FSX_AVOID can be used to add
options at the end of the default fsx runs in each test.
i.e. FSX_AVOID="-H -z -C" will disable punch hole, zero range,
and collapse range calls in all tests which run fsx.

This should handle Ted's concerns about buggy ext4 fallocate
code without needing to add tunables to the kernel to reject
these operations during xfstests runs.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---


--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Christoph Hellwig April 25, 2014, 6:31 a.m. UTC | #1
On Mon, Apr 21, 2014 at 11:30:04AM -0500, Eric Sandeen wrote:
> Just like FSSTRESS_AVOID, FSX_AVOID can be used to add
> options at the end of the default fsx runs in each test.
> i.e. FSX_AVOID="-H -z -C" will disable punch hole, zero range,
> and collapse range calls in all tests which run fsx.
> 
> This should handle Ted's concerns about buggy ext4 fallocate
> code without needing to add tunables to the kernel to reject
> these operations during xfstests runs.

I would much prefer to add a little _run_fsx helper to encapsulate this.

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Eric Sandeen April 25, 2014, 1:57 p.m. UTC | #2
On 4/25/14, 1:31 AM, Christoph Hellwig wrote:
> On Mon, Apr 21, 2014 at 11:30:04AM -0500, Eric Sandeen wrote:
>> Just like FSSTRESS_AVOID, FSX_AVOID can be used to add
>> options at the end of the default fsx runs in each test.
>> i.e. FSX_AVOID="-H -z -C" will disable punch hole, zero range,
>> and collapse range calls in all tests which run fsx.
>>
>> This should handle Ted's concerns about buggy ext4 fallocate
>> code without needing to add tunables to the kernel to reject
>> these operations during xfstests runs.
> 
> I would much prefer to add a little _run_fsx helper to encapsulate this.
> 

Dave already merged it, but yeah, that's a good idea, for fsx
as well as fsstress.

-Eric

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/README b/README
index 295d67f..b299c8f 100644
--- a/README
+++ b/README
@@ -68,6 +68,11 @@  Preparing system for tests (IRIX and Linux):
              - setenv FSTYP "the filesystem you want to test", the filesystem
                type is devised from the TEST_DEV device, but you may want to
                override it; if unset, the default is 'xfs'
+             - setenv FSSTRESS_AVOID and/or FSX_AVOID, which contain options
+               added to the end of fsstresss and fsx invocations, respectively,
+               in case you wish to exclude certain operational modes from these
+               tests.
+
         - or add a case to the switch in common/config assigning
           these variables based on the hostname of your test
           machine
diff --git a/tests/generic/075 b/tests/generic/075
index 8b4ab39..af4f34b 100755
--- a/tests/generic/075
+++ b/tests/generic/075
@@ -75,7 +75,7 @@  _do_test()
 
     # This cd and use of -P gets full debug on $here (not TEST_DEV)
     cd $out
-    if ! $here/ltp/fsx $_param -P $here $seq.$_n &>/dev/null
+    if ! $here/ltp/fsx $_param -P $here $seq.$_n $FSX_AVOID &>/dev/null
     then
 	echo "    fsx ($_param) failed, $? - compare $seqres.$_n.{good,bad,fsxlog}"
 	mv $out/$seq.$_n $seqres.$_n.full
diff --git a/tests/generic/091 b/tests/generic/091
index bb176f1..e7b60fe 100755
--- a/tests/generic/091
+++ b/tests/generic/091
@@ -46,7 +46,7 @@  run_fsx()
 	echo fsx $@ | tee -a $seqres.full
 	args=`echo $@ | sed -e "s/ BSIZE / $bsize /g" -e "s/ PSIZE / $psize /g"`
 	rm -f $TEST_DIR/junk
-	$here/ltp/fsx $args $TEST_DIR/junk >>$seqres.full 2>&1
+	$here/ltp/fsx $args $FSX_AVOID $TEST_DIR/junk >>$seqres.full 2>&1
 	if [ $? -ne 0 ]; then
 		cat $seqres.full
 		exit 1
diff --git a/tests/generic/112 b/tests/generic/112
index 4918f75..1e34d99 100755
--- a/tests/generic/112
+++ b/tests/generic/112
@@ -75,7 +75,7 @@  _do_test()
 
     # This cd and use of -P gets full debug on $here (not TEST_DEV)
     cd $out
-    if ! $here/ltp/fsx $_param -P $here $seq.$_n &>/dev/null
+    if ! $here/ltp/fsx $_param -P $here $FSX_AVOID $seq.$_n &>/dev/null
     then
 	echo "    fsx ($_param) returned $? - see $seq.$_n.full"
 	mv $seq.$_n.fsxlog $seqres.$_n.full
diff --git a/tests/generic/127 b/tests/generic/127
index 58ca91e..f6b7f95 100755
--- a/tests/generic/127
+++ b/tests/generic/127
@@ -51,7 +51,7 @@  _fsx_lite_nommap()
 {
     echo "=== FSX Light Mode, No Memory Mapping ==="
     dd if=/dev/zero of=$TEST_DIR/fsx_lite_nommap bs=${FSX_FILE_SIZE} count=1 > /dev/null 2>&1
-    if ! ltp/fsx $FSX_ARGS -L -R -W $TEST_DIR/fsx_lite_nommap > $tmp.output 2>&1
+    if ! ltp/fsx $FSX_ARGS -L -R -W $FSX_AVOID $TEST_DIR/fsx_lite_nommap > $tmp.output 2>&1
     then
         echo "ltp/fsx $FSX_ARGS -L -R -W $TEST_DIR/fsx_lite_nommap"
         cat $tmp.output
@@ -65,7 +65,7 @@  _fsx_lite_mmap()
 {
     echo "=== FSX Light Mode, Memory Mapping ==="
     dd if=/dev/zero of=$TEST_DIR/fsx_lite_mmap bs=${FSX_FILE_SIZE} count=1 > /dev/null 2>&1
-    if ! ltp/fsx $FSX_ARGS -L $TEST_DIR/fsx_lite_mmap > $tmp.output 2>&1
+    if ! ltp/fsx $FSX_ARGS -L $FSX_AVOID $TEST_DIR/fsx_lite_mmap > $tmp.output 2>&1
     then
     	echo "ltp/fsx $FSX_ARGS -L fsx_lite_mmap"
 	cat $tmp.output
@@ -78,7 +78,7 @@  _fsx_lite_mmap()
 _fsx_std_nommap()
 {
     echo "=== FSX Standard Mode, No Memory Mapping ==="
-    if ! ltp/fsx $FSX_ARGS -R -W $TEST_DIR/fsx_std_nommap > $tmp.output 2>&1
+    if ! ltp/fsx $FSX_ARGS -R -W $FSX_AVOID $TEST_DIR/fsx_std_nommap > $tmp.output 2>&1
     then
         echo "ltp/fsx $FSX_ARGS -R -W fsx_std_nommap"
         cat $tmp.output
@@ -91,7 +91,7 @@  _fsx_std_nommap()
 _fsx_std_mmap()
 {
     echo "=== FSX Standard Mode, Memory Mapping ==="
-    if ! ltp/fsx $FSX_ARGS $TEST_DIR/fsx_std_mmap > $tmp.output 2>&1
+    if ! ltp/fsx $FSX_ARGS $FSX_AVOID $TEST_DIR/fsx_std_mmap > $tmp.output 2>&1
     then
     	echo "ltp/fsx $FSX_ARGS fsx_std_mmap"
 	cat $tmp.output
diff --git a/tests/generic/231 b/tests/generic/231
index a7cff35..df7d76c 100755
--- a/tests/generic/231
+++ b/tests/generic/231
@@ -48,7 +48,7 @@  _fsx()
 		SEED=$RANDOM
 		echo "ltp/fsx $FSX_ARGS -S $SEED $SCRATCH_MNT/fsx_file$i" >>$seqres.full
 		su $qa_user -c "ltp/fsx $FSX_ARGS -S $SEED \
-			$SCRATCH_MNT/fsx_file$i" >$tmp.output$i 2>&1 &
+			$FSX_AVOID $SCRATCH_MNT/fsx_file$i" >$tmp.output$i 2>&1 &
 	done
 
 	for (( i = 1; i <= $tasks; i++ )); do
diff --git a/tests/generic/263 b/tests/generic/263
index bc59865..6ecb74d 100755
--- a/tests/generic/263
+++ b/tests/generic/263
@@ -46,7 +46,7 @@  run_fsx()
 	echo fsx $@ | tee -a $seqres.full
 	args=`echo $@ | sed -e "s/ BSIZE / $bsize /g" -e "s/ PSIZE / $psize /g"`
 	rm -f $TEST_DIR/junk
-	$here/ltp/fsx $args $TEST_DIR/junk >>$seqres.full 2>&1
+	$here/ltp/fsx $args $FSX_AVOID $TEST_DIR/junk >>$seqres.full 2>&1
 	if [ $? -ne 0 ]; then
 		cat $seqres.full
 		exit 1