summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQu Wenruo <wqu@suse.com>2018-07-26 14:39:01 +0800
committerDavid Sterba <dsterba@suse.com>2018-08-06 15:06:32 +0200
commitd99615284a83452c019f5bed05a882f93a4ef19a (patch)
treeb063c2b9d95373a9a24be1dd7ad78dba3ba6412c
parent1d5b2ad9212de6eae502985cc4f5e58a8cacf50c (diff)
btrfs-progs: fsck-tests: Add test image to check if btrfs check reports uninitialized rescan as error
Signed-off-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r--tests/fsck-tests/035-rescan-not-kicked-in/no_rescan_kicked_in.imgbin0 -> 3072 bytes
-rwxr-xr-xtests/fsck-tests/035-rescan-not-kicked-in/test.sh17
2 files changed, 17 insertions, 0 deletions
diff --git a/tests/fsck-tests/035-rescan-not-kicked-in/no_rescan_kicked_in.img b/tests/fsck-tests/035-rescan-not-kicked-in/no_rescan_kicked_in.img
new file mode 100644
index 0000000..b855a72
--- /dev/null
+++ b/tests/fsck-tests/035-rescan-not-kicked-in/no_rescan_kicked_in.img
Binary files differ
diff --git a/tests/fsck-tests/035-rescan-not-kicked-in/test.sh b/tests/fsck-tests/035-rescan-not-kicked-in/test.sh
new file mode 100755
index 0000000..82fa978
--- /dev/null
+++ b/tests/fsck-tests/035-rescan-not-kicked-in/test.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+# Under certain power loss case, btrfs quota tree can be initialized but
+# rescan not kicked in. Can be also reproduced by fstests/btrfs/166 but with
+# low probability.
+#
+# This test case verifies a special case when 'btrfs check' does not report
+# qgroup accounting differece as an error, thus no false alert for btrfs/166.
+
+source "$TEST_TOP/common"
+
+check_prereq btrfs
+
+check_image() {
+ run_check "$TOP/btrfs" check "$1"
+}
+
+check_all_images