From patchwork Fri May 27 18:02:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 9138841 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 406A26075A for ; Fri, 27 May 2016 18:03:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 36EDA27CF9 for ; Fri, 27 May 2016 18:03:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 29248281F9; Fri, 27 May 2016 18:03:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A551B27CF9 for ; Fri, 27 May 2016 18:03:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753485AbcE0SDA (ORCPT ); Fri, 27 May 2016 14:03:00 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:44720 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751533AbcE0SDA (ORCPT ); Fri, 27 May 2016 14:03:00 -0400 Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u4RI2b0Q025668 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 27 May 2016 18:02:37 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0022.oracle.com (8.14.4/8.13.8) with ESMTP id u4RI2aJP006228 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 27 May 2016 18:02:36 GMT Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by aserv0122.oracle.com (8.13.8/8.13.8) with ESMTP id u4RI2X6d013378; Fri, 27 May 2016 18:02:34 GMT Received: from localhost (/24.21.211.40) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 27 May 2016 11:02:33 -0700 Date: Fri, 27 May 2016 11:02:31 -0700 From: "Darrick J. Wong" To: david@fromorbit.com Cc: linux-btrfs@vger.kernel.org, fstests@vger.kernel.org, xfs@oss.sgi.com, Xiao Yang Subject: [PATCH 8/7] xfs/122: don't break on old xfsprogs Message-ID: <20160527180231.GB5050@birch.djwong.org> References: <146424222237.6278.4174636124436241002.stgit@birch.djwong.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <146424222237.6278.4174636124436241002.stgit@birch.djwong.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Source-IP: userv0022.oracle.com [156.151.31.74] Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- tests/xfs/122 | 8 ++++++++ tests/xfs/122.out | 1 + 2 files changed, 9 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe fstests" 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 <>$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