From 510e66db854633aed7a05ee865c140384b2dec87 Mon Sep 17 00:00:00 2001 From: John Wren Kennedy Date: Sat, 5 Nov 2016 20:32:44 -0700 Subject: [PATCH] OpenZFS 7496 - cmp_ds_cont has never worked Authored by: John Wren Kennedy Reviewed by: Matthew Ahrens Reviewed by: Paul Dagnelie Approved by: Gordon Ross Reviewed-by: Brian Behlendorf Reviewed-by: Giuseppe Di Natale Ported-by: George Melikov OpenZFS-issue: https://www.illumos.org/issues/7496 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/5dc1fd7 Closes #5781 --- tests/zfs-tests/tests/functional/rsend/rsend.kshlib | 2 +- tests/zfs-tests/tests/functional/rsend/rsend_007_pos.ksh | 4 +--- tests/zfs-tests/tests/functional/rsend/rsend_011_pos.ksh | 4 +--- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/tests/zfs-tests/tests/functional/rsend/rsend.kshlib b/tests/zfs-tests/tests/functional/rsend/rsend.kshlib index 6ed9596a97..7adb064f4c 100644 --- a/tests/zfs-tests/tests/functional/rsend/rsend.kshlib +++ b/tests/zfs-tests/tests/functional/rsend/rsend.kshlib @@ -187,7 +187,7 @@ function cmp_ds_cont dstdir=$(get_prop mountpoint $dst_fs) $DIFF -r $srcdir $dstdir > /dev/null 2>&1 - echo $? + return $? } # diff --git a/tests/zfs-tests/tests/functional/rsend/rsend_007_pos.ksh b/tests/zfs-tests/tests/functional/rsend/rsend_007_pos.ksh index b057953ed6..e08bd80bf8 100755 --- a/tests/zfs-tests/tests/functional/rsend/rsend_007_pos.ksh +++ b/tests/zfs-tests/tests/functional/rsend/rsend_007_pos.ksh @@ -26,7 +26,7 @@ # # -# Copyright (c) 2013 by Delphix. All rights reserved. +# Copyright (c) 2013, 2015 by Delphix. All rights reserved. # . $STF_SUITE/tests/functional/rsend/rsend.kshlib @@ -76,7 +76,6 @@ log_must eval "$ZFS send -R $POOL@final > $BACKDIR/pool-final-R" log_must eval "$ZFS receive -d -F $POOL2 < $BACKDIR/pool-final-R" dstds=$(get_dst_ds $POOL $POOL2) log_must cmp_ds_subs $POOL $dstds -log_must cmp_ds_cont $POOL $dstds # # Verify zfs send -R -I should succeed @@ -94,6 +93,5 @@ else $ZFS receive -d -F $dstds < $BACKDIR/pool-init-final-IR fi log_must cmp_ds_subs $POOL $dstds -log_must cmp_ds_cont $POOL $dstds log_pass "Rename parent filesystem name will not change the dependent order." diff --git a/tests/zfs-tests/tests/functional/rsend/rsend_011_pos.ksh b/tests/zfs-tests/tests/functional/rsend/rsend_011_pos.ksh index d771a83369..fa8aa3bd59 100755 --- a/tests/zfs-tests/tests/functional/rsend/rsend_011_pos.ksh +++ b/tests/zfs-tests/tests/functional/rsend/rsend_011_pos.ksh @@ -26,7 +26,7 @@ # # -# Copyright (c) 2013 by Delphix. All rights reserved. +# Copyright (c) 2013, 2015 by Delphix. All rights reserved. # . $STF_SUITE/tests/functional/rsend/rsend.kshlib @@ -116,9 +116,7 @@ fi log_must cmp_ds_subs $POOL $dstds typeset -i i=0 while ((i < ${#pair[@]})); do - log_must cmp_ds_cont ${pair[$i]} ${pair[((i+1))]} log_must cmp_ds_prop ${pair[$i]} ${pair[((i+1))]} - ((i += 2)) done