Btrfs-progs: add a test image for the transid fixer in btrfsck
authorJosef Bacik <jbacik@fusionio.com>
Tue, 1 Oct 2013 12:58:33 +0000 (08:58 -0400)
committerChris Mason <chris.mason@fusionio.com>
Wed, 16 Oct 2013 12:23:12 +0000 (08:23 -0400)
This is a verification test for the transid recow functionality of btrfsck.
I've also adjusted the test script to spit out which image it's testing so I can
be sure the image was getting tested.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
tests/fsck-tests.sh
tests/fsck-tests/002-bad-transid.img [new file with mode: 0644]

index c1490bf..25c390d 100644 (file)
@@ -17,6 +17,7 @@ rm -f fsck-tests-results.txt
 
 for i in $(find $here/tests/fsck-tests -name '*.img')
 do
+       echo "     [TEST]    $(basename $i)"
        echo "testing image $i" >> fsck-tests-results.txt
        $here/btrfs-image -r $i test.img >> fsck-tests-results.txt 2>&1 \
                || _fail "restore failed"
diff --git a/tests/fsck-tests/002-bad-transid.img b/tests/fsck-tests/002-bad-transid.img
new file mode 100644 (file)
index 0000000..85bd87c
Binary files /dev/null and b/tests/fsck-tests/002-bad-transid.img differ