]> git.proxmox.com Git - mirror_zfs.git/blobdiff - tests/zfs-tests/tests/functional/user_namespace/user_namespace_004.ksh
ZTS: user_namespace_004.ksh avoid error in cleanup if unsupported
[mirror_zfs.git] / tests / zfs-tests / tests / functional / user_namespace / user_namespace_004.ksh
index 37ef84b72377f77925bd4b7ad3e2c5c0b9c57194..e6ad25f23f936429a6b35f3c0f457b5f9965b4bc 100755 (executable)
@@ -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"