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 <behlendorf1@llnl.gov> Reviewed-by: John Kennedy <john.kennedy@delphix.com> Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #13250 Closes #13259
This commit is contained in:
parent
91933eb977
commit
9da14f3981
|
@ -212,6 +212,8 @@ function cmp_ds_prop
|
||||||
{
|
{
|
||||||
typeset dtst1=$1
|
typeset dtst1=$1
|
||||||
typeset dtst2=$2
|
typeset dtst2=$2
|
||||||
|
typeset source=",source"
|
||||||
|
[ -n "$3" ] && source=
|
||||||
typeset props="type,origin,volblocksize,acltype,dnodesize"
|
typeset props="type,origin,volblocksize,acltype,dnodesize"
|
||||||
props+=",atime,canmount,checksum,compression,copies,devices"
|
props+=",atime,canmount,checksum,compression,copies,devices"
|
||||||
props+=",exec,quota,readonly,recordsize,reservation,setuid"
|
props+=",exec,quota,readonly,recordsize,reservation,setuid"
|
||||||
|
@ -223,8 +225,8 @@ function cmp_ds_prop
|
||||||
fi
|
fi
|
||||||
|
|
||||||
diff \
|
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 $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 $dtst2 | sed -e "s:$dtst2:PREFIX:g" -e 's/^origin [^@]*/origin POOL/')
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
@ -158,7 +158,7 @@ set -A pair "$POOL" "$POOL2" \
|
||||||
|
|
||||||
typeset -i i=0
|
typeset -i i=0
|
||||||
while ((i < ${#pair[@]})); do
|
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))
|
((i += 2))
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue