diff options
author | Brian Behlendorf <[email protected]> | 2019-11-18 13:05:56 -0800 |
---|---|---|
committer | GitHub <[email protected]> | 2019-11-18 13:05:56 -0800 |
commit | 7ae3f8dc8f1e075108f91ddf6fb16471d4a0f044 (patch) | |
tree | 14997e04e465358a9e4f6751a26ebf61ee767b93 /tests | |
parent | 41e1aa2a06f81640c3a3e1a6b12558d95887f662 (diff) |
Partially revert 5a6ac4c
Reinstate the zpl_revalidate() functionality to resolve a regression
where dentries for open files during a rollback are not invalidated.
The unrelated functionality for automatically unmounting .zfs/snapshots
was not reverted. Nor was the addition of shrink_dcache_sb() to the
zfs_resume_fs() function.
This issue was not immediately caught by the CI because the test case
intended to catch it was included in the list of ZTS tests which may
occasionally fail for unrelated reasons. Remove all of the rollback
tests from this list to help identify the frequency of any spurious
failures.
The rollback_003_pos.ksh test case exposes a real issue with the
long standing code which needs to be investigated. Regardless,
it has been enable with a small workaround in the test case itself.
Reviewed-by: Matt Ahrens <[email protected]>
Reviewed-by: Pavel Snajdr <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #9587
Closes #9592
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/test-runner/bin/zts-report.py | 3 | ||||
-rwxr-xr-x | tests/zfs-tests/tests/functional/snapshot/rollback_003_pos.ksh | 29 |
2 files changed, 15 insertions, 17 deletions
diff --git a/tests/test-runner/bin/zts-report.py b/tests/test-runner/bin/zts-report.py index 65233c41b..4c3c29384 100755 --- a/tests/test-runner/bin/zts-report.py +++ b/tests/test-runner/bin/zts-report.py @@ -189,7 +189,6 @@ known = { 'removal/removal_with_zdb': ['SKIP', known_reason], 'rootpool/setup': ['SKIP', na_reason], 'rsend/rsend_008_pos': ['SKIP', '6066'], - 'snapshot/rollback_003_pos': ['SKIP', '6143'], 'vdev_zaps/vdev_zaps_007_pos': ['FAIL', known_reason], 'xattr/xattr_008_pos': ['SKIP', na_reason], 'xattr/xattr_009_neg': ['SKIP', na_reason], @@ -222,8 +221,6 @@ maybe = { 'cli_root/zdb/zdb_006_pos': ['FAIL', known_reason], 'cli_root/zfs_get/zfs_get_004_pos': ['FAIL', known_reason], 'cli_root/zfs_get/zfs_get_009_pos': ['SKIP', '5479'], - 'cli_root/zfs_rollback/zfs_rollback_001_pos': ['FAIL', '6415'], - 'cli_root/zfs_rollback/zfs_rollback_002_pos': ['FAIL', '6416'], 'cli_root/zfs_share/setup': ['SKIP', share_reason], 'cli_root/zfs_snapshot/zfs_snapshot_002_neg': ['FAIL', known_reason], 'cli_root/zfs_unshare/setup': ['SKIP', share_reason], diff --git a/tests/zfs-tests/tests/functional/snapshot/rollback_003_pos.ksh b/tests/zfs-tests/tests/functional/snapshot/rollback_003_pos.ksh index 342e7df58..59e7c110d 100755 --- a/tests/zfs-tests/tests/functional/snapshot/rollback_003_pos.ksh +++ b/tests/zfs-tests/tests/functional/snapshot/rollback_003_pos.ksh @@ -48,10 +48,6 @@ verify_runnable "both" -if is_linux; then - log_unsupported "Test case is known to fail on Linux" -fi - function cleanup { typeset snap="" @@ -61,18 +57,16 @@ function cleanup log_must zfs mount -a unset __ZFS_POOL_RESTRICT - for snap in "$SNAPPOOL.1" "$SNAPPOOL" - do - snapexists $snap - [[ $? -eq 0 ]] && \ - log_must zfs destroy $snap + for snap in "$SNAPPOOL.1" "$SNAPPOOL"; do + if snapexists $snap; then + destroy_snapshot $snap + fi done - for fs in "$TESTPOOL/$TESTFILE/$TESTFILE.1" "$TESTPOOL/$TESTFILE" - do - datasetexists $fs - [[ $? -eq 0 ]] && \ - log_must zfs destroy -r $fs + for fs in "$TESTPOOL/$TESTFILE/$TESTFILE.1" "$TESTPOOL/$TESTFILE"; do + if datasetexists $fs; then + destroy_dataset $fs -r + fi done [[ -e /$TESTPOOL ]] && \ @@ -107,4 +101,11 @@ log_must touch /$TESTPOOL/$TESTFILE/$TESTFILE.1 log_must zfs rollback $SNAPPOOL.1 +# +# Workaround for issue #6143. Issuing a `df` seems to properly force any +# negative dcache entries to be invalidated preventing subsequent failures +# when accessing the mount point. Additional investigation required. +# +log_must df + log_pass "Rollbacks succeed when nested file systems are present." |