diff options
author | Qu Wenruo <quwenruo@cn.fujitsu.com> | 2016-10-07 15:22:59 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-10-24 15:03:04 +0200 |
commit | 9119319ef99ffd742349f4b91aa8caab02d38fc9 (patch) | |
tree | 0bd07732640bbc960c114a1738c1d38b8e15f2c7 /tests | |
parent | d94816cbde4c26ccd7b936d58636f50682decc83 (diff) |
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 <quwenruo@cn.fujitsu.com>
[ minor cleanups in test.sh ]
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/fsck-tests/022-qgroup-rescan-halfway/qgroup_rescan_halfway.raw.xz | bin | 0 -> 59360 bytes | |||
-rwxr-xr-x | tests/fsck-tests/022-qgroup-rescan-halfway/test.sh | 19 |
2 files changed, 19 insertions, 0 deletions
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 Binary files differnew file mode 100644 index 00000000..8cb620f7 --- /dev/null +++ b/tests/fsck-tests/022-qgroup-rescan-halfway/qgroup_rescan_halfway.raw.xz 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 "." |