Avoid error in cleanup if test if unsupported

Signed-off-by: Seth Troisi <sethtroisi@google.com>
This commit is contained in:
Seth Troisi 2024-04-19 11:29:42 -07:00
parent 454c0b0e46
commit 30706a3935
1 changed files with 2 additions and 2 deletions

View File

@ -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"