Message ID | 20160527180231.GB5050@birch.djwong.org (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Looks fine, but can't we also remove the workaround at the end of the the test as well? -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Tue, May 31, 2016 at 05:51:09AM -0700, Christoph Hellwig wrote: > Looks fine, but can't we also remove the workaround at the end of the > the test as well? Oh, heh, yes, those can go. The whitespace is wrong on them anyway. --D > > _______________________________________________ > xfs mailing list > xfs@oss.sgi.com > http://oss.sgi.com/mailman/listinfo/xfs -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/tests/xfs/122 b/tests/xfs/122 index 845cdd2..c944942 100755 --- a/tests/xfs/122 +++ b/tests/xfs/122 @@ -73,6 +73,7 @@ _attribute_filter() cprog=$tmp.get_structs.c oprog=$tmp.get_structs progout=$tmp.output +keyfile=$tmp.keys cat >$cprog <<EOF #define _GNU_SOURCE @@ -239,6 +240,13 @@ if [ $XFSPROGS_VERSION -lt 30000 ]; then echo 'sizeof( xfs_dsb_t ) = 208' >>$progout; fi +# 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 + +# Copy those items to the program output +grep -F -f $keyfile $0.out >> $progout + LC_COLLATE=POSIX sort $progout status=0 diff --git a/tests/xfs/122.out b/tests/xfs/122.out index 451871e..46d1dd4 100644 --- a/tests/xfs/122.out +++ b/tests/xfs/122.out @@ -147,3 +147,4 @@ sizeof(xfs_lookup_t) = 4 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
If we're running against a old version of xfsprogs that lacks some of the structures that the golden output knows about, copy the structure size definition from the golden output to the program output. This way we can check for structure size mutations on old xfsprogs without generating false error reports for structs that don't exist in the old release. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> --- tests/xfs/122 | 8 ++++++++ tests/xfs/122.out | 1 + 2 files changed, 9 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html