[PATCH v3] xfstests: update xfs/096 for new behaviour

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



Because we recently changed how mkfs behaves when it gets incorrect/invalid
values, add a feature check to run this test only on older binaries, which
accepts invalid sunit values.

Signed-off-by: Jan Tulak <jtulak@xxxxxxxxxx>
---
UPDATE:
Change it to _notrun on newer binaries. Commit message updated respectivvely.
---
 tests/xfs/096 | 22 ++++++++++++++++++----
 1 file changed, 18 insertions(+), 4 deletions(-)

diff --git a/tests/xfs/096 b/tests/xfs/096
index f949e83..803b49d 100755
--- a/tests/xfs/096
+++ b/tests/xfs/096
@@ -39,6 +39,20 @@ _cleanup()
     rm -f $tmp.*
 }
 
+# maximum log record size
+max_lr_size=`expr 256 \* 1024`
+big_su=`expr $max_lr_size + 4096`
+
+requires_mkfs_accept_invalid_log_sunit()
+{
+	accepts=`mkfs.xfs -N -l version=2,su=$big_su 2>&1 | \
+		grep -ci "No device name"`
+	if [ "$accepts" -eq 0 ];then
+		_notrun "Runs only on older xfsprogs accepting invalid log sunit"
+	fi
+	return 1
+}
+
 # get standard environment, filters and checks
 . ./common/rc
 . ./common/filter
@@ -97,6 +111,9 @@ mkfs_filter()
    | grep -v parent
 }
 
+# skip on newer versions
+requires_mkfs_accept_invalid_log_sunit
+
 # real QA test starts here
 rm -f $seqres.full
 
@@ -108,16 +125,13 @@ _require_v2log
 
 # choose .out file based on internal/external log
 rm -f $seqfull.out
+
 if [ "$USE_EXTERNAL" = yes ]; then
 	ln -s $seq.out.external $seqfull.out
 else
 	ln -s $seq.out.internal $seqfull.out
 fi
 
-# maximum log record size
-max_lr_size=`expr 256 \* 1024`
-
-big_su=`expr $max_lr_size + 4096`
 
 #
 # Test out various mkfs param combinations
-- 
2.5.5

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



[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux