From patchwork Thu Jul 6 18:06:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Foster X-Patchwork-Id: 9828701 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 DD125602BD for ; Thu, 6 Jul 2017 18:06:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D01F428650 for ; Thu, 6 Jul 2017 18:06:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C4D1428698; Thu, 6 Jul 2017 18:06:23 +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 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 6A63A28650 for ; Thu, 6 Jul 2017 18:06:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751853AbdGFSGX (ORCPT ); Thu, 6 Jul 2017 14:06:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60988 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751828AbdGFSGW (ORCPT ); Thu, 6 Jul 2017 14:06:22 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 23D3B3345BA for ; Thu, 6 Jul 2017 18:06:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 23D3B3345BA Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=bfoster@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 23D3B3345BA Received: from bfoster.bfoster (dhcp-41-20.bos.redhat.com [10.18.41.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id 06FF66F92E for ; Thu, 6 Jul 2017 18:06:22 +0000 (UTC) Received: by bfoster.bfoster (Postfix, from userid 1000) id 824D71205DE; Thu, 6 Jul 2017 14:06:20 -0400 (EDT) From: Brian Foster To: fstests@vger.kernel.org Subject: [PATCH] xfs/297: fail test if _scratch_mount fails Date: Thu, 6 Jul 2017 14:06:20 -0400 Message-Id: <20170706180620.58376-1-bfoster@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Thu, 06 Jul 2017 18:06:22 +0000 (UTC) Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP xfs/297 formats the scratch device with test specific mkfs options that limit the use of certain mount options (i.e., if logbsize != 256k). If an incompatible mount option is set, the mount fails but the test proceeds to run against the root filesystem. Update xfs/297 to fail if the mount of the scratch device fails for whatever reason. Signed-off-by: Brian Foster Reviewed-by: Bill O'Donnell --- A couple other options here are to exclude the use of logbsize (effectively _notrun the test) or to hardcode the mount with '-o logbsize=256k' in the test. I didn't like the former because it excludes even when a valid logbsize is set. The latter requires us to use _require_scratch_nocheck, otherwise the post-test remount fails. This configuration is rare enough that this seemed like the least bad option. Brian tests/xfs/297 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/xfs/297 b/tests/xfs/297 index fe92441..9accffd 100755 --- a/tests/xfs/297 +++ b/tests/xfs/297 @@ -52,7 +52,7 @@ _require_command "$KILLALL_PROG" killall rm -f $seqres.full _scratch_mkfs_xfs -d agcount=16,su=256k,sw=12 -l su=256k,size=5120b >/dev/null 2>&1 -_scratch_mount >/dev/null 2>&1 +_scratch_mount >>$seqres.full 2>&1 || _fail "mount failed" STRESS_DIR="$SCRATCH_MNT/testdir" mkdir -p $STRESS_DIR