From ef6dda845229d7d587e17a06709a89e6dbc44256 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 17 Dec 2021 23:20:10 +0000 Subject: [PATCH 1/2] ZTS: rsend_007_pos failures The rsend_007_pos test reliably fails on Linux in the cleanup function. This is caused by an unmount error when attempting to recursively destroy the newly received datasets. Invoking `df` prior to the `zfs destroy` interestingly avoids the unmont error. Why this should matter is unclear and should be investigated. However, this minor tweak may allow us to remove the ZTS rsend exceptions. The subsequent rsend_010_pos and rsend_011_pos failures were a result of this initial failure. The other "maybe" failures I was unable to reproduce and have not been recently observed in the master branch. Signed-off-by: Brian Behlendorf --- tests/test-runner/bin/zts-report.py.in | 9 --------- tests/zfs-tests/tests/functional/rsend/rsend.kshlib | 1 + 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/tests/test-runner/bin/zts-report.py.in b/tests/test-runner/bin/zts-report.py.in index da22ae7be0a4..4c2735152f53 100755 --- a/tests/test-runner/bin/zts-report.py.in +++ b/tests/test-runner/bin/zts-report.py.in @@ -250,12 +250,6 @@ maybe = { 'removal/removal_condense_export': ['FAIL', known_reason], 'reservation/reservation_008_pos': ['FAIL', '7741'], 'reservation/reservation_018_pos': ['FAIL', '5642'], - 'rsend/rsend_019_pos': ['FAIL', '6086'], - 'rsend/rsend_020_pos': ['FAIL', '6446'], - 'rsend/rsend_021_pos': ['FAIL', '6446'], - 'rsend/rsend_024_pos': ['FAIL', '5665'], - 'rsend/send-c_volume': ['FAIL', '6087'], - 'rsend/send_partial_dataset': ['FAIL', known_reason], 'snapshot/clone_001_pos': ['FAIL', known_reason], 'snapshot/snapshot_009_pos': ['FAIL', '7961'], 'snapshot/snapshot_010_pos': ['FAIL', '7961'], @@ -301,9 +295,6 @@ elif sys.platform.startswith('linux'): 'mmp/mmp_exported_import': ['FAIL', known_reason], 'mmp/mmp_inactive_import': ['FAIL', known_reason], 'refreserv/refreserv_raidz': ['FAIL', known_reason], - 'rsend/rsend_007_pos': ['FAIL', known_reason], - 'rsend/rsend_010_pos': ['FAIL', known_reason], - 'rsend/rsend_011_pos': ['FAIL', known_reason], 'snapshot/rollback_003_pos': ['FAIL', known_reason], 'zvol/zvol_misc/zvol_misc_snapdev': ['FAIL', '12621'], 'zvol/zvol_misc/zvol_misc_volmode': ['FAIL', known_reason], diff --git a/tests/zfs-tests/tests/functional/rsend/rsend.kshlib b/tests/zfs-tests/tests/functional/rsend/rsend.kshlib index d06bd39b4d49..8cd35e4afdfe 100644 --- a/tests/zfs-tests/tests/functional/rsend/rsend.kshlib +++ b/tests/zfs-tests/tests/functional/rsend/rsend.kshlib @@ -121,6 +121,7 @@ function cleanup_pool log_must rm -rf $BACKDIR/* if is_global_zone ; then + log_must df >/dev/null log_must_busy zfs destroy -Rf $pool else typeset list=$(zfs list -H -r -t all -o name $pool) From c565caed4c114e506f5a804425b500777c09a21b Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 17 Dec 2021 23:29:23 +0000 Subject: [PATCH 2/2] ZTS: speed up rsend tests With some minor tweaks several of rsend tests can be sped up considerably without significantly reducing test coverage. * send-c_verify_ratio: ~120s -> ~60s * send_realloc_*_files: ~330s -> ~65s For the send_realloc* tests this also has the advantage of removing (most of) the linux/freebsd conditional logic. Note that for this test more passes, and thus more incremental send/recvs, are preferable to a larger number of files. Total run time of the rsend test group was reduced from roughly 20 to 11 minutes in an environment similar to what's used by the CI. Signed-off-by: Brian Behlendorf --- .../tests/functional/rsend/send-c_verify_ratio.ksh | 2 +- .../tests/functional/rsend/send_realloc_encrypted_files.ksh | 6 +----- .../zfs-tests/tests/functional/rsend/send_realloc_files.ksh | 6 +----- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/tests/zfs-tests/tests/functional/rsend/send-c_verify_ratio.ksh b/tests/zfs-tests/tests/functional/rsend/send-c_verify_ratio.ksh index b7d978624f2b..845349a95873 100755 --- a/tests/zfs-tests/tests/functional/rsend/send-c_verify_ratio.ksh +++ b/tests/zfs-tests/tests/functional/rsend/send-c_verify_ratio.ksh @@ -36,7 +36,7 @@ log_assert "Verify send -c streams are compressed" log_onexit cleanup_pool $POOL2 typeset sendfs=$POOL2/$FS -typeset megs=128 +typeset megs=64 for prop in "${compress_prop_vals[@]}"; do for compressible in 'yes' 'no'; do diff --git a/tests/zfs-tests/tests/functional/rsend/send_realloc_encrypted_files.ksh b/tests/zfs-tests/tests/functional/rsend/send_realloc_encrypted_files.ksh index a653f8b3f15e..361f6b375ea1 100755 --- a/tests/zfs-tests/tests/functional/rsend/send_realloc_encrypted_files.ksh +++ b/tests/zfs-tests/tests/functional/rsend/send_realloc_encrypted_files.ksh @@ -72,12 +72,8 @@ if is_kmemleak; then # to avoid timeout due to reduced performance. nr_files=100 passes=2 -elif is_freebsd; then - # Use fewer files and passes on FreeBSD to avoid timeout. - nr_files=500 - passes=2 else - nr_files=1000 + nr_files=300 passes=3 fi diff --git a/tests/zfs-tests/tests/functional/rsend/send_realloc_files.ksh b/tests/zfs-tests/tests/functional/rsend/send_realloc_files.ksh index 083a2bec9daa..187a899a23c6 100755 --- a/tests/zfs-tests/tests/functional/rsend/send_realloc_files.ksh +++ b/tests/zfs-tests/tests/functional/rsend/send_realloc_files.ksh @@ -64,12 +64,8 @@ if is_kmemleak; then # to avoid timeout due to reduced performance. nr_files=100 passes=2 -elif is_freebsd; then - # Use fewer passes and files on FreeBSD to avoid timeout. - nr_files=500 - passes=2 else - nr_files=1000 + nr_files=300 passes=3 fi