aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiuseppe Di Natale <[email protected]>2016-11-28 16:24:47 -0800
committerBrian Behlendorf <[email protected]>2016-11-28 17:24:47 -0700
commit251cb8dfacb51b9ad7a0e3da305c0bc5bbc1cb9e (patch)
tree255c7d41759dcc427830fe671097cada0a6266aa
parentce4197c1ca987dad9cd1d65fc8c50226dd19d863 (diff)
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 <[email protected]> Signed-off-by: Giuseppe Di Natale <[email protected]> Requires-builders: all Closes #5407
-rwxr-xr-xtests/zfs-tests/tests/perf/regression/random_reads.ksh8
-rwxr-xr-xtests/zfs-tests/tests/perf/regression/random_readwrite.ksh8
-rwxr-xr-xtests/zfs-tests/tests/perf/regression/random_writes.ksh8
-rwxr-xr-xtests/zfs-tests/tests/perf/regression/sequential_reads.ksh8
-rwxr-xr-xtests/zfs-tests/tests/perf/regression/sequential_reads_cached.ksh8
-rwxr-xr-xtests/zfs-tests/tests/perf/regression/sequential_reads_cached_clone.ksh8
-rwxr-xr-xtests/zfs-tests/tests/perf/regression/sequential_writes.ksh8
7 files changed, 49 insertions, 7 deletions
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