summaryrefslogtreecommitdiff
path: root/tests/misc-tests/028-superblock-recover/test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/misc-tests/028-superblock-recover/test.sh')
-rwxr-xr-xtests/misc-tests/028-superblock-recover/test.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/misc-tests/028-superblock-recover/test.sh b/tests/misc-tests/028-superblock-recover/test.sh
index 1175e480..ee117d0f 100755
--- a/tests/misc-tests/028-superblock-recover/test.sh
+++ b/tests/misc-tests/028-superblock-recover/test.sh
@@ -1,7 +1,7 @@
#!/bin/bash
# Test that any superblock is correctly detected and fixed by btrfs rescue
-source "$TOP/tests/common"
+source "$TEST_TOP/common"
check_prereq btrfs
check_prereq mkfs.btrfs
@@ -25,9 +25,9 @@ function check_corruption {
run_check $SUDO_HELPER dd bs=1K count=1 seek=$(($sb_offset + 1)) if=/dev/zero of="$TEST_DEV" conv=notrunc
# if corrupting one of the sb copies, copy it over the initial superblock
- if [ ! -z $source_sb ]; then
+ if [ ! -z "$source_sb" ]; then
local shift_val=$((16 << $source_sb * 12 ))
- run_check $SUDO_HELPER dd bs=1K count=4 seek=64 skip=$shift_val if="$TEST_DEV" of="$TEST_DEV" conv=notrunc
+ run_check $SUDO_HELPER dd bs=1K count=4 seek=64 skip="$shift_val" if="$TEST_DEV" of="$TEST_DEV" conv=notrunc
fi
# we can't use our mount helper, the following works for file image and