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=-16.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 444BDC48BE0 for ; Fri, 11 Jun 2021 23:29:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2F635613C3 for ; Fri, 11 Jun 2021 23:29:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230368AbhFKXba (ORCPT ); Fri, 11 Jun 2021 19:31:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:41168 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230186AbhFKXba (ORCPT ); Fri, 11 Jun 2021 19:31:30 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0219961374; Fri, 11 Jun 2021 23:29:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623454172; bh=MPpjwmu5WlM9CZCnK/IuyZfG3bXoyhYCdYGbepdrsYo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=XaksvilxIVnbiHRQ/MlEtZ2yWxZsLkm23xIbKKj7weRx9aKEPXSBDQHaA0MbKiW2h wfmXNxY0pyJ1Lf3aELGQ++7/TIYibMZn5OTNDOJOf9M17lK53xN3AfrKCmAFppFx38 Hs9mL0W6GH7+iFugEl8RrfzUWyp7jCqeASrljKT1cbVbEX/LsPfVhXUwGLSKm0PWC+ CTxmUzkEc8q3+U8a7LptApAGvjH7zRDwlmpQ5LVBMohLNpP37AL75BYcZCyVZ/lYLE FpR3IM4PPe43L0RPhwAWwxXRNgizh+dzU2OKfNk4OdGb0bDOl2oJK63072b9kSuHPz IRku4KOBzFG9Q== Date: Fri, 11 Jun 2021 16:29:30 -0700 From: Eric Biggers To: "Darrick J. Wong" Cc: guaneryu@gmail.com, linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me, amir73il@gmail.com Subject: Re: [PATCH 05/13] fstests: move test group info to test files Message-ID: References: <162317276202.653489.13006238543620278716.stgit@locust> <162317278957.653489.1221763643277904130.stgit@locust> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <162317278957.653489.1221763643277904130.stgit@locust> Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org On Tue, Jun 08, 2021 at 10:19:49AM -0700, Darrick J. Wong wrote: > From: Darrick J. Wong > > Refactor every test in the entire test suite to use the new boilerplate > functions. This also migrates all the test group information into the > test files. This patch has been autogenerated via the command: > > ./tools/convert-group btrfs ceph cifs ext4 f2fs generic nfs ocfs2 overlay perf shared udf xfs > > NOTE: This patch submission only contains diffs of the first seven btrfs > tests because vger rejects 1.5MB patches. The full conversion is in the > git branch linked from the cover letter. > > Signed-off-by: Darrick J. Wong [...] > diff --git a/tests/btrfs/006 b/tests/btrfs/006 > index 67f1fcd8..c0f9541a 100755 > --- a/tests/btrfs/006 > +++ b/tests/btrfs/006 > @@ -7,23 +7,17 @@ > # run basic btrfs information commands in various ways > # sanity tests: filesystem show, label, sync, and device stats > # > -seq=`basename $0` > -seqres=$RESULT_DIR/$seq > -echo "== QA output created by $seq" > - > -here=`pwd` > -tmp=/tmp/$$ > -status=1 # failure is the default! > -trap "_cleanup; exit \$status" 0 1 2 3 15 > +. ./common/preamble > +_begin_fstest auto quick volume > > +# Override the default cleanup function. > _cleanup() > { > cd / > rm -f $tmp.* > } A lot of the _cleanup() functions (such as the one above) are identical to the one in common/preamble. It might make sense to make tools/convert-group recognize these and remove them. - Eric