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

View File

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