Skip to content

Commit

Permalink
ZTS: improve output clarity of check_prop_source
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.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by:	Will Andrews <will@firepipe.net>
Closes #11517
  • Loading branch information
wca authored and behlendorf committed Jan 25, 2021
1 parent a57acbb commit 35ac0ed
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 35ac0ed

Please sign in to comment.