Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZTS: rsend tests #12876

Closed
wants to merge 2 commits into from
Closed

ZTS: rsend tests #12876

wants to merge 2 commits into from

Conversation

behlendorf
Copy link
Contributor

@behlendorf behlendorf commented Dec 18, 2021

Motivation and Context

Assess the long standing rsend test failures which have been added
to the exceptions file to determine if they're still applicable to the latest
code. Additionally, do a little tweaking while here to speed up the test
group.

Description

See commits for additional details.

64f1cb2 ZTS: speed up rsend tests
ef6dda8 ZTS: rsend_007_pos failures

Note that for the rsend_007_pos change I haven't carefully investigated
why this avoids the issue on Linux (it is not needed for FreeBSD). However, I
wanted to get this open for CI to have a crack at it and thought others might
have some ideas.

[Update] This minor addition does seem to reliably avoid the issue.

How Has This Been Tested?

Locally running the rsend test group on Ubuntu 20.04. The tests
reliably pass in my testing, this PR has been opened to verify that
is the case on all other test platforms.

$ ./scripts/zfs-tests.sh -T rsend
Test: /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/setup (run as root) [00:02] [PASS]
Test: /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/recv_dedup (run as root) [00:00] [PASS]
Test: /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/recv_dedup_encrypted_zvol (run as root) [00:06] [PASS]
Test: /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/rsend_001_pos (run as root) [00:04] [PASS]
Test: /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/rsend_002_pos (run as root) [00:03] [PASS]
Test: /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/rsend_003_pos (run as root) [00:03] [PASS]
Test: /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/rsend_004_pos (run as root) [00:06] [PASS]
Test: /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/rsend_005_pos (run as root) [00:08] [PASS]
Test: /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/rsend_006_pos (run as root) [00:05] [PASS]
Test: /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/rsend_007_pos (run as root) [00:08] [PASS]
Test: /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/rsend_008_pos (run as root) [00:00] [SKIP]
Test: /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/rsend_009_pos (run as root) [00:03] [PASS]
Test: /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/rsend_010_pos (run as root) [00:00] [PASS]
Test: /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/rsend_011_pos (run as root) [00:05] [PASS]
Test: /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/rsend_012_pos (run as root) [00:14] [PASS]
Test: /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/rsend_013_pos (run as root) [00:08] [PASS]
Test: /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/rsend_014_pos (run as root) [00:05] [PASS]
Test: /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/rsend_016_neg (run as root) [00:00] [PASS]
Test: /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/rsend_019_pos (run as root) [00:29] [PASS]
Test: /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/rsend_020_pos (run as root) [00:12] [PASS]
Test: /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/rsend_021_pos (run as root) [00:14] [PASS]
Test: /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/rsend_022_pos (run as root) [00:13] [PASS]
Test: /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/rsend_024_pos (run as root) [00:13] [PASS]
Test: /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/send-c_verify_ratio (run as root) [01:01] [PASS]
Test: /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/send-c_verify_contents (run as root) [00:04] [PASS]
Test: /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/send-c_props (run as root) [00:20] [PASS]
Test: /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/send-c_incremental (run as root) [00:11] [PASS]
Test: /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/send-c_volume (run as root) [00:03] [PASS]
Test: /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/send-c_zstreamdump (run as root) [00:02] [PASS]
Test: /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/send-c_lz4_disabled (run as root) [00:13] [PASS]
Test: /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/send-c_recv_lz4_disabled (run as root) [00:16] [PASS]
Test: /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/send-c_mixed_compression (run as root) [00:13] [PASS]
Test: /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/send-c_stream_size_estimate (run as root) [00:08] [PASS]
Test: /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/send-c_embedded_blocks (run as root) [00:30] [PASS]
Test: /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/send-c_resume (run as root) [00:14] [PASS]
Test: /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/send-cpL_varied_recsize (run as root) [00:22] [PASS]
Test: /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/send-c_recv_dedup (run as root) [00:00] [PASS]
Test: /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/send-L_toggle (run as root) [00:01] [PASS]
Test: /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/send_encrypted_hierarchy (run as root) [00:05] [PASS]
Test: /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/send_encrypted_props (run as root) [00:05] [PASS]
Test: /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/send_encrypted_truncated_files (run as root) [00:01] [PASS]
Test: /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/send_freeobjects (run as root) [00:00] [PASS]
Test: /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/send_realloc_files (run as root) [01:07] [PASS]
Test: /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/send_realloc_encrypted_files (run as root) [01:07] [PASS]
Test: /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/send_spill_block (run as root) [00:53] [PASS]
Test: /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/send_holds (run as root) [00:02] [PASS]
Test: /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/send_hole_birth (run as root) [00:14] [PASS]
Test: /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/send_mixed_raw (run as root) [00:03] [PASS]
Test: /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/send-wR_encrypted_zvol (run as root) [00:03] [PASS]
Test: /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/send_partial_dataset (run as root) [00:02] [PASS]
Test: /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/send_invalid (run as root) [00:00] [PASS]
Test: /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/send_doall (run as root) [00:00] [PASS]
Test: /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/cleanup (run as root) [00:00] [PASS]
Test (Linux): /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/setup (run as root) [00:02] [PASS]
Test (Linux): /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/send_realloc_dnode_size (run as root) [00:07] [PASS]
Test (Linux): /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/send_encrypted_files (run as root) [00:21] [PASS]
Test (Linux): /home/ubuntu/zfs/tests/zfs-tests/tests/functional/rsend/cleanup (run as root) [00:00] [PASS]

Results Summary
PASS      56
SKIP       1

Running Time:   00:10:56
Percent passed: 98.2%
Log directory:  /var/tmp/test_results/20211217T234122

Tests with results other than PASS that are expected:
    SKIP rsend/rsend_008_pos (https://github.com/openzfs/zfs/issues/6066)

Tests with result of PASS that are unexpected:

Tests with results other than PASS that are unexpected:

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

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 <[email protected]>
@behlendorf behlendorf added Component: Test Suite Indicates an issue with the test framework or a test case Status: Code Review Needed Ready for review and testing labels Dec 18, 2021
@behlendorf behlendorf changed the title Zfs rsend ZTS: rsend tests Dec 18, 2021
@behlendorf behlendorf marked this pull request as ready for review December 20, 2021 18:44
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 <[email protected]>
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice to get those off the list!

@@ -121,6 +121,7 @@ function cleanup_pool
log_must rm -rf $BACKDIR/*

if is_global_zone ; then
log_must df >/dev/null
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this some magic?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's terrible, terrible black magic. I'm not sure why it avoids the issue, but it does.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #12898 for the reason this works. I've used that PR to add a comment here which references the root issue, at least until it's properly addressed.

@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Dec 21, 2021
behlendorf added a commit that referenced this pull request Dec 21, 2021
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.

Reviewed-by: Tony Nguyen <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #12876
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Feb 10, 2022
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.

Reviewed-by: Tony Nguyen <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes openzfs#5665
Closes openzfs#6086
Closes openzfs#6087
Closes openzfs#6446
Closes openzfs#12876
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Feb 10, 2022
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.

Reviewed-by: Tony Nguyen <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes openzfs#12876
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Feb 14, 2022
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.

Reviewed-by: Tony Nguyen <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes openzfs#5665
Closes openzfs#6086
Closes openzfs#6087
Closes openzfs#6446
Closes openzfs#12876
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Feb 14, 2022
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.

Reviewed-by: Tony Nguyen <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes openzfs#12876
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Feb 16, 2022
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.

Reviewed-by: Tony Nguyen <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes openzfs#5665
Closes openzfs#6086
Closes openzfs#6087
Closes openzfs#6446
Closes openzfs#12876
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Feb 16, 2022
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.

Reviewed-by: Tony Nguyen <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes openzfs#12876
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Feb 17, 2022
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.

Reviewed-by: Tony Nguyen <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes openzfs#5665
Closes openzfs#6086
Closes openzfs#6087
Closes openzfs#6446
Closes openzfs#12876
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Feb 17, 2022
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.

Reviewed-by: Tony Nguyen <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes openzfs#12876
nicman23 pushed a commit to nicman23/zfs that referenced this pull request Aug 22, 2022
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.

Reviewed-by: Tony Nguyen <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes openzfs#5665
Closes openzfs#6086
Closes openzfs#6087
Closes openzfs#6446
Closes openzfs#12876
nicman23 pushed a commit to nicman23/zfs that referenced this pull request Aug 22, 2022
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.

Reviewed-by: Tony Nguyen <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes openzfs#12876
nicman23 pushed a commit to nicman23/zfs that referenced this pull request Aug 22, 2022
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.

Reviewed-by: Tony Nguyen <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes openzfs#5665
Closes openzfs#6086
Closes openzfs#6087
Closes openzfs#6446
Closes openzfs#12876
nicman23 pushed a commit to nicman23/zfs that referenced this pull request Aug 22, 2022
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.

Reviewed-by: Tony Nguyen <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes openzfs#12876
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Test Suite Indicates an issue with the test framework or a test case Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants