diff --git a/tests/zfs-tests/tests/perf/regression/random_reads.ksh b/tests/zfs-tests/tests/perf/regression/random_reads.ksh index 0e9187f6d8..2203d649c1 100755 --- a/tests/zfs-tests/tests/perf/regression/random_reads.ksh +++ b/tests/zfs-tests/tests/perf/regression/random_reads.ksh @@ -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 diff --git a/tests/zfs-tests/tests/perf/regression/random_readwrite.ksh b/tests/zfs-tests/tests/perf/regression/random_readwrite.ksh index c360cd5b7a..50bf2b08e0 100755 --- a/tests/zfs-tests/tests/perf/regression/random_readwrite.ksh +++ b/tests/zfs-tests/tests/perf/regression/random_readwrite.ksh @@ -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 diff --git a/tests/zfs-tests/tests/perf/regression/random_writes.ksh b/tests/zfs-tests/tests/perf/regression/random_writes.ksh index 3e5d0f59eb..186232e198 100755 --- a/tests/zfs-tests/tests/perf/regression/random_writes.ksh +++ b/tests/zfs-tests/tests/perf/regression/random_writes.ksh @@ -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 diff --git a/tests/zfs-tests/tests/perf/regression/sequential_reads.ksh b/tests/zfs-tests/tests/perf/regression/sequential_reads.ksh index 75680e0896..52c9631d18 100755 --- a/tests/zfs-tests/tests/perf/regression/sequential_reads.ksh +++ b/tests/zfs-tests/tests/perf/regression/sequential_reads.ksh @@ -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 diff --git a/tests/zfs-tests/tests/perf/regression/sequential_reads_cached.ksh b/tests/zfs-tests/tests/perf/regression/sequential_reads_cached.ksh index 54a4d4ac85..9dfbe0663d 100755 --- a/tests/zfs-tests/tests/perf/regression/sequential_reads_cached.ksh +++ b/tests/zfs-tests/tests/perf/regression/sequential_reads_cached.ksh @@ -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 diff --git a/tests/zfs-tests/tests/perf/regression/sequential_reads_cached_clone.ksh b/tests/zfs-tests/tests/perf/regression/sequential_reads_cached_clone.ksh index bbc053abca..6b147f0f24 100755 --- a/tests/zfs-tests/tests/perf/regression/sequential_reads_cached_clone.ksh +++ b/tests/zfs-tests/tests/perf/regression/sequential_reads_cached_clone.ksh @@ -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 diff --git a/tests/zfs-tests/tests/perf/regression/sequential_writes.ksh b/tests/zfs-tests/tests/perf/regression/sequential_writes.ksh index 7865afa201..905723e5a1 100755 --- a/tests/zfs-tests/tests/perf/regression/sequential_writes.ksh +++ b/tests/zfs-tests/tests/perf/regression/sequential_writes.ksh @@ -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