tests: zfs_set_common: check_prop_inherit: print faulty values

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12996
This commit is contained in:
наб 2022-02-20 02:08:59 +01:00 committed by Brian Behlendorf
parent 2feba9a6d8
commit e09762c6c2
1 changed files with 5 additions and 3 deletions

View File

@ -289,8 +289,8 @@ function check_prop_source
if [[ "$chk_value" != "$value" || "$chk_source" != "$source" ]] if [[ "$chk_value" != "$value" || "$chk_source" != "$source" ]]
then then
log_note "expected (value '$value', source '$source'), got \ log_note "expected (value '$value', source '$source')," \
(value '$chk_value', source '$chk_source')" "got (value '$chk_value', source '$chk_source')"
return 1 return 1
else else
return 0 return 0
@ -318,6 +318,8 @@ function check_prop_inherit
if [[ "$value" != "$inherited_value" || \ if [[ "$value" != "$inherited_value" || \
"$source" != "inherited from $inherited_dtst" ]] "$source" != "inherited from $inherited_dtst" ]]
then then
log_note "expected (value '$inherited_value', source 'inherited from $inherited_dtst')," \
"got (value '$value', source '$source')"
return 1 return 1
else else
return 0 return 0
@ -341,7 +343,7 @@ function check_prop_received
received=$(zfs get -H -o received "$prop" "$dataset") received=$(zfs get -H -o received "$prop" "$dataset")
if (($? != 0)); then if (($? != 0)); then
log_fail "Unable to get $prop received value for dataset " \ log_fail "Unable to get $prop received value for dataset" \
"$dataset" "$dataset"
fi fi
if [[ "$received" == "$value" ]] if [[ "$received" == "$value" ]]