btrfs-progs: New btrfsck test infrastructure
authorQu Wenruo <quwenruo@cn.fujitsu.com>
Thu, 25 Dec 2014 01:32:11 +0000 (09:32 +0800)
committerDavid Sterba <dsterba@suse.cz>
Wed, 14 Jan 2015 17:34:17 +0000 (18:34 +0100)
commit5287625fcffc45fca9c857fc5b9422cbc7e1711f
tree228fbe086e50d6eb6e3f2308be25ca276d69e7bd
parent3d47cc9ae17d939b9ad870a9f337f9c9f86d70d6
btrfs-progs: New btrfsck test infrastructure

Change the old btrfsck test infrastructure (btrfs-image dump or xz raw
dump) to the new test infrastructure.

1) Test case layout
The new infrastructure is dir based, each dir is one test type, and can
contain multiple images/scripts for different corner cases.
So layout will be the following:
btrfs-progs
|-tests
    |-fsck-tests
|-001-SOME-CORRUPT-TYPE
|-IMAGE-FOR-CASE1
|-IMAGE-FOR-CASE2

2) Test case image types
Only 2 types for test case images.
a) btrfs-image dump
   This one is the simplest case, one only needs to add the image to
   corresponding dir.

b) custom script
   This one is for all the resting cases which can't fit btrfs-image,
   like csum error or script can generate the image (this reduces the
   size obviously and good for review)
   The old binary dump also belongs to this type, so need to add script
   to extract them.

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
tests/common [new file with mode: 0644]
tests/fsck-tests.sh [changed mode: 0644->0755]