From 85c2cce51cce1f5f01b5b3a50f5997ce0b24a189 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= Date: Wed, 23 Feb 2022 02:39:04 +0100 Subject: [PATCH] tests: zfs_002_pos: simplify ZFS_ABORT tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Brian Behlendorf Signed-off-by: Ahelenia ZiemiaƄska Closes #12996 --- .../tests/functional/cli_root/zfs/zfs_002_pos.ksh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tests/zfs-tests/tests/functional/cli_root/zfs/zfs_002_pos.ksh b/tests/zfs-tests/tests/functional/cli_root/zfs/zfs_002_pos.ksh index 51a7ce1d9..796b38928 100755 --- a/tests/zfs-tests/tests/functional/cli_root/zfs/zfs_002_pos.ksh +++ b/tests/zfs-tests/tests/functional/cli_root/zfs/zfs_002_pos.ksh @@ -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 " \