diff mbox series

[8/9] runtests.sh: Fix when SCRATCH_DEV_POOL is passed

Message ID 5eab116f5daa4cf36adde6e5175a88ee1df60e7c.1624007533.git.riteshh@linux.ibm.com (mailing list archive)
State New, archived
Headers show
Series kvmxfstests: Add 64K related configs for Power | expand

Commit Message

Ritesh Harjani June 18, 2021, 11:09 a.m. UTC
btrfs may need more than 1 disk which mostly needs to be passed via
SCRATCH_DEV_POOL. In such case we should not set SCRATCH_DEV [1].

[1]: https://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git/tree/README#n55

Signed-off-by: Ritesh Harjani <riteshh@linux.ibm.com>
---
 kvm-xfstests/test-appliance/files/root/runtests.sh | 6 ++++++
 1 file changed, 6 insertions(+)
diff mbox series

Patch

diff --git a/kvm-xfstests/test-appliance/files/root/runtests.sh b/kvm-xfstests/test-appliance/files/root/runtests.sh
index 6cbda62..bfc5b24 100755
--- a/kvm-xfstests/test-appliance/files/root/runtests.sh
+++ b/kvm-xfstests/test-appliance/files/root/runtests.sh
@@ -288,6 +288,12 @@  do
 		export LOGWRITES_DEV=$LG_SCR_DEV
 	    fi
 	fi
+
+	# This is required in case of BTRFS uses SCRATCH_DEV_POOL
+	if [[ -n $SCRATCH_DEV_POOL ]]; then
+		unset SCRATCH_DEV
+	fi
+
 	case "$TEST_DEV" in
 	    */ovl|9p*) ;;
 	    *:/*) ;;