ZTS: improve output clarity of check_prop_source

Instead of just failing, indicate the expected and actual value and
source as a NOTE.  Tests using this failed in an earlier version of
the changeset and this information helped find the cause.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by:	Will Andrews <will@firepipe.net>
Closes #11517
This commit is contained in:
Will Andrews 2020-10-11 15:11:06 -05:00 committed by Brian Behlendorf
parent a57acbb627
commit 35ac0ed1fd
1 changed files with 8 additions and 6 deletions

View File

@ -287,12 +287,14 @@ function check_prop_source
typeset chk_value=$(get_prop "$prop" "$dataset")
typeset chk_source=$(get_source "$prop" "$dataset")
if [[ "$chk_value" != "$value" || "$chk_source" != "$4" ]]
then
return 1
else
return 0
fi
if [[ "$chk_value" != "$value" || "$chk_source" != "$source" ]]
then
log_note "expected (value '$value', source '$source'), got \
(value '$chk_value', source '$chk_source')"
return 1
else
return 0
fi
}
#