test/encoding/check-generated.sh: show diff if cmp fails

Signed-off-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
Kefu Chai 2019-08-24 14:12:41 +08:00
parent 2c5e59c1fb
commit bf0b161115

View File

@ -54,7 +54,7 @@ while read type; do
echo "**** $type test $n dump_json check failed ****"
echo " ceph-dencoder type $type select_test $n dump_json > $tmp1"
echo " ceph-dencoder type $type select_test $n encode decode dump_json > $tmp2"
echo " diff $tmp1 $tmp2"
diff $tmp1 $tmp2
failed=$(($failed + 1))
fi
@ -62,7 +62,7 @@ while read type; do
echo "**** $type test $n copy dump_json check failed ****"
echo " ceph-dencoder type $type select_test $n dump_json > $tmp1"
echo " ceph-dencoder type $type select_test $n copy dump_json > $tmp2"
echo " diff $tmp1 $tmp2"
diff $tmp1 $tmp2
failed=$(($failed + 1))
fi
@ -70,7 +70,7 @@ while read type; do
echo "**** $type test $n copy_ctor dump_json check failed ****"
echo " ceph-dencoder type $type select_test $n dump_json > $tmp1"
echo " ceph-dencoder type $type select_test $n copy_ctor dump_json > $tmp2"
echo " diff $tmp1 $tmp2"
diff $tmp1 $tmp2
failed=$(($failed + 1))
fi