summaryrefslogtreecommitdiff
path: root/tests/misc-tests/028-superblock-recover/test.sh
diff options
context:
space:
mode:
authorDimitri John Ledkov <xnox@ubuntu.com>2018-05-08 14:17:29 -0700
committerDimitri John Ledkov <xnox@ubuntu.com>2018-05-08 14:17:29 -0700
commitd00c9550da1801a0eaff5cedf4312e24691b31ea (patch)
tree3881ca1764ef792259e1b70f12c884a3ac0c0715 /tests/misc-tests/028-superblock-recover/test.sh
parentdab6d2181f1f194ec3a76d900cf2c6533379cbea (diff)
New upstream release.
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