]> git.proxmox.com Git - mirror_zfs.git/commitdiff
tests: zfs_002_pos: simplify ZFS_ABORT tests
authorнаб <nabijaczleweli@nabijaczleweli.xyz>
Wed, 23 Feb 2022 01:39:04 +0000 (02:39 +0100)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 15 Mar 2022 22:13:21 +0000 (15:13 -0700)
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12996

tests/zfs-tests/tests/functional/cli_root/zfs/zfs_002_pos.ksh

index 51a7ce1d96d7e78738169e5814f69f4d309f3ad3..796b38928ec77b6e7043749c8d491c24bca4b394 100755 (executable)
@@ -108,12 +108,8 @@ fi
 log_must export ZFS_ABORT=yes
 
 for subcmd in "${cmds[@]}" "${badparams[@]}"; do
-       zfs $subcmd >/dev/null 2>&1 && log_fail "$subcmd passed incorrectly."
-       if [[ ! -e $corefile ]]; then
-               log_fail "zfs $subcmd cannot generate core file with " \
-                   "ZFS_ABORT set."
-       fi
-       log_must rm -f $corefile
+       log_mustnot eval "zfs $subcmd >/dev/null 2>&1"
+       log_must rm $corefile
 done
 
 log_pass "With ZFS_ABORT set, zfs command can abort and generate core file " \