Skip to content

cmp_ds_prop is a no-op, 3/4 rsend tests that use it are false positives #13250

Closed
@nabijaczleweli

Description

@nabijaczleweli

System information

Type Version/Name
Distribution Name all
Architecture all
OpenZFS Version trunk

Describe the problem you're observing

If you observe L247 and L248 of cmp_ds_prop:

#
# Compare the given two dataset properties
#
# $1 dataset 1
# $2 dataset 2
#
function cmp_ds_prop
{
typeset dtst1=$1
typeset dtst2=$2
typeset -a props=("type" "origin" "volblocksize" "acltype" "dnodesize" \
"atime" "canmount" "checksum" "compression" "copies" "devices" \
"exec" "quota" "readonly" "recordsize" "reservation" "setuid" \
"snapdir" "version" "volsize" "xattr" "mountpoint");
if is_freebsd; then
props+=("jailed")
else
props+=("zoned")
fi
for prop in $props;
do
zfs get -H -o property,value,source $prop $dtst1 >> \
$BACKDIR/dtst1
zfs get -H -o property,value,source $prop $dtst2 >> \
$BACKDIR/dtst2
done
eval sed -e 's:$dtst1:PREFIX:g' < $BACKDIR/dtst1 > $BACKDIR/dtst1
eval sed -e 's:$dtst2:PREFIX:g' < $BACKDIR/dtst2 > $BACKDIR/dtst2
diff $BACKDIR/dtst1 $BACKDIR/dtst2
typeset -i ret=$?
rm -f $BACKDIR/dtst1 $BACKDIR/dtst2
return $ret
}

you'll see that it truncates the intermediate files, then does preprocessing on them; this, for obvious reasons leaves them empty, which means cmp_ds_prop is diff /dev/null /dev/null, or a very convoluted way of alias cmp_ds_prop=:.

Funnily enough, cmp_ds_subs, above, uses a different set of intermediates for before/after.

This makes rsend-group tests send-c_props, rsend_012_pos, and rsend_011_pos (so – all which use it except rsend_008_pos) be false-positives.

I already have this fixed but need an issue number to ref against.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: DefectIncorrect behavior (e.g. crash, hang)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions