forked from Mirrors/btrfs-progs
btrfs-progs: tests: speed up fsck/037 free space tree test
The runtime of the test is over 4 minutes when hosted on NFS, the fallocate phase takes the most time. As fallocate can't take multiple arguments, we can't save the overhead by creating the files at once. Create the files in batches in the background, this improves the runtime to 2 minutes. Signed-off-by: David Sterba <dsterba@suse.com>master
parent
f7f1700b58
commit
4a654aead4
|
@ -59,8 +59,11 @@ run_check "$TOP/mkfs.btrfs" -n 4k -f "$TEST_DEV"
|
|||
run_check_mount_test_dev -oclear_cache,space_cache=v2
|
||||
|
||||
# create files which will populate the FST
|
||||
for i in {1..3000}; do
|
||||
run_check $SUDO_HELPER fallocate -l 4k "$TEST_MNT/file.$i"
|
||||
for i in {0..9}; do
|
||||
for j in {1..300}; do
|
||||
run_check $SUDO_HELPER fallocate -l 4k "$TEST_MNT/file.$j$i" &
|
||||
done
|
||||
wait
|
||||
done
|
||||
|
||||
run_check_umount_test_dev
|
||||
|
|
Loading…
Reference in New Issue