diff options
author | David Sterba <dsterba@suse.com> | 2018-03-23 16:34:30 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-03-30 22:15:55 +0200 |
commit | dcb174ce2e2c9be1eaad73757d0312246560ba3d (patch) | |
tree | b265e3f36d473878962751f820fc12d7a5a3bf6a /tests/misc-tests/001-btrfstune-features/test.sh | |
parent | 3ccad2a6443fcae0fee2cd94132580d2d06268dd (diff) |
btrfs-progs: tests: add shell quotes to misc test scripts
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tests/misc-tests/001-btrfstune-features/test.sh')
-rwxr-xr-x | tests/misc-tests/001-btrfstune-features/test.sh | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/misc-tests/001-btrfstune-features/test.sh b/tests/misc-tests/001-btrfstune-features/test.sh index 718e4b08..e3da3949 100755 --- a/tests/misc-tests/001-btrfstune-features/test.sh +++ b/tests/misc-tests/001-btrfstune-features/test.sh @@ -21,21 +21,22 @@ test_feature() local tuneopt local sbflag - mkfsfeatures=${1:+-O ^$1} + mkfsfeatures=$1 tuneopt="$2" sbflag="$3" - run_check $SUDO_HELPER $TOP/mkfs.btrfs -f $mkfsfeatures $TEST_DEV - if run_check_stdout $TOP/btrfs inspect-internal dump-super $TEST_DEV | \ + run_check $SUDO_HELPER "$TOP/mkfs.btrfs" -f \ + ${mkfsfeatures:+-O ^"$mkfsfeatures"} "$TEST_DEV" + if run_check_stdout "$TOP/btrfs" inspect-internal dump-super "$TEST_DEV" | \ grep -q "$sbflag"; then _fail "FAIL: feature $sbflag must not be set on the base image" fi - run_check $TOP/btrfstune $tuneopt $TEST_DEV - if ! run_check_stdout $TOP/btrfs inspect-internal dump-super $TEST_DEV | \ + run_check "$TOP/btrfstune" "$tuneopt" "$TEST_DEV" + if ! run_check_stdout "$TOP/btrfs" inspect-internal dump-super "$TEST_DEV" | \ grep -q "$sbflag"; then _fail "FAIL: feature $sbflag not set" fi - run_check $SUDO_HELPER $TOP/btrfs check $TEST_DEV + run_check $SUDO_HELPER "$TOP/btrfs" check "$TEST_DEV" } test_feature extref -r EXTENDED_IREF |