tests: zfs_002_pos: simplify ZFS_ABORT tests

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12996
This commit is contained in:
наб 2022-02-23 02:39:04 +01:00 committed by Brian Behlendorf
parent e09762c6c2
commit 85c2cce51c
1 changed files with 2 additions and 6 deletions

View File

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