From patchwork Sun Aug 21 14:47:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zorro Lang X-Patchwork-Id: 9292189 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 85029600CB for ; Sun, 21 Aug 2016 14:47:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7646F281D2 for ; Sun, 21 Aug 2016 14:47:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6AC4D28657; Sun, 21 Aug 2016 14:47:55 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from oss.sgi.com (oss.sgi.com [192.48.182.195]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CF81A281D2 for ; Sun, 21 Aug 2016 14:47:54 +0000 (UTC) Received: from oss.sgi.com (localhost [IPv6:::1]) by oss.sgi.com (Postfix) with ESMTP id D02CC7CA3; Sun, 21 Aug 2016 09:47:50 -0500 (CDT) X-Original-To: xfs@oss.sgi.com Delivered-To: xfs@oss.sgi.com Received: from relay.sgi.com (relay2.corp.sgi.com [137.38.102.29]) by oss.sgi.com (Postfix) with ESMTP id 331D17CA2 for ; Sun, 21 Aug 2016 09:47:48 -0500 (CDT) Received: from cuda.sgi.com (cuda2.sgi.com [192.48.176.25]) by relay2.corp.sgi.com (Postfix) with ESMTP id E920C304032 for ; Sun, 21 Aug 2016 07:47:44 -0700 (PDT) X-ASG-Debug-ID: 1471790862-0bf57b5311c4c10001-NocioJ Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by cuda.sgi.com with ESMTP id OBB0v1lHG9cyzaYq (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Sun, 21 Aug 2016 07:47:43 -0700 (PDT) X-Barracuda-Envelope-From: zlang@redhat.com X-Barracuda-Effective-Source-IP: mx1.redhat.com[209.132.183.28] X-Barracuda-Apparent-Source-IP: 209.132.183.28 X-ASG-Whitelist: Client Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B949D4E4C7; Sun, 21 Aug 2016 14:47:42 +0000 (UTC) Received: from localhost (vpn1-5-49.pek2.redhat.com [10.72.5.49]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u7LElfw8016870; Sun, 21 Aug 2016 10:47:42 -0400 From: Zorro Lang To: fstests@vger.kernel.org Subject: [PATCH] xfs/033: source mkfs output again if isize less than 512 Date: Sun, 21 Aug 2016 22:47:39 +0800 X-ASG-Orig-Subj: [PATCH] xfs/033: source mkfs output again if isize less than 512 Message-Id: <1471790859-26077-1-git-send-email-zlang@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Sun, 21 Aug 2016 14:47:42 +0000 (UTC) X-Barracuda-Connect: mx1.redhat.com[209.132.183.28] X-Barracuda-Start-Time: 1471790863 X-Barracuda-Encrypted: ECDHE-RSA-AES256-GCM-SHA384 X-Barracuda-URL: https://192.48.176.25:443/cgi-mod/mark.cgi X-Barracuda-Scan-Msg-Size: 3722 X-Virus-Scanned: by bsmtpd at sgi.com X-Barracuda-BRTS-Status: 1 Cc: Zorro Lang , xfs@oss.sgi.com X-BeenThere: xfs@oss.sgi.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: XFS Filesystem from SGI List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xfs-bounces@oss.sgi.com Sender: xfs-bounces@oss.sgi.com X-Virus-Scanned: ClamAV using ClamSMTP When blocksize is 512b, xfs/033 will run mkfs.xfs again to make sure inode size is 512b. As below: # devzero blows away 512byte blocks, so make 512byte inodes (at least) _scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs . $tmp.mkfs [ $isize -lt 512 ] && \ _scratch_mkfs_xfs -isize=512 | _filter_mkfs >/dev/null 2>&1 But after "566ebd5 mkfs: default to CRC enabled filesystems", xfsprogs enable CRC as default. If MKFS_OPTIONS is "-b size=512 -m crc=0", the first "_scratch_mkfs_xfs" will make crc=0, but the second will change "crc" to "1", because it'll waive the "-b size=512 -m crc=0" options. xfs/033 need to check xfs's sb_features, for use different .out files. So we should import the mkfs output($tmp.mkfs file) again, if the scecond mkfs changes something. Signed-off-by: Zorro Lang --- Hi, I moved the mkfs_xfs output to /dev/null, because: 1. I think it's not necessary. 2. The case maybe do and output mkfs once or twice(not sure). So it'll be hard to keep consistent golden image. Thanks, Zorro tests/xfs/033 | 8 +++++--- tests/xfs/033.out.crc.linux | 6 ------ tests/xfs/033.out.irix | 6 ------ tests/xfs/033.out.linux | 6 ------ 4 files changed, 5 insertions(+), 21 deletions(-) diff --git a/tests/xfs/033 b/tests/xfs/033 index 9342f0c..45caf08 100755 --- a/tests/xfs/033 +++ b/tests/xfs/033 @@ -78,10 +78,12 @@ _require_scratch _require_no_large_scratch_dev # devzero blows away 512byte blocks, so make 512byte inodes (at least) -_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs +_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs >/dev/null . $tmp.mkfs -[ $isize -lt 512 ] && \ - _scratch_mkfs_xfs -isize=512 | _filter_mkfs >/dev/null 2>&1 +if [ $isize -lt 512 ]; then + _scratch_mkfs_xfs -isize=512 | _filter_mkfs 2>$tmp.mkfs >/dev/null + . $tmp.mkfs +fi # link correct .out file FEATURES=$(_get_os_name) diff --git a/tests/xfs/033.out.crc.linux b/tests/xfs/033.out.crc.linux index a6e86b9..2ab4c43 100644 --- a/tests/xfs/033.out.crc.linux +++ b/tests/xfs/033.out.crc.linux @@ -1,10 +1,4 @@ QA output created by 033 -meta-data=DDEV isize=XXX agcount=N, agsize=XXX blks -data = bsize=XXX blocks=XXX, imaxpct=PCT - = sunit=XXX swidth=XXX, unwritten=X -naming =VERN bsize=XXX -log =LDEV bsize=XXX blocks=XXX -realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX Corrupting root inode - setting bits to 0 Wrote X.XXKb (value 0x0) Phase 1 - find and verify superblock... diff --git a/tests/xfs/033.out.irix b/tests/xfs/033.out.irix index 1a2d9c3..5960117 100644 --- a/tests/xfs/033.out.irix +++ b/tests/xfs/033.out.irix @@ -1,10 +1,4 @@ QA output created by 033 -meta-data=DDEV isize=XXX agcount=N, agsize=XXX blks -data = bsize=XXX blocks=XXX, imaxpct=PCT - = sunit=XXX swidth=XXX, unwritten=X -naming =VERN bsize=XXX -log =LDEV bsize=XXX blocks=XXX -realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX Corrupting root inode - setting bits to 0 Wrote X.XXKb (value 0x0) Phase 1 - find and verify superblock... diff --git a/tests/xfs/033.out.linux b/tests/xfs/033.out.linux index d79ce2a..68bc781 100644 --- a/tests/xfs/033.out.linux +++ b/tests/xfs/033.out.linux @@ -1,10 +1,4 @@ QA output created by 033 -meta-data=DDEV isize=XXX agcount=N, agsize=XXX blks -data = bsize=XXX blocks=XXX, imaxpct=PCT - = sunit=XXX swidth=XXX, unwritten=X -naming =VERN bsize=XXX -log =LDEV bsize=XXX blocks=XXX -realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX Corrupting root inode - setting bits to 0 Wrote X.XXKb (value 0x0) Phase 1 - find and verify superblock...