btrfs-progs: tests: fix fsck-tests/059 to run without root
We missed a couple of $SUDO_HELPER uses in this test that made it impossible to run without root. Add them in so we can run as a normal user. Reviewed-by: Neal Gompa <neal@gompa.dev> Signed-off-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
63565db53b
commit
0001f0a735
|
@ -14,7 +14,7 @@ _mktemp_local "$file" 1g
|
||||||
|
|
||||||
dev=$(run_check_stdout $SUDO_HELPER losetup --find --show "$file")
|
dev=$(run_check_stdout $SUDO_HELPER losetup --find --show "$file")
|
||||||
|
|
||||||
run_check "$TOP/mkfs.btrfs" -f "$dev"
|
run_check $SUDO_HELPER "$TOP/mkfs.btrfs" -f "$dev"
|
||||||
|
|
||||||
# The original device size from prepare_loopdevs is 2G.
|
# The original device size from prepare_loopdevs is 2G.
|
||||||
# Since the fs is empty, shrinking it to 996m will not cause any
|
# Since the fs is empty, shrinking it to 996m will not cause any
|
||||||
|
@ -26,5 +26,5 @@ dev=$(run_check_stdout $SUDO_HELPER losetup --find --show "$file")
|
||||||
run_mustfail "btrfs check should detect errors in device size" \
|
run_mustfail "btrfs check should detect errors in device size" \
|
||||||
"$TOP/btrfs" check "$dev"
|
"$TOP/btrfs" check "$dev"
|
||||||
|
|
||||||
losetup -d "$dev"
|
$SUDO_HELPER losetup -d "$dev"
|
||||||
rm -- "$file"
|
rm -- "$file"
|
||||||
|
|
Loading…
Reference in New Issue