From patchwork Wed Feb 9 12:33:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shin'ichiro Kawasaki X-Patchwork-Id: 12740223 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BDD82C433F5 for ; Wed, 9 Feb 2022 12:34:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233315AbiBIMeZ (ORCPT ); Wed, 9 Feb 2022 07:34:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233331AbiBIMeQ (ORCPT ); Wed, 9 Feb 2022 07:34:16 -0500 Received: from esa3.hgst.iphmx.com (esa3.hgst.iphmx.com [216.71.153.141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B859C05CB9E; Wed, 9 Feb 2022 04:34:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1644410059; x=1675946059; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=oNwFFRRH3apj/4n7qSFchUH8rbWyk695r1onG5cIzSI=; b=bpJS04HnYId9GobZQ9+wV79wMHcVvTqoAWPwI0ok40UQ09l+ytQUPqSD 7fYNyjp7VM72OQ26FXDPBfCzGrsg111MGNLGu75bGNQQwkI3j9E+uIV2+ 5e3wkmVksUeVMhKPefx89a1JuutLL1xqxXVwQFobF17xuEkuip6VIJKYy l8cG+urUuSBb7KV82B+mt8yT5hvjPItWs1m+z9eMKKvJ/O75U1A1OM1Qn yAu+epTlRfc2ABYZ8j1uZUGX4z1ZtysgygJNcuWFZmdPtgqCaa6eJTCBP nKlETLOssGHxi82RL5tCYOIMKVHAzG1Ikl32EG1+j5Gw7Gp9kMLNroOBM Q==; X-IronPort-AV: E=Sophos;i="5.88,355,1635177600"; d="scan'208";a="197323005" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 09 Feb 2022 20:33:12 +0800 IronPort-SDR: ypOjbzajne+u+VcZtk2YgVFlV/9FztTVmVZBdGrhM9WRzyntr7YsE53m+TwXm+qD0ditlhQuYd OR+PIx6LM/aw1aVzwm55dysUnjgEGeUW4q52XYsGA887JlyH9G9Ds27pw+n+/HNs3vaNZ3kTc8 7Mp0ArapH3+fG1vGrp+CQZSxYbyHQNV611wnHeF46hDgtWjV8OHuMHEY9NtW2FNdLE3pgRq1qf PjWbHWlhTlYk3G5nPz/v6Xw87AtpArob8d9t2LOy1W4a2VrNKpKhf/fjVdHNsUP4ivT5R5tiKy bcbDBAcsNVU7TkrPMhAXdE/9 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Feb 2022 04:05:02 -0800 IronPort-SDR: HdPriuEKVhWsCgCMJH7nM3u0NNBHMW4LdTwQRup3PhxoOSboYk5/ZH42P9eGibQOPOZTmhxnrQ OLotWoFkTD5ZUzvrdFsNhXMH+alx/vYgbVt6EHvjwCT+UWmy8j6AjnSEAZJp6+Vw5KBD+3LGYX yxy3n8JG1zepbuigMyXqTdJ6BDn5IfCAnmfw/2TZVCiSkX1ej9pav8NEzYdedgLojkMCetSLSd JtSsF2A7iehXr3DlI8nx4rBrujJXk6WUFW/K/Q+jvsLu+W7V2KpmcrXFy3ifJIpA5dG+Vw6kY6 lu8= WDCIronportException: Internal Received: from shindev.dhcp.fujisawa.hgst.com (HELO shindev.fujisawa.hgst.com) ([10.149.52.173]) by uls-op-cesaip02.wdc.com with ESMTP; 09 Feb 2022 04:33:13 -0800 From: Shin'ichiro Kawasaki To: fstests@vger.kernel.org, linux-btrfs@vger.kernel.org Cc: linux-xfs@vger.kernel.org, linux-ext4@vger.kernel.org, Naohiro Aota , Johannes Thumshirn , Damien Le Moal , Shin'ichiro Kawasaki Subject: [PATCH v2 5/6] xfs/015: check _scratch_mkfs_sized return code Date: Wed, 9 Feb 2022 21:33:04 +0900 Message-Id: <20220209123305.253038-6-shinichiro.kawasaki@wdc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220209123305.253038-1-shinichiro.kawasaki@wdc.com> References: <20220209123305.253038-1-shinichiro.kawasaki@wdc.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org The test cases xfs/015 calls _scratch_mkfs before _scratch_mkfs_sized, and does not check return code of _scratch_mkfs_sized. Even if _scratch_mkfs_sized failed, _scratch_mount after it cannot detect the sized mkfs failure because _scratch_mkfs already created a file system on the device. This results in unexpected test condition. To avoid the unexpected test condition, check return code of _scratch_mkfs_sized. Suggested-by: Naohiro Aota Signed-off-by: Shin'ichiro Kawasaki Reviewed-by: Darrick J. Wong --- tests/xfs/015 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/xfs/015 b/tests/xfs/015 index 86fa6336..2bb7b8d5 100755 --- a/tests/xfs/015 +++ b/tests/xfs/015 @@ -43,7 +43,7 @@ _scratch_mount _require_fs_space $SCRATCH_MNT 131072 _scratch_unmount -_scratch_mkfs_sized $((32 * 1024 * 1024)) > $tmp.mkfs.raw +_scratch_mkfs_sized $((32 * 1024 * 1024)) > $tmp.mkfs.raw || _fail "mkfs failed" cat $tmp.mkfs.raw | _filter_mkfs >$seqres.full 2>$tmp.mkfs # get original data blocks number and agcount . $tmp.mkfs