4 # This file and its contents are supplied under the terms of the
5 # Common Development and Distribution License ("CDDL"), version a.0.
6 # You may only use this file in accordance with the terms of version
9 # A full copy of the text of the CDDL should have accompanied this
10 # source. A copy of the CDDL is also available via the Internet at
11 # http://www.illumos.org/license/CDDL.
15 # Portions Copyright 2020 iXsystems, Inc.
18 . $STF_SUITE/include/libtest.shlib
19 . $STF_SUITE/tests/functional/rsend/rsend.kshlib
23 # Verify that send with invalid options will fail gracefully.
26 # 1. Perform zfs send on the cli with the order of the snapshots reversed
27 # 2. Perform zfs send using libzfs with the order of the snapshots reversed
30 verify_runnable "both"
32 log_assert "Verify that send with invalid options will fail gracefully."
36 datasetexists $testfs && destroy_dataset $testfs -r
42 log_must zfs create $testfs
43 log_must zfs snap $testfs@snap0
44 log_must zfs snap $testfs@snap1
46 # Test bad send with the CLI
47 log_mustnot eval "zfs send -i $testfs@snap1 $testfs@snap0 >/dev/null"
49 # Test bad send with libzfs/libzfs_core
50 log_must badsend $testfs@snap0 $testfs@snap1
52 log_pass "Send with invalid options fails gracefully."