From 4e4c5d354912b2e8adaf4c64bfee00b1bdc420af Mon Sep 17 00:00:00 2001 From: Qu Wenruo Date: Fri, 10 Nov 2017 09:34:17 +0800 Subject: [PATCH] btrfs-progs: test/fsck: Introduce test images containing tree reloc tree Reloc tree is a special tree with very short life span. It acts as a special snapshot for any tree, with related nodes/leaves or EXTENT_DATA modified to point to new position. Considering the short life span and its special purpose, it should be quite reasonable to keep them as both corner case for fsck and educational dump for anyone interested in relocation. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba --- tests/fsck-tests/027-tree-reloc-tree/test.sh | 19 +++++++++++++++++++ .../tree_reloc_for_data_reloc.img.xz | Bin 0 -> 2112 bytes .../tree_reloc_for_fs_tree.img.xz | Bin 0 -> 2424 bytes 3 files changed, 19 insertions(+) create mode 100755 tests/fsck-tests/027-tree-reloc-tree/test.sh create mode 100644 tests/fsck-tests/027-tree-reloc-tree/tree_reloc_for_data_reloc.img.xz create mode 100644 tests/fsck-tests/027-tree-reloc-tree/tree_reloc_for_fs_tree.img.xz diff --git a/tests/fsck-tests/027-tree-reloc-tree/test.sh b/tests/fsck-tests/027-tree-reloc-tree/test.sh new file mode 100755 index 0000000..afad1e8 --- /dev/null +++ b/tests/fsck-tests/027-tree-reloc-tree/test.sh @@ -0,0 +1,19 @@ +#!/bin/bash +# Make sure btrfs check won't report any false alerts for valid image with +# reloc tree. +# +# Also due to the short life span of reloc tree, save the as dump example for +# later usage. + +source "$TOP/tests/common" + +check_prereq btrfs + +check_image() { + local image + + image=$1 + run_check "$TOP/btrfs" check "$image" +} + +check_all_images diff --git a/tests/fsck-tests/027-tree-reloc-tree/tree_reloc_for_data_reloc.img.xz b/tests/fsck-tests/027-tree-reloc-tree/tree_reloc_for_data_reloc.img.xz new file mode 100644 index 0000000000000000000000000000000000000000..66d8bde6b7a6c451eb7b3b6f4dbc6a919144d1f5 GIT binary patch literal 2112 zcmV-G2*3CJH+ooF000E$*0e?f03iV!0000G&sfah5B~@LT>wRyj;C3^v%$$4d1r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