aboutsummaryrefslogtreecommitdiffstats
path: root/tests/zfs-tests
diff options
context:
space:
mode:
authorJohn Poduska <[email protected]>2020-10-02 20:40:46 -0400
committerGitHub <[email protected]>2020-10-02 17:40:46 -0700
commit5b525165e9113e7faabd230b504ae4e9b85d35a5 (patch)
tree500e5abe365ddfc4e84b39480cbf87a27906538e /tests/zfs-tests
parent266d1121c3f49da05abcbdd527bf12b5d5a06df6 (diff)
Mismatched nvlist names in zfs_keys_send_space
This causes "zfs send -vt ..." to fail with: cannot resume send: Unknown error 1030 It turns out that some of the name/value pairs in the verification list for zfs_ioc_send_space(), zfs_keys_send_space, had the wrong name, so the ioctl got kicked out in zfs_check_input_nvpairs(). Update the names accordingly. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: John Poduska <[email protected]> Closes #10978
Diffstat (limited to 'tests/zfs-tests')
-rw-r--r--tests/zfs-tests/tests/functional/rsend/rsend.kshlib13
-rwxr-xr-xtests/zfs-tests/tests/functional/rsend/rsend_024_pos.ksh2
2 files changed, 11 insertions, 4 deletions
diff --git a/tests/zfs-tests/tests/functional/rsend/rsend.kshlib b/tests/zfs-tests/tests/functional/rsend/rsend.kshlib
index c82b0f008..26755e87d 100644
--- a/tests/zfs-tests/tests/functional/rsend/rsend.kshlib
+++ b/tests/zfs-tests/tests/functional/rsend/rsend.kshlib
@@ -635,12 +635,14 @@ function file_check
# $1 The ZFS send command
# $2 The filesystem where the streams are sent
# $3 The receive filesystem
+# $4 Test dry-run (optional)
#
function resume_test
{
- sendcmd=$1
- streamfs=$2
- recvfs=$3
+ typeset sendcmd=$1
+ typeset streamfs=$2
+ typeset recvfs=$3
+ typeset dryrun=${4:-1}
stream_num=1
log_must eval "$sendcmd >/$streamfs/$stream_num"
@@ -651,6 +653,11 @@ function resume_test
stream_num=$((stream_num+1))
token=$(zfs get -Hp -o value receive_resume_token $recvfs)
+
+ # Do a dry-run
+ [ $dryrun -ne 0 ] && \
+ log_must eval "zfs send -nvt $token > /dev/null"
+
log_must eval "zfs send -t $token >/$streamfs/$stream_num"
[[ -f /$streamfs/$stream_num ]] || \
log_fail "NO FILE /$streamfs/$stream_num"
diff --git a/tests/zfs-tests/tests/functional/rsend/rsend_024_pos.ksh b/tests/zfs-tests/tests/functional/rsend/rsend_024_pos.ksh
index 2d9fb01af..c44985ae8 100755
--- a/tests/zfs-tests/tests/functional/rsend/rsend_024_pos.ksh
+++ b/tests/zfs-tests/tests/functional/rsend/rsend_024_pos.ksh
@@ -46,7 +46,7 @@ log_onexit resume_cleanup $sendfs $streamfs
test_fs_setup $sendfs $recvfs $streamfs
log_must zfs unmount -f $sendfs
-resume_test "zfs send $sendfs" $streamfs $recvfs
+resume_test "zfs send $sendfs" $streamfs $recvfs 0
file_check $sendfs $recvfs
log_pass "Verify resumability of a full ZFS send/receive with the source " \