diff mbox series

[4/4] btrfs-progs: fix fsck-tests/060 to run without root

Message ID 9fcda5f1661f9c15fe9514f3d8aa0e34a9f9b23c.1681150198.git.josef@toxicpanda.com (mailing list archive)
State New, archived
Headers show
Series btrfs-progs: make some of the fsck-tests run without root | expand

Commit Message

Josef Bacik April 10, 2023, 6:11 p.m. UTC
We need to call the setup_root_helper before we start messing with the
loop devices.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
---
 tests/fsck-tests/060-degraded-check/test.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/tests/fsck-tests/060-degraded-check/test.sh b/tests/fsck-tests/060-degraded-check/test.sh
index 6a1f50c8..f185a655 100755
--- a/tests/fsck-tests/060-degraded-check/test.sh
+++ b/tests/fsck-tests/060-degraded-check/test.sh
@@ -10,14 +10,14 @@  check_prereq mkfs.btrfs
 check_global_prereq losetup
 check_global_prereq wipefs
 
+setup_root_helper
+
 setup_loopdevs 3
 prepare_loopdevs
 dev1=${loopdevs[1]}
 dev2=${loopdevs[2]}
 dev3=${loopdevs[3]}
 
-setup_root_helper
-
 # Run 1: victim is dev1
 run_check $SUDO_HELPER "$TOP/mkfs.btrfs" -f -m raid5 -d raid5 "${loopdevs[@]}"
 run_check $SUDO_HELPER wipefs -fa $dev1