ZTS: Avoid piping send directly to /dev/null

Unfortunately, #11445 means while we fail gracefully now, we still
fail, unless people want to implement a complex workaround just to
support /dev/null.

So let's just use the cheap workaround in a test for now.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
Closes #12872
This commit is contained in:
Rich Ercolani 2021-12-17 15:39:10 -05:00 committed by GitHub
parent 9aa0915f87
commit 1a79f7e860
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -75,7 +75,9 @@ if ! is_linux; then
log_must zfs share $fs
log_must zfs unshare $fs
fi
log_must zfs send -i $snap1 $snap2 > /dev/null
# https://github.com/openzfs/zfs/issues/11445
set -o pipefail
log_must zfs send -i $snap1 $snap2 | cat > /dev/null
log_must zfs holds $snap1
log_must eval "zpool history $TESTPOOL > $NEW_HISTORY"