@@ -14,7 +14,7 @@ _mktemp_local "$file" 1g
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.
# 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" \
"$TOP/btrfs" check "$dev"
-losetup -d "$dev"
+$SUDO_HELPER losetup -d "$dev"
rm -- "$file"
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. Signed-off-by: Josef Bacik <josef@toxicpanda.com> --- tests/fsck-tests/059-shrunk-device/test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)