aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSeth Troisi <[email protected]>2024-04-22 10:47:44 -0700
committerGitHub <[email protected]>2024-04-22 10:47:44 -0700
commitcdae59e1530061cf4caa549a062994161c4383c6 (patch)
tree082e72afb7de01fd41538fe417c1e826d8fcbcc9
parent9b43d7ba85059d37533d42f62cbb646203fd4a94 (diff)
ZTS: user_namespace_004.ksh avoid error in cleanup if unsupported
Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Seth Troisi <[email protected]> Closes #16114
-rwxr-xr-xtests/zfs-tests/tests/functional/user_namespace/user_namespace_004.ksh4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/zfs-tests/tests/functional/user_namespace/user_namespace_004.ksh b/tests/zfs-tests/tests/functional/user_namespace/user_namespace_004.ksh
index 37ef84b72..e6ad25f23 100755
--- a/tests/zfs-tests/tests/functional/user_namespace/user_namespace_004.ksh
+++ b/tests/zfs-tests/tests/functional/user_namespace/user_namespace_004.ksh
@@ -44,8 +44,6 @@ user_ns_cleanup() {
log_must zfs destroy -r "$TESTPOOL/userns"
}
-log_onexit user_ns_cleanup
-
log_assert "Check zfs zone command handling of non-namespace files"
# Pass if user namespaces are not supported.
@@ -54,6 +52,8 @@ if [ "$?" -ne "0" ]; then
log_unsupported "Failed to create user namespace"
fi
+log_onexit user_ns_cleanup
+
# Create the baseline datasets.
log_must zfs create -o zoned=on "$TESTPOOL/userns"