Skip to content

Commit

Permalink
check_prop_source: improve output clarity
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
wca authored and behlendorf committed Jan 12, 2021
1 parent 07f9ca4 commit d07a310
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

#
Expand Down

0 comments on commit d07a310

Please sign in to comment.