From: Qu Wenruo Date: Fri, 7 Oct 2016 07:22:59 +0000 (+0800) Subject: btrfs-progs: test: Add test image for btrfsck qgroup rescan detection X-Git-Tag: upstream/4.16.1~1185 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9119319ef99ffd742349f4b91aa8caab02d38fc9;p=platform%2Fupstream%2Fbtrfs-progs.git 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 --- diff --git a/tests/fsck-tests/022-qgroup-rescan-halfway/qgroup_rescan_halfway.raw.xz b/tests/fsck-tests/022-qgroup-rescan-halfway/qgroup_rescan_halfway.raw.xz new file mode 100644 index 0000000..8cb620f Binary files /dev/null and b/tests/fsck-tests/022-qgroup-rescan-halfway/qgroup_rescan_halfway.raw.xz differ 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 0000000..5b114ee --- /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 "."