diff options
Diffstat (limited to 'tests/common.convert')
-rw-r--r-- | tests/common.convert | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/tests/common.convert b/tests/common.convert index 8c9242e5..12ad3a82 100644 --- a/tests/common.convert +++ b/tests/common.convert @@ -22,8 +22,13 @@ convert_test_preamble() { # prepare TEST_DEV before conversion, create filesystem and mount it, image # size is 512MB -# $@: free form, command to create the filesystem, with appended -F +# $1: type of the filesystem +# $2+: free form, command to create the filesystem, with appended -F convert_test_prep_fs() { + local fstype + + fstype="$1" + shift # TEST_DEV not removed as the file might have special permissions, eg. # when test image is on NFS and would not be writable for root run_check truncate -s 0 "$TEST_DEV" @@ -173,11 +178,13 @@ convert_test_post_rollback() { } # simple wrapper for a convert test -# $1: btrfs features, argument to -O -# $2: description of the test "ext2 8k nodesize" -# $3: nodesize value -# $4 + rest: command to create the ext2 image +# $1: type of the converted filesystem +# $2: btrfs features, argument to -O +# $3: description of the test "ext2 8k nodesize" +# $4: nodesize value +# $5 + rest: command to create the ext2 image convert_test() { + local fstype local features local nodesize local msg @@ -185,12 +192,13 @@ convert_test() { local EXT_PERMTMP local EXT_ACLTMP - features="$1" - msg="$2" - nodesize="$3" - shift 3 + fstype="$1" + features="$2" + msg="$3" + nodesize="$4" + shift 4 convert_test_preamble "$features" "$msg" "$nodesize" "$@" - convert_test_prep_fs "$@" + convert_test_prep_fs "$fstype" "$@" populate_fs CHECKSUMTMP=$(mktemp --tmpdir btrfs-progs-convert.XXXXXXXXXX) EXT_PERMTMP=$(mktemp --tmpdir btrfs-progs-convert.permXXXXXX) |