From 9119319ef99ffd742349f4b91aa8caab02d38fc9 Mon Sep 17 00:00:00 2001 From: Qu Wenruo Date: Fri, 7 Oct 2016 15:22:59 +0800 Subject: btrfs-progs: test: Add test image for btrfsck qgroup rescan detection Fixed by commit 7c646c538e74 btrfs-progs: qgroup: Fix regression leads to corrupted qgroup status. Add minimal test image for that fix. Signed-off-by: Qu Wenruo [ minor cleanups in test.sh ] Signed-off-by: David Sterba --- tests/fsck-tests/022-qgroup-rescan-halfway/test.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 tests/fsck-tests/022-qgroup-rescan-halfway/test.sh (limited to 'tests/fsck-tests/022-qgroup-rescan-halfway/test.sh') diff --git a/tests/fsck-tests/022-qgroup-rescan-halfway/test.sh b/tests/fsck-tests/022-qgroup-rescan-halfway/test.sh new file mode 100755 index 00000000..5b114eeb --- /dev/null +++ b/tests/fsck-tests/022-qgroup-rescan-halfway/test.sh @@ -0,0 +1,19 @@ +#!/bin/bash +# check whether btrfsck can detect running qgroup rescan + +source $TOP/tests/common + +check_prereq btrfs + +check_image() { + local image + + image=$1 + run_check_stdout $TOP/btrfs check "$image" 2>&1 | \ + grep -q "Counts for qgroup id" + if [ $? -eq 0 ]; then + _fail "Btrfs check doesn't detect rescan correctly" + fi +} + +check_all_images "." -- cgit v1.2.3