Ensure that perf regression tests cleanup properly

Each test in the performance regression test suite
creates a pool and a dataset for use. Unfortunately,
these tests do not cleanup the pool and dataset
correctly once they complete. Each test now kills
fio and iostat, destroys the dataset, and finally
destroys the pool. Each test also now traps the
SIGTERM signal to handle cases where test-runner
kills a test.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Requires-builders: all
Closes #5407
This commit is contained in:
Giuseppe Di Natale 2016-11-28 16:24:47 -08:00 committed by Brian Behlendorf
parent ce4197c1ca
commit 251cb8dfac
7 changed files with 49 additions and 7 deletions

View File

@ -31,9 +31,15 @@
function cleanup
{
log_must $ZFS destroy $TESTFS
# kill fio and iostat
$PKILL ${FIO##*/}
$PKILL ${IOSTAT##*/}
log_must_busy $ZFS destroy $TESTFS
log_must_busy $ZPOOL destroy $PERFPOOL
}
trap "log_fail \"Measure IO stats during random read load\"" SIGTERM
log_assert "Measure IO stats during random read load"
log_onexit cleanup

View File

@ -31,9 +31,15 @@
function cleanup
{
log_must $ZFS destroy $TESTFS
# kill fio and iostat
$PKILL ${FIO##*/}
$PKILL ${IOSTAT##*/}
log_must_busy $ZFS destroy $TESTFS
log_must_busy $ZPOOL destroy $PERFPOOL
}
trap "log_fail \"Measure IO stats during random read load\"" SIGTERM
log_assert "Measure IO stats during random read-write load"
log_onexit cleanup

View File

@ -30,9 +30,15 @@
function cleanup
{
log_must $ZFS destroy $TESTFS
# kill fio and iostat
$PKILL ${FIO##*/}
$PKILL ${IOSTAT##*/}
log_must_busy $ZFS destroy $TESTFS
log_must_busy $ZPOOL destroy $PERFPOOL
}
trap "log_fail \"Measure IO stats during random read load\"" SIGTERM
log_assert "Measure IO stats during random write load"
log_onexit cleanup

View File

@ -31,9 +31,15 @@
function cleanup
{
log_must $ZFS destroy $TESTFS
# kill fio and iostat
$PKILL ${FIO##*/}
$PKILL ${IOSTAT##*/}
log_must_busy $ZFS destroy $TESTFS
log_must_busy $ZPOOL destroy $PERFPOOL
}
trap "log_fail \"Measure IO stats during random read load\"" SIGTERM
log_assert "Measure IO stats during sequential read load"
log_onexit cleanup

View File

@ -30,9 +30,15 @@
function cleanup
{
log_must $ZFS destroy $TESTFS
# kill fio and iostat
$PKILL ${FIO##*/}
$PKILL ${IOSTAT##*/}
log_must_busy $ZFS destroy $TESTFS
log_must_busy $ZPOOL destroy $PERFPOOL
}
trap "log_fail \"Measure IO stats during random read load\"" SIGTERM
log_assert "Measure IO stats during sequential read load"
log_onexit cleanup

View File

@ -36,9 +36,15 @@
function cleanup
{
log_must $ZFS destroy $TESTFS
# kill fio and iostat
$PKILL ${FIO##*/}
$PKILL ${IOSTAT##*/}
log_must_busy $ZFS destroy $TESTFS
log_must_busy $ZPOOL destroy $PERFPOOL
}
trap "log_fail \"Measure IO stats during random read load\"" SIGTERM
log_assert "Measure IO stats during sequential read load"
log_onexit cleanup

View File

@ -33,9 +33,15 @@ log_onexit cleanup
function cleanup
{
log_must $ZFS destroy $TESTFS
# kill fio and iostat
$PKILL ${FIO##*/}
$PKILL ${IOSTAT##*/}
log_must_busy $ZFS destroy $TESTFS
log_must_busy $ZPOOL destroy $PERFPOOL
}
trap "log_fail \"Measure IO stats during random read load\"" SIGTERM
export TESTFS=$PERFPOOL/testfs
recreate_perfpool
log_must $ZFS create $PERF_FS_OPTS $TESTFS