diff --git a/tests/misc-tests/006-image-on-missing-device/test.sh b/tests/misc-tests/006-image-on-missing-device/test.sh index 83a6a056..8133d2b1 100755 --- a/tests/misc-tests/006-image-on-missing-device/test.sh +++ b/tests/misc-tests/006-image-on-missing-device/test.sh @@ -60,12 +60,12 @@ test_run() run_check $SUDO_HELPER umount $TEST_MNT test_image_dump - run_check $TOP/btrfs filesystem show $dev1 + run_check $SUDO_HELPER $TOP/btrfs filesystem show $dev1 # create a degraded raid1 filesystem, check must succeed # btrfs-image must not loop run_mayfail wipefs -a $dev2 run_check $SUDO_HELPER losetup -d $dev2 - run_check $TOP/btrfs filesystem show $dev1 + run_check $SUDO_HELPER $TOP/btrfs filesystem show $dev1 test_image_dump } diff --git a/tests/misc-tests/010-convert-delete-ext2-subvol/test.sh b/tests/misc-tests/010-convert-delete-ext2-subvol/test.sh index 7bf7be34..7915867c 100755 --- a/tests/misc-tests/010-convert-delete-ext2-subvol/test.sh +++ b/tests/misc-tests/010-convert-delete-ext2-subvol/test.sh @@ -14,11 +14,11 @@ prepare_test_dev run_check truncate -s 2G "$TEST_DEV" run_check mkfs.ext4 -F "$TEST_DEV" run_check $TOP/btrfs-convert "$TEST_DEV" -run_check $TOP/btrfs inspect-internal dump-tree "$TEST_DEV" +run_check $SUDO_HELPER $TOP/btrfs inspect-internal dump-tree "$TEST_DEV" run_check_mount_test_dev run_check $SUDO_HELPER $TOP/btrfs subvolume delete -c "$TEST_MNT/ext2_saved" run_check_umount_test_dev -run_check $TOP/btrfs inspect-internal dump-tree "$TEST_DEV" +run_check $SUDO_HELPER $TOP/btrfs inspect-internal dump-tree "$TEST_DEV" run_check_stdout $TOP/btrfs-convert --rollback "$TEST_DEV" | grep -q 'is it deleted' || _fail "unexpected rollback" diff --git a/tests/misc-tests/011-delete-missing-device/test.sh b/tests/misc-tests/011-delete-missing-device/test.sh index 57e88745..0222b6f8 100755 --- a/tests/misc-tests/011-delete-missing-device/test.sh +++ b/tests/misc-tests/011-delete-missing-device/test.sh @@ -38,16 +38,16 @@ cleanup_devices() test_do_mkfs() { run_check $SUDO_HELPER $TOP/mkfs.btrfs -f $@ ${devs[@]} - run_check $TOP/btrfs inspect-internal dump-super $dev1 + run_check $SUDO_HELPER $TOP/btrfs inspect-internal dump-super $dev1 run_check $SUDO_HELPER $TOP/btrfs check $dev1 - run_check $TOP/btrfs filesystem show + run_check $SUDO_HELPER $TOP/btrfs filesystem show } test_wipefs() { - run_check wipefs -a $devtodel + run_check $SUDO_HELPER wipefs -a $devtodel run_check $SUDO_HELPER losetup -d $devtodel - run_check losetup -a + run_check $SUDO_HELPER losetup --all run_check $TOP/btrfs filesystem show } test_delete_missing() diff --git a/tests/mkfs-tests/001-basic-profiles/test.sh b/tests/mkfs-tests/001-basic-profiles/test.sh index e893887f..eb55148d 100755 --- a/tests/mkfs-tests/001-basic-profiles/test.sh +++ b/tests/mkfs-tests/001-basic-profiles/test.sh @@ -37,7 +37,7 @@ cleanup_devices() test_get_info() { - run_check $TOP/btrfs inspect-internal dump-super $dev1 + run_check $SUDO_HELPER $TOP/btrfs inspect-internal dump-super $dev1 run_check $SUDO_HELPER $TOP/btrfs check $dev1 run_check $SUDO_HELPER mount $dev1 $TEST_MNT run_check $TOP/btrfs filesystem df $TEST_MNT diff --git a/tests/mkfs-tests/005-long-device-name-for-ssd/test.sh b/tests/mkfs-tests/005-long-device-name-for-ssd/test.sh index 20387b83..63fb1785 100755 --- a/tests/mkfs-tests/005-long-device-name-for-ssd/test.sh +++ b/tests/mkfs-tests/005-long-device-name-for-ssd/test.sh @@ -32,7 +32,7 @@ run_check cat $rot # test run_check_stdout $SUDO_HELPER $TOP/mkfs.btrfs -f $@ $dmdev | grep -q 'SSD detected:.*yes' || _fail 'SSD not detected' -run_check $TOP/btrfs inspect-internal dump-super $dmdev +run_check $SUDO_HELPER $TOP/btrfs inspect-internal dump-super $dmdev # cleanup run_check $SUDO_HELPER dmsetup remove $dmname diff --git a/tests/mkfs-tests/006-partitioned-loopdev/test.sh b/tests/mkfs-tests/006-partitioned-loopdev/test.sh index e40dc675..4415b468 100755 --- a/tests/mkfs-tests/006-partitioned-loopdev/test.sh +++ b/tests/mkfs-tests/006-partitioned-loopdev/test.sh @@ -18,7 +18,7 @@ base=$(basename $loopdev) # expect partitions named like loop0p1 etc for looppart in $(ls /dev/$base?*); do run_check $SUDO_HELPER $TOP/mkfs.btrfs -f $looppart - run_check $TOP/btrfs inspect-internal dump-super $looppart + run_check $SUDO_HELPER $TOP/btrfs inspect-internal dump-super $looppart done # cleanup diff --git a/tests/mkfs-tests/007-mix-nodesize-sectorsize/test.sh b/tests/mkfs-tests/007-mix-nodesize-sectorsize/test.sh index 29d9be14..3980414f 100755 --- a/tests/mkfs-tests/007-mix-nodesize-sectorsize/test.sh +++ b/tests/mkfs-tests/007-mix-nodesize-sectorsize/test.sh @@ -12,7 +12,7 @@ prepare_test_dev test_mkfs_single() { run_check $SUDO_HELPER $TOP/mkfs.btrfs -f "$@" $TEST_DEV - run_check $TOP/btrfs inspect-internal dump-super $TEST_DEV + run_check $SUDO_HELPER $TOP/btrfs inspect-internal dump-super $TEST_DEV run_check $SUDO_HELPER $TOP/btrfs check $TEST_DEV }