summaryrefslogtreecommitdiff
path: root/tests/common.convert
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2017-09-07 14:44:45 +0200
committerDavid Sterba <dsterba@suse.com>2017-09-08 16:15:05 +0200
commit7299e0d294c0846da0af46775713f3697bfc3bcf (patch)
treeb0940633eb9886a2cb80adb25af4fde0f1b91dbf /tests/common.convert
parente96921bcaa059f1c7a5a7b3e3c3b02bb6a008f51 (diff)
btrfs-progs: tests: enhance post-rollback fsck tests
The post-rollback helper still assumes just extN, we need an extra argument that'll get passed to fsck. Change all callsites at once so the tests do not fail temporarily. Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tests/common.convert')
-rw-r--r--tests/common.convert16
1 files changed, 14 insertions, 2 deletions
diff --git a/tests/common.convert b/tests/common.convert
index 1d98cda1..7d9a5be1 100644
--- a/tests/common.convert
+++ b/tests/common.convert
@@ -218,9 +218,21 @@ convert_test_post_checks_all() {
}
# do rollback and fsck
+# $1: filesystem name or alias (ext2 includes ext3 and ext4),
convert_test_post_rollback() {
+ local types
+
run_check "$TOP/btrfs-convert" --rollback "$TEST_DEV"
- run_check fsck -n -t ext2,ext3,ext4 "$TEST_DEV"
+ if [ -z "$1" ]; then
+ _fail "missing filesystem type to check"
+ fi
+ case "$1" in
+ ext[234]) types=ext2,ext3,ext4 ;;
+ reiserfs) types=reiserfs ;;
+ *) _fail "unknown filesystem type to check: $1" ;;
+ esac
+
+ run_check fsck -n -t "$types" "$TEST_DEV"
}
# simple wrapper for a convert test
@@ -261,5 +273,5 @@ convert_test() {
rm -- "$EXT_PERMTMP"
rm -- "$EXT_ACLTMP"
- convert_test_post_rollback
+ convert_test_post_rollback "$fstype"
}