mirror_zfs/contrib
Antonio Russo 81f981cd82 ZTS: avoid piping to special devices
As described in #11445, the kernel interface kernel_{read,write} no
longer act on special devices.  In the ZTS, zfs send and receive are
tested by piping to these devices, leading to spurious failures (for
positive tests) and may mask errors (for negative tests).

Until a more permanent mechanism to address this deficiency is
developed, clean up the output from the ZTS by avoiding directly piping
to or from /dev/null and /dev/zero.

For /dev/zero input, simply use a pipe: `cat </dev/zero |` .

However, for /dev/null output, the shell semantics for pipe failures
means that zfs send error codes will be masked by the successful
`| cat >/dev/null` command execution.  In that case, use a temporary
file under $TEST_BASE_DIR for output in favor.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Attila Fülöp <attila@fueloep.org>
Signed-off-by: Antonio Russo <aerusso@aerusso.net>
Closes #11478
2021-01-23 15:47:06 -08:00
..
bash_completion.d Merge bash_completions changes from upstream 2020-06-16 12:27:23 -07:00
bpftrace Drop unnecessary srcdir paths 2020-06-24 18:20:18 -07:00
dracut dracut: use /bin/sh instead of bash as the intepreter 2020-11-30 09:44:02 -08:00
initramfs initramfs: zfsunlock hook breaks /usr/bin 2020-11-11 11:07:40 -08:00
intel_qat Add intel_QAT patches 2020-10-01 12:22:28 -07:00
pam_zfs_key pam_zfs_key: accommodate different dataset naming scheme 2020-11-25 08:42:37 -08:00
pyzfs ZTS: avoid piping to special devices 2021-01-23 15:47:06 -08:00
zcp Fix contrib/zcp/Makefile.am 2019-10-30 12:37:49 -07:00
Makefile.am pam: implement a zfs_key pam module 2020-06-24 18:45:44 -07:00