aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorнаб <[email protected]>2022-03-14 23:01:57 +0100
committerBrian Behlendorf <[email protected]>2022-04-01 18:00:26 -0700
commit9da14f39810a5c4eae4ede8440a1e22cf119a949 (patch)
treeefd17a8afc1b34619e632bd3cb84c4a94c348033 /tests
parent91933eb9770066388047cb8f4b8a63ed6b1d2944 (diff)
tests: rsend.kshlib: cmp_ds_prop: allow skipping source
This fixes rsend_012_pos: 20:28:50.50 SUCCESS: eval zfs receive -d -F testpool2 < /mnt/testroot/backdir-rsend/pool-final-R 20:28:50.53 4,6c4,6 20:28:50.53 < acltype off local 20:28:50.53 < dnodesize 4k local 20:28:50.53 < atime off local 20:28:50.53 --- 20:28:50.53 > acltype off received 20:28:50.53 > dnodesize 4k received 20:28:50.53 > atime off received 20:28:50.53 8,13c8,13 20:28:50.53 < checksum sha256 local 20:28:50.53 < compression off local 20:28:50.53 < copies 2 local 20:28:50.53 < devices on local 20:28:50.53 < exec on local 20:28:50.53 < quota 1G local 20:28:50.53 --- 20:28:50.53 > checksum sha256 received 20:28:50.53 > compression off received 20:28:50.53 > copies 2 received 20:28:50.53 > devices on received 20:28:50.53 > exec on received 20:28:50.53 > quota 1G received 20:28:50.53 15c15 20:28:50.53 < recordsize 128K local 20:28:50.53 --- 20:28:50.53 > recordsize 128K received 20:28:50.53 17,18c17,18 20:28:50.53 < setuid off local 20:28:50.53 < snapdir visible local 20:28:50.53 --- 20:28:50.53 > setuid off received 20:28:50.53 > snapdir visible received 20:28:50.53 ERROR: cmp_ds_prop testpool testpool2 exited 1 Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: John Kennedy <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #13250 Closes #13259
Diffstat (limited to 'tests')
-rw-r--r--tests/zfs-tests/tests/functional/rsend/rsend.kshlib6
-rwxr-xr-xtests/zfs-tests/tests/functional/rsend/rsend_012_pos.ksh2
2 files changed, 5 insertions, 3 deletions
diff --git a/tests/zfs-tests/tests/functional/rsend/rsend.kshlib b/tests/zfs-tests/tests/functional/rsend/rsend.kshlib
index 1f6baf610..085b58954 100644
--- a/tests/zfs-tests/tests/functional/rsend/rsend.kshlib
+++ b/tests/zfs-tests/tests/functional/rsend/rsend.kshlib
@@ -212,6 +212,8 @@ function cmp_ds_prop
{
typeset dtst1=$1
typeset dtst2=$2
+ typeset source=",source"
+ [ -n "$3" ] && source=
typeset props="type,origin,volblocksize,acltype,dnodesize"
props+=",atime,canmount,checksum,compression,copies,devices"
props+=",exec,quota,readonly,recordsize,reservation,setuid"
@@ -223,8 +225,8 @@ function cmp_ds_prop
fi
diff \
- <(zfs get -Ho property,value,source $props $dtst1 | sed -e "s:$dtst1:PREFIX:g" -e 's/^origin [^@]*/origin POOL/') \
- <(zfs get -Ho property,value,source $props $dtst2 | sed -e "s:$dtst2:PREFIX:g" -e 's/^origin [^@]*/origin POOL/')
+ <(zfs get -Ho property,value$source $props $dtst1 | sed -e "s:$dtst1:PREFIX:g" -e 's/^origin [^@]*/origin POOL/') \
+ <(zfs get -Ho property,value$source $props $dtst2 | sed -e "s:$dtst2:PREFIX:g" -e 's/^origin [^@]*/origin POOL/')
}
#
diff --git a/tests/zfs-tests/tests/functional/rsend/rsend_012_pos.ksh b/tests/zfs-tests/tests/functional/rsend/rsend_012_pos.ksh
index 6c75172be..b92e5c460 100755
--- a/tests/zfs-tests/tests/functional/rsend/rsend_012_pos.ksh
+++ b/tests/zfs-tests/tests/functional/rsend/rsend_012_pos.ksh
@@ -158,7 +158,7 @@ set -A pair "$POOL" "$POOL2" \
typeset -i i=0
while ((i < ${#pair[@]})); do
- log_must cmp_ds_prop ${pair[$i]} ${pair[((i+1))]}
+ log_must cmp_ds_prop ${pair[$i]} ${pair[((i+1))]} nosource
((i += 2))
done