diff options
author | Zhao Lei <zhaolei@cn.fujitsu.com> | 2015-09-23 15:19:05 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2015-10-19 11:48:24 +0200 |
commit | 5f77daa6a1673b130a566130144c80ce86ed1d0d (patch) | |
tree | 3effee5cd385b77c5fd8088c525a42ff7c00f338 | |
parent | 5627eee02b6e8b0a933ae88767e998923eb359f8 (diff) |
btrfs-progs: tests: Introduce fsck-tests/018-leaf-crossing-stripes
To test if fsck can check detec "leaf crossing stripes".
This function was introduced from patch titled:
btrfs-progs: fsck: Check if a metadata tree block crossing stripe boundary
Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
[renamed and other minor changes]
Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r-- | tests/fsck-tests/018-leaf-crossing-stripes/default_case.raw.xz | bin | 0 -> 105064 bytes | |||
-rwxr-xr-x | tests/fsck-tests/018-leaf-crossing-stripes/test.sh | 12 |
2 files changed, 12 insertions, 0 deletions
diff --git a/tests/fsck-tests/018-leaf-crossing-stripes/default_case.raw.xz b/tests/fsck-tests/018-leaf-crossing-stripes/default_case.raw.xz Binary files differnew file mode 100644 index 00000000..60eb2f97 --- /dev/null +++ b/tests/fsck-tests/018-leaf-crossing-stripes/default_case.raw.xz diff --git a/tests/fsck-tests/018-leaf-crossing-stripes/test.sh b/tests/fsck-tests/018-leaf-crossing-stripes/test.sh new file mode 100755 index 00000000..c453ab5c --- /dev/null +++ b/tests/fsck-tests/018-leaf-crossing-stripes/test.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +source $TOP/tests/common + +check_prereq btrfs + +image=$(extract_image "./default_case.raw.xz") +run_check_stdout $TOP/btrfs check "$image" 2>&1 | + grep -q "crossing stripe boundary" || + _fail "no expected error message in the output" + +rm -f "$image" |