diff mbox

[3/5] btrfs-progs: Move bad root items test cases to its corresponding dir

Message ID 1419471135-10878-4-git-send-email-quwenruo@cn.fujitsu.com (mailing list archive)
State Accepted
Headers show

Commit Message

Qu Wenruo Dec. 25, 2014, 1:32 a.m. UTC
Now 006-bad-root-items has two cases, one for default case, and one for
skinny metadata case.

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
---
 .../default_case.tar.xz}                                 | Bin
 .../skinny_case.tar.xz}                                  | Bin
 tests/fsck-tests/006-bad-root-items/test.sh              |  15 +++++++++++++++
 3 files changed, 15 insertions(+)
 rename tests/fsck-tests/{006-bad_root_items_fs.tar.xz => 006-bad-root-items/default_case.tar.xz} (100%)
 rename tests/fsck-tests/{007-bad_root_items_fs_skinny.tar.xz => 006-bad-root-items/skinny_case.tar.xz} (100%)
 create mode 100755 tests/fsck-tests/006-bad-root-items/test.sh
diff mbox

Patch

diff --git a/tests/fsck-tests/006-bad_root_items_fs.tar.xz b/tests/fsck-tests/006-bad-root-items/default_case.tar.xz
similarity index 100%
rename from tests/fsck-tests/006-bad_root_items_fs.tar.xz
rename to tests/fsck-tests/006-bad-root-items/default_case.tar.xz
diff --git a/tests/fsck-tests/007-bad_root_items_fs_skinny.tar.xz b/tests/fsck-tests/006-bad-root-items/skinny_case.tar.xz
similarity index 100%
rename from tests/fsck-tests/007-bad_root_items_fs_skinny.tar.xz
rename to tests/fsck-tests/006-bad-root-items/skinny_case.tar.xz
diff --git a/tests/fsck-tests/006-bad-root-items/test.sh b/tests/fsck-tests/006-bad-root-items/test.sh
new file mode 100755
index 0000000..2c0e1c6
--- /dev/null
+++ b/tests/fsck-tests/006-bad-root-items/test.sh
@@ -0,0 +1,15 @@ 
+#!/bin/bash
+
+source $top/tests/common
+
+echo "extracting image default_case.tar.xz" >> $RESULT
+tar xJf default_case.tar.xz || \
+	_fail "failed to extract default_case.tar.xz"
+check_image test.img
+
+echo "extracting image skinny_case.tar.xz" >> $RESULT
+tar xJf skinny_case.tar.xz || \
+	_fail "failed to extract skinny_case.tar.xz"
+check_image test.img
+
+rm test.img