mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 19:19:32 +03:00
ZTS: Speed up write_dirs cleanup
The write_dirs tests fill a filesystem with a bunch of files until it is full. In cleanup the files are truncated and removed individually. These tests already take a while to run. It is quicker and easier to destroy the whole dataset and create a new one to replace it in the cleanup functions. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: John Kennedy <john.kennedy@delphix.com> Signed-off-by: Ryan Moeller <ryan@iXsystems.com> Closes #10098
This commit is contained in:
parent
fa23c5be88
commit
5a1abc4b5b
@ -47,11 +47,8 @@ verify_runnable "both"
|
||||
|
||||
function cleanup
|
||||
{
|
||||
for file in `find $TESTDIR -type f`; do
|
||||
cat /dev/null > $file
|
||||
done
|
||||
log_must sync
|
||||
log_must rm -rf $TESTDIR/*
|
||||
destroy_dataset $TESTPOOL/$TESTFS
|
||||
zfs create -o mountpoint=$TESTDIR $TESTPOOL/$TESTFS
|
||||
}
|
||||
|
||||
typeset -i retval=0
|
||||
|
@ -47,11 +47,8 @@ verify_runnable "both"
|
||||
|
||||
function cleanup
|
||||
{
|
||||
for file in `find $TESTDIR -type f`; do
|
||||
cat /dev/null > $file
|
||||
done
|
||||
log_must sync
|
||||
log_must rm -rf $TESTDIR/*
|
||||
destroy_dataset $TESTPOOL/$TESTFS
|
||||
zfs create -o mountpoint=$TESTDIR $TESTPOOL/$TESTFS
|
||||
}
|
||||
|
||||
typeset -i retval=0
|
||||
|
Loading…
Reference in New Issue
Block a user