mirror_zfs/tests/zfs-tests/tests/functional/rsend
Antonio Russo f8c4d63a26
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-19 11:53:35 -08:00
..
cleanup.ksh OpenZFS 7535 - need test for resumed send of top most filesystem 2017-04-12 08:47:42 -07:00
dedup_encrypted_zvol.bz2 Remove deduplicated send/receive code 2020-04-23 10:06:57 -07:00
dedup_encrypted_zvol.zsend.bz2 Remove deduplicated send/receive code 2020-04-23 10:06:57 -07:00
dedup.zsend.bz2 Remove deduplicated send/receive code 2020-04-23 10:06:57 -07:00
fs.tar.gz Remove deduplicated send/receive code 2020-04-23 10:06:57 -07:00
Makefile.am Drop references when skipping dmu_send due to EXDEV 2020-09-30 13:19:49 -07:00
recv_dedup_encrypted_zvol.ksh Remove deduplicated send/receive code 2020-04-23 10:06:57 -07:00
recv_dedup.ksh Remove deduplicated send/receive code 2020-04-23 10:06:57 -07:00
rsend_001_pos.ksh OpenZFS 7290 - ZFS test suite needs to control what utilities it can run 2017-04-06 09:25:36 -07:00
rsend_002_pos.ksh OpenZFS 7290 - ZFS test suite needs to control what utilities it can run 2017-04-06 09:25:36 -07:00
rsend_003_pos.ksh Retry zfs destroy when busy in rsend tests 2017-08-03 08:57:43 -07:00
rsend_004_pos.ksh OpenZFS 7290 - ZFS test suite needs to control what utilities it can run 2017-04-06 09:25:36 -07:00
rsend_005_pos.ksh OpenZFS 7290 - ZFS test suite needs to control what utilities it can run 2017-04-06 09:25:36 -07:00
rsend_006_pos.ksh OpenZFS 7290 - ZFS test suite needs to control what utilities it can run 2017-04-06 09:25:36 -07:00
rsend_007_pos.ksh OpenZFS 7290 - ZFS test suite needs to control what utilities it can run 2017-04-06 09:25:36 -07:00
rsend_008_pos.ksh Replace ZFS on Linux references with OpenZFS 2020-10-08 20:10:13 -07:00
rsend_009_pos.ksh Retry zfs destroy when busy in rsend tests 2017-08-03 08:57:43 -07:00
rsend_010_pos.ksh OpenZFS 7290 - ZFS test suite needs to control what utilities it can run 2017-04-06 09:25:36 -07:00
rsend_011_pos.ksh Fix typos in tests/ 2019-09-02 18:07:35 -07:00
rsend_012_pos.ksh Cross-platform acltype 2020-10-13 21:25:48 -07:00
rsend_013_pos.ksh Retry zfs destroy when busy in rsend tests 2017-08-03 08:57:43 -07:00
rsend_014_pos.ksh Update rsend_014_pos and send-c_volume test cases 2017-05-04 14:32:43 -07:00
rsend_016_neg.ksh ZTS: Fixup shebang in rsend_016, add to common.run 2020-02-28 09:48:29 -08:00
rsend_019_pos.ksh ZTS: Adopt OpenZFS test analysis script 2018-06-20 14:03:13 -07:00
rsend_020_pos.ksh ZTS: Adopt OpenZFS test analysis script 2018-06-20 14:03:13 -07:00
rsend_021_pos.ksh ZTS: Adopt OpenZFS test analysis script 2018-06-20 14:03:13 -07:00
rsend_022_pos.ksh Fix typos in tests/ 2019-09-02 18:07:35 -07:00
rsend_024_pos.ksh Mismatched nvlist names in zfs_keys_send_space 2020-10-02 17:40:46 -07:00
rsend.cfg OpenZFS 7252 - compressed zfs send / receive 2017-04-26 12:31:43 -07:00
rsend.kshlib Mismatched nvlist names in zfs_keys_send_space 2020-10-02 17:40:46 -07:00
send_encrypted_files.ksh ZTS: Create xattr helpers to hide platform 2020-01-10 13:24:59 -08:00
send_encrypted_hierarchy.ksh Fix hierarchy misspellings 2019-04-14 19:06:34 -07:00
send_encrypted_props.ksh ICP: Improve AES-GCM performance 2020-02-10 12:59:50 -08:00
send_encrypted_truncated_files.ksh Update ZTS to work on FreeBSD 2019-12-18 12:29:43 -08:00
send_freeobjects.ksh Replace ZFS on Linux references with OpenZFS 2020-10-08 20:10:13 -07:00
send_holds.ksh zfs should optionally send holds 2019-02-15 12:41:38 -08:00
send_hole_birth.ksh ZTS: Another round of changes for FreeBSD 2020-03-06 09:31:32 -08:00
send_invalid.ksh ZTS: avoid piping to special devices 2021-01-19 11:53:35 -08:00
send_mixed_raw.ksh Detect and prevent mixed raw and non-raw sends 2019-03-13 11:00:43 -07:00
send_partial_dataset.ksh ZTS: avoid piping to special devices 2021-01-19 11:53:35 -08:00
send_realloc_dnode_size.ksh ZTS: Create xattr helpers to hide platform 2020-01-10 13:24:59 -08:00
send_realloc_encrypted_files.ksh ZTS: Misc test fixes for FreeBSD 2020-02-13 13:52:34 -08:00
send_realloc_files.ksh ZTS: Misc test fixes for FreeBSD 2020-02-13 13:52:34 -08:00
send_spill_block.ksh ZTS: Create xattr helpers to hide platform 2020-01-10 13:24:59 -08:00
send-c_embedded_blocks.ksh Update ZTS to work on FreeBSD 2019-12-18 12:29:43 -08:00
send-c_incremental.ksh OpenZFS 7252 - compressed zfs send / receive 2017-04-26 12:31:43 -07:00
send-c_lz4_disabled.ksh Retry zfs destroy when busy in rsend tests 2017-08-03 08:57:43 -07:00
send-c_mixed_compression.ksh OpenZFS 7252 - compressed zfs send / receive 2017-04-26 12:31:43 -07:00
send-c_props.ksh OpenZFS 7252 - compressed zfs send / receive 2017-04-26 12:31:43 -07:00
send-c_recv_dedup.ksh OpenZFS 7252 - compressed zfs send / receive 2017-04-26 12:31:43 -07:00
send-c_recv_lz4_disabled.ksh Refactor compression algorithm selection for tests 2019-12-04 13:10:12 -08:00
send-c_resume.ksh Fix typos in tests/ 2019-09-02 18:07:35 -07:00
send-c_stream_size_estimate.ksh Update ZTS to work on FreeBSD 2019-12-18 12:29:43 -08:00
send-c_verify_contents.ksh OpenZFS 7252 - compressed zfs send / receive 2017-04-26 12:31:43 -07:00
send-c_verify_ratio.ksh Refactor compression algorithm selection for tests 2019-12-04 13:10:12 -08:00
send-c_volume.ksh Refactor checksum operations in tests 2019-09-05 09:51:59 -07:00
send-c_zstreamdump.ksh Add support to decode a resume token 2020-07-23 17:44:03 -07:00
send-cpL_varied_recsize.ksh Update ZTS to work on FreeBSD 2019-12-18 12:29:43 -08:00
send-L_toggle.ksh File incorrectly zeroed when receiving incremental stream that toggles -L 2020-06-09 10:41:01 -07:00
send-wR_encrypted_zvol.ksh Remove deduplicated send/receive code 2020-04-23 10:06:57 -07:00
setup.ksh OpenZFS 7535 - need test for resumed send of top most filesystem 2017-04-12 08:47:42 -07:00