From 8c0630298462431821fab06ec75cc4f4ccf7a069 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Wed, 26 Jun 2024 10:21:46 -0700 Subject: [PATCH] Let run-tests specify mkfs format version Add a run-tests -V option that passes through the -V option to mkfs so that runs can specify the format version that the primary volume will have. This doesn't affect the scratch file system versions. Signed-off-by: Zach Brown --- tests/run-tests.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/run-tests.sh b/tests/run-tests.sh index c91cea7b..d2aa3246 100755 --- a/tests/run-tests.sh +++ b/tests/run-tests.sh @@ -73,6 +73,7 @@ $(basename $0) options: -t | Enabled trace events that match the given glob argument. | Multiple options enable multiple globbed events. -T | Multiply the original trace buffer size by nr during the run. + -V | Set mkfs device format version. -X | xfstests git repo. Used by tests/xfstests.sh. -x | xfstests git branch to checkout and track. -y | xfstests ./check additional args @@ -176,6 +177,11 @@ while true; do T_TRACE_MULT="$2" shift ;; + -V) + test -n "$2" || die "-V must have a format version argument" + T_MKFS_FORMAT_VERSION="-V $2" + shift + ;; -X) test -n "$2" || die "-X requires xfstests git repo dir argument" T_XFSTESTS_REPO="$2" @@ -344,7 +350,7 @@ if [ -n "$T_MKFS" ]; then done msg "making new filesystem with $T_QUORUM quorum members" - cmd scoutfs mkfs -f $quo $T_DATA_ALLOC_ZONE_BLOCKS \ + cmd scoutfs mkfs -f $quo $T_DATA_ALLOC_ZONE_BLOCKS $T_MKFS_FORMAT_VERSION \ "$T_META_DEVICE" "$T_DATA_DEVICE" fi