summaryrefslogtreecommitdiff
path: root/tests/misc-tests/018-recv-end-of-stream/test.sh
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2018-03-23 16:34:30 +0100
committerDavid Sterba <dsterba@suse.com>2018-03-30 22:15:55 +0200
commitdcb174ce2e2c9be1eaad73757d0312246560ba3d (patch)
treeb265e3f36d473878962751f820fc12d7a5a3bf6a /tests/misc-tests/018-recv-end-of-stream/test.sh
parent3ccad2a6443fcae0fee2cd94132580d2d06268dd (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/018-recv-end-of-stream/test.sh')
-rwxr-xr-xtests/misc-tests/018-recv-end-of-stream/test.sh68
1 files changed, 34 insertions, 34 deletions
diff --git a/tests/misc-tests/018-recv-end-of-stream/test.sh b/tests/misc-tests/018-recv-end-of-stream/test.sh
index 79e735ea..0de7d3b6 100755
--- a/tests/misc-tests/018-recv-end-of-stream/test.sh
+++ b/tests/misc-tests/018-recv-end-of-stream/test.sh
@@ -19,24 +19,24 @@ test_full_empty_stream() {
local str
str="$here/stream-full-empty.stream"
- run_check $TOP/mkfs.btrfs -f $TEST_DEV
+ run_check "$TOP/mkfs.btrfs" -f "$TEST_DEV"
run_check_mount_test_dev
cd "$TEST_MNT" || _fail "cannot chdir to TEST_MNT"
- run_check $SUDO_HELPER $TOP/btrfs subvolume create subv1
- run_check $SUDO_HELPER $TOP/btrfs subvolume snapshot -r subv1 subv1-snap
+ run_check $SUDO_HELPER "$TOP/btrfs" subvolume create subv1
+ run_check $SUDO_HELPER "$TOP/btrfs" subvolume snapshot -r subv1 subv1-snap
truncate -s0 "$str"
chmod a+w "$str"
- run_check $SUDO_HELPER $TOP/btrfs send -f "$str" subv1-snap
+ run_check $SUDO_HELPER "$TOP/btrfs" send -f "$str" subv1-snap
cd "$here" || _fail "cannot chdir back to test directory"
run_check_umount_test_dev
- run_check $TOP/mkfs.btrfs -f $TEST_DEV
+ run_check "$TOP/mkfs.btrfs" -f "$TEST_DEV"
run_check_mount_test_dev
- run_check $SUDO_HELPER $TOP/btrfs receive "$@" -v -f "$str" "$TEST_MNT"
+ run_check $SUDO_HELPER "$TOP/btrfs" receive "$@" -v -f "$str" "$TEST_MNT"
run_check_umount_test_dev
run_check rm -f -- "$str"
@@ -46,28 +46,28 @@ test_full_simple_stream() {
local str
str="$here/stream-full-simple.stream"
- run_check $TOP/mkfs.btrfs -f $TEST_DEV
+ run_check "$TOP/mkfs.btrfs" -f $TEST_DEV
run_check_mount_test_dev
cd "$TEST_MNT" || _fail "cannot chdir to TEST_MNT"
- run_check $SUDO_HELPER $TOP/btrfs subvolume create subv1
+ run_check $SUDO_HELPER "$TOP/btrfs" subvolume create subv1
for i in 1 2 3; do
run_check $SUDO_HELPER dd if=/dev/zero of=subv1/file1_$i bs=1M count=1
done
- run_check $SUDO_HELPER $TOP/btrfs subvolume snapshot -r subv1 subv1-snap
+ run_check $SUDO_HELPER "$TOP/btrfs" subvolume snapshot -r subv1 subv1-snap
truncate -s0 "$str"
chmod a+w "$str"
- run_check $SUDO_HELPER $TOP/btrfs send -f "$str" subv1-snap
+ run_check $SUDO_HELPER "$TOP/btrfs" send -f "$str" subv1-snap
cd "$here" || _fail "cannot chdir back to test directory"
run_check_umount_test_dev
- run_check $TOP/mkfs.btrfs -f $TEST_DEV
+ run_check "$TOP/mkfs.btrfs" -f "$TEST_DEV"
run_check_mount_test_dev
- run_check $SUDO_HELPER $TOP/btrfs receive "$@" -v -f "$str" "$TEST_MNT"
+ run_check $SUDO_HELPER "$TOP/btrfs" receive "$@" -v -f "$str" "$TEST_MNT"
run_check_umount_test_dev
run_check rm -f -- "$str"
@@ -79,27 +79,27 @@ test_incr_empty_stream() {
fstr="$here/stream-full-empty.stream"
istr="$here/stream-incr-empty.stream"
- run_check $TOP/mkfs.btrfs -f $TEST_DEV
+ run_check "$TOP/mkfs.btrfs" -f "$TEST_DEV"
run_check_mount_test_dev
cd "$TEST_MNT" || _fail "cannot chdir to TEST_MNT"
- run_check $SUDO_HELPER $TOP/btrfs subvolume create subv1
- run_check $SUDO_HELPER $TOP/btrfs subvolume snapshot -r subv1 subv1-snap
- run_check $SUDO_HELPER $TOP/btrfs subvolume snapshot -r subv1 subv2-snap
+ run_check $SUDO_HELPER "$TOP/btrfs" subvolume create subv1
+ run_check $SUDO_HELPER "$TOP/btrfs" subvolume snapshot -r subv1 subv1-snap
+ run_check $SUDO_HELPER "$TOP/btrfs" subvolume snapshot -r subv1 subv2-snap
truncate -s0 "$fstr" "$istr"
chmod a+w "$fstr" "$istr"
- run_check $SUDO_HELPER $TOP/btrfs send -f "$fstr" subv1-snap
- run_check $SUDO_HELPER $TOP/btrfs send -p subv1-snap -f "$istr" subv2-snap
+ run_check $SUDO_HELPER "$TOP/btrfs" send -f "$fstr" subv1-snap
+ run_check $SUDO_HELPER "$TOP/btrfs" send -p subv1-snap -f "$istr" subv2-snap
cd "$here" || _fail "cannot chdir back to test directory"
run_check_umount_test_dev
- run_check $TOP/mkfs.btrfs -f $TEST_DEV
+ run_check "$TOP/mkfs.btrfs" -f "$TEST_DEV"
run_check_mount_test_dev
- run_check $SUDO_HELPER $TOP/btrfs receive "$@" -v -f "$fstr" "$TEST_MNT"
- run_check $SUDO_HELPER $TOP/btrfs receive "$@" -v -f "$istr" "$TEST_MNT"
+ run_check $SUDO_HELPER "$TOP/btrfs" receive "$@" -v -f "$fstr" "$TEST_MNT"
+ run_check $SUDO_HELPER "$TOP/btrfs" receive "$@" -v -f "$istr" "$TEST_MNT"
run_check_umount_test_dev
run_check rm -f -- "$fstr" "$istr"
@@ -110,36 +110,36 @@ test_incr_simple_stream() {
fstr="$here/stream-full-simple.stream"
istr="$here/stream-incr-simple.stream"
- run_check $TOP/mkfs.btrfs -f $TEST_DEV
+ run_check "$TOP/mkfs.btrfs" -f "$TEST_DEV"
run_check_mount_test_dev
cd "$TEST_MNT" || _fail "cannot chdir to TEST_MNT"
- run_check $SUDO_HELPER $TOP/btrfs subvolume create subv1
+ run_check $SUDO_HELPER "$TOP/btrfs" subvolume create subv1
for i in 1 2 3; do
run_check $SUDO_HELPER dd if=/dev/zero of=subv1/file1_$i bs=1M count=1
done
- run_check $SUDO_HELPER $TOP/btrfs subvolume snapshot -r subv1 subv1-snap
+ run_check $SUDO_HELPER "$TOP/btrfs" subvolume snapshot -r subv1 subv1-snap
for i in 1 2 3; do
run_check $SUDO_HELPER dd if=/dev/urandom of=subv1/file1_$i bs=1M count=1
done
- run_check $SUDO_HELPER $TOP/btrfs subvolume snapshot -r subv1 subv2-snap
+ run_check $SUDO_HELPER "$TOP/btrfs" subvolume snapshot -r subv1 subv2-snap
truncate -s0 "$fstr" "$istr"
chmod a+w "$fstr" "$istr"
- run_check $SUDO_HELPER $TOP/btrfs send -f "$fstr" subv1-snap
- run_check $SUDO_HELPER $TOP/btrfs send -p subv1-snap -f "$istr" subv2-snap
+ run_check $SUDO_HELPER "$TOP/btrfs" send -f "$fstr" subv1-snap
+ run_check $SUDO_HELPER "$TOP/btrfs" send -p subv1-snap -f "$istr" subv2-snap
cd "$here" || _fail "cannot chdir back to test directory"
run_check_umount_test_dev
- run_check $TOP/mkfs.btrfs -f $TEST_DEV
+ run_check "$TOP/mkfs.btrfs" -f "$TEST_DEV"
run_check_mount_test_dev
- run_check $SUDO_HELPER $TOP/btrfs receive "$@" -v -f "$fstr" "$TEST_MNT"
- run_check $SUDO_HELPER $TOP/btrfs receive "$@" -v -f "$istr" "$TEST_MNT"
+ run_check $SUDO_HELPER "$TOP/btrfs" receive "$@" -v -f "$fstr" "$TEST_MNT"
+ run_check $SUDO_HELPER "$TOP/btrfs" receive "$@" -v -f "$istr" "$TEST_MNT"
run_check_umount_test_dev
run_check rm -f -- "$fstr" "$istr"
@@ -151,7 +151,7 @@ test_incr_empty_stream
test_incr_simple_stream
extra_opt=-e
-test_full_empty_stream $extra_opt
-test_full_simple_stream $extra_opt
-test_incr_empty_stream $extra_opt
-test_incr_simple_stream $extra_opt
+test_full_empty_stream "$extra_opt"
+test_full_simple_stream "$extra_opt"
+test_incr_empty_stream "$extra_opt"
+test_incr_simple_stream "$extra_opt"