summaryrefslogtreecommitdiff
path: root/tests/fsck-tests/025-file-extents
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2017-03-01 17:10:44 +0100
committerDavid Sterba <dsterba@suse.com>2017-03-08 13:00:49 +0100
commit62d4aa5fbabaa2068d2c25802c480070ac05aa26 (patch)
tree3daa132d10d2420cdc3812796a1c351dc794fabe /tests/fsck-tests/025-file-extents
parenteafdeff3e3842015cc356a1b890dac4265c94772 (diff)
btrfs-progs: tests: fix permissions of temporary files in 025-file-extents
If the tests are started from non-root user, the fallocate and xfs_io fail. Use the root helper as a workaround, we'd should fix the perms instead. Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tests/fsck-tests/025-file-extents')
-rwxr-xr-xtests/fsck-tests/025-file-extents/test.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/fsck-tests/025-file-extents/test.sh b/tests/fsck-tests/025-file-extents/test.sh
index cb64c500..37173ebd 100755
--- a/tests/fsck-tests/025-file-extents/test.sh
+++ b/tests/fsck-tests/025-file-extents/test.sh
@@ -18,9 +18,9 @@ test_paritical_write_into_prealloc()
run_check $SUDO_HELPER "$TOP/mkfs.btrfs" -f "$TEST_DEV"
run_check_mount_test_dev
- run_check fallocate -l 128K "$TEST_MNT/file"
+ run_check $SUDO_HELPER fallocate -l 128K "$TEST_MNT/file"
sync
- run_check xfs_io -c "pwrite 0 64K" "$TEST_MNT/file"
+ run_check $SUDO_HELPER xfs_io -c "pwrite 0 64K" "$TEST_MNT/file"
run_check_umount_test_dev
run_check "$TOP/btrfs" check "$TEST_DEV"
}
@@ -33,7 +33,7 @@ test_compressed_inline_extent()
run_check $SUDO_HELPER "$TOP/mkfs.btrfs" -f "$TEST_DEV"
run_check_mount_test_dev -o compress=lzo,max_inline=2048
- run_check xfs_io -f -c "pwrite 0 1K" "$TEST_MNT/file"
+ run_check $SUDO_HELPER xfs_io -f -c "pwrite 0 1K" "$TEST_MNT/file"
run_check_umount_test_dev
run_check "$TOP/btrfs" check "$TEST_DEV"
}