From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 60FACC4320A for ; Fri, 30 Jul 2021 03:52:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4676860F94 for ; Fri, 30 Jul 2021 03:52:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234928AbhG3Dwd (ORCPT ); Thu, 29 Jul 2021 23:52:33 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:57271 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230352AbhG3Dwd (ORCPT ); Thu, 29 Jul 2021 23:52:33 -0400 Received: from cwcc.thunk.org (pool-72-74-133-215.bstnma.fios.verizon.net [72.74.133.215]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 16U3qQd0009312 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 29 Jul 2021 23:52:26 -0400 Received: by cwcc.thunk.org (Postfix, from userid 15806) id 109A515C37C0; Thu, 29 Jul 2021 23:52:26 -0400 (EDT) Date: Thu, 29 Jul 2021 23:52:26 -0400 From: "Theodore Ts'o" To: Josef Bacik Cc: fstests@vger.kernel.org, linux-btrfs@vger.kernel.org Subject: Re: [PATCH] fstests: generic/204: fail if the mkfs fails Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org On Thu, Jul 29, 2021 at 04:35:53PM -0400, Josef Bacik wrote: > My nightly fstests runs on my Raspberry Pi got stuck trying to run > generic/204. This boiled down to mkfs failing to make the scratch > device that small with the subpage blocksize support, and thus trying to > fill a 1tib drive with tiny files. On one hand I'd like to make > _scratch_mkfs failures automatically fail the test, but I worry about > cases where a test may be checking for an option and need to do > something different with failures, so for now simply fail if we can't > make our tiny-fs in generic/204. > > Signed-off-by: Josef Bacik FWIW, I'm carrying the following patch in my local xfstests tree: commit cb8e8d44de5bbb1d6163dfeb2b77e8f003a564da Author: Theodore Ts'o Date: Mon Jul 3 01:29:21 2017 -0400 common: kill the test if mkfs.ext4 in _scratch_mkfs_sized fails If the file system size specified by test is incompatible with the mkfs options used in the test configuration, make sure the test stops at that point instad of doing something undefined. Signed-off-by: Theodore Ts'o diff --git a/common/rc b/common/rc index 332e18b7..1dcad4a3 100644 --- a/common/rc +++ b/common/rc @@ -1034,7 +1034,9 @@ _scratch_mkfs_sized() fi ;; ext2|ext3|ext4|ext4dev) - ${MKFS_PROG} -t $FSTYP -F $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV $blocks + echo "${MKFS_PROG} -t $FSTYP -F $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV $blocks" + ${MKFS_PROG} -t $FSTYP -F $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV $blocks || \ + _die "${MKFS_PROG}.$FSTYP failed!" ;; gfs2) # mkfs.gfs2 doesn't automatically shrink journal files on small I tried getting this upstream, but apparently there was pushback where when the mkfs failed, it was considered a *feature* that the test would run on some random scratch file system that was previously there from before. I didn't appreciate wasting time trying to run down test failures caused by some completely inappropriate file system being used for a test after _scratch_mkfs_sized failed, so I've just been carrying the patch locally.... - Ted