From patchwork Wed Mar 2 16:51:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eryu Guan X-Patchwork-Id: 8483751 Return-Path: X-Original-To: patchwork-fstests@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E19EE9F372 for ; Wed, 2 Mar 2016 16:52:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1BD4D20148 for ; Wed, 2 Mar 2016 16:52:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2FD7020109 for ; Wed, 2 Mar 2016 16:52:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752106AbcCBQwP (ORCPT ); Wed, 2 Mar 2016 11:52:15 -0500 Received: from mx1.redhat.com ([209.132.183.28]:47098 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751821AbcCBQwP (ORCPT ); Wed, 2 Mar 2016 11:52:15 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id C8E7C72088; Wed, 2 Mar 2016 16:52:14 +0000 (UTC) Received: from localhost (dhcp-13-211.nay.redhat.com [10.66.13.211]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u22GqBcn021924; Wed, 2 Mar 2016 11:52:13 -0500 From: Eryu Guan To: fstests@vger.kernel.org Cc: xfs@oss.sgi.com, Eryu Guan Subject: [PATCH] xfs/259: disable CRC if testing with 512 bytes block size Date: Thu, 3 Mar 2016 00:51:58 +0800 Message-Id: <1456937518-20505-1-git-send-email-eguan@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 02 Mar 2016 16:52:14 +0000 (UTC) Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP With CRCs being the default, TEST_DEV can still be created with "-m crc=0" option explicitly, then 512 bytes block size is picked up by the test, which causes mkfs failure in later mkfs tests. Fix it by adding "-m crc=0" mkfs option in this case. Signed-off-by: Eryu Guan --- tests/xfs/259 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/xfs/259 b/tests/xfs/259 index 16c1935..b5681fe 100755 --- a/tests/xfs/259 +++ b/tests/xfs/259 @@ -62,6 +62,12 @@ else sizes_to_check="512 1024 2048 4096" fi +# If XFS mounted at $TEST_DIR is created with crc disabled explicitly, option +# "-m crc=0" should be added to mkfs option as blocksize is 512 +mkfs_opts="-l size=32m -b size=$blocksize" +if [ $_fs_has_crcs -ne 1 -a "$XFS_MKFS_HAS_NO_META_SUPPORT" == "" ]; then + mkfs_opts="$mkfs_opts -m crc=0" +fi four_TB=$(_math "2^42") for del in $sizes_to_check; do ddseek=$(_math "$four_TB - $del") @@ -71,8 +77,7 @@ for del in $sizes_to_check; do >/dev/null 2>&1 || echo "dd failed" lofile=$(losetup -f) losetup $lofile "$testfile" - "$MKFS_XFS_PROG" -l size=32m -b size=$blocksize $lofile \ - >/dev/null || echo "mkfs failed!" + "$MKFS_XFS_PROG" $mkfs_opts $lofile >/dev/null || echo "mkfs failed!" sync losetup -d $lofile done