cprog=$tmp.get_structs.c
oprog=$tmp.get_structs
progout=$tmp.output
+keyfile=$tmp.keys
cat >$cprog <<EOF
#define _GNU_SOURCE
_notrun "Could not compile test program (see end of $seqres.full)"
$oprog | _type_size_filter | _type_name_filter > $progout
-#
-# add addition sizes and xfs_sb_t fields that don't exist in the version
-# being tested.
-#
+# Find all the items that only exist in the golden output
+comm -23 <(grep '=' $0.out | sed -e 's/ =.*$//g' | LC_COLLATE=POSIX sort) \
+ <(sed -e 's/ =.*$//g' < $progout | LC_COLLATE=POSIX sort) > $keyfile
-# xfsprogs 2.9.8: sb_bad_features2 in pv 978822
-if [ $XFSPROGS_VERSION -lt 20908 ]; then
- echo 'offsetof(xfs_sb_t, sb_bad_features2 ) = 204' >>$progout
-fi
-if [ $XFSPROGS_VERSION -lt 30000 ]; then
- echo 'sizeof( xfs_dsb_t ) = 208' >>$progout;
-fi
+# Copy those items to the program output
+grep -F -f $keyfile $0.out >> $progout
LC_COLLATE=POSIX sort $progout
sizeof(xfs_qoff_logformat_t) = 20
sizeof(xfs_timestamp_t) = 8
sizeof(xfs_trans_header_t) = 16
+sizeof(xfs_zzzz_test_the_test_program) = -47