diff --git a/tests/zfs-tests/tests/perf/regression/random_reads.ksh b/tests/zfs-tests/tests/perf/regression/random_reads.ksh index 0e9187f6d..2203d649c 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 c360cd5b7..50bf2b08e 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 3e5d0f59e..186232e19 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 75680e089..52c9631d1 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 54a4d4ac8..9dfbe0663 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 bbc053abc..6b147f0f2 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 7865afa20..905723e5a 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