From patchwork Mon Jun 21 23:10:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 12335943 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.4 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=ham 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 F29E9C4743C for ; Mon, 21 Jun 2021 23:10:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D2A6861042 for ; Mon, 21 Jun 2021 23:10:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231128AbhFUXM1 (ORCPT ); Mon, 21 Jun 2021 19:12:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:60886 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230222AbhFUXM1 (ORCPT ); Mon, 21 Jun 2021 19:12:27 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7C03860FDB; Mon, 21 Jun 2021 23:10:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624317012; bh=JkyMfuGYugV8FYDP9sVGe6EZ99S16jZUqZgys3jToTE=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=PqWl+xdCyY3YHqmQRwPEa2b5+EBiEYDJ6M+QSMQUr60SA54NPWTxBVecSrKOaE4gG 5ofUfhYbC0S0Y4+eENDZ/M+s7+BMCpiEsXP5WI7PA6w0x790KU6OrCxtzeLd1+uxSL 1+QaEcLeA8AqMB8WV5GZkBUi9XIY+IV7cGnoGMwC6RCpJONEFMYukZTJN0a8nQATkc BjqE1ARZJ+gE/OSf7nzCvk+Sh6tyL86ZHdMwBJZz2z63Q8kOOeTb+Q29WEJ76edJKf ZbBipcbgN5Ci/cseQ/3e/JPht4sr6mLhr2Y6Y235cwzds4Ks01dhGeUGeAuXv33qbF O4AUCumnpQGow== Subject: [PATCH 01/13] fstests: fix group check in new script From: "Darrick J. Wong" To: djwong@kernel.org, guaneryu@gmail.com Cc: Chandan Babu R , Allison Henderson , Christoph Hellwig , linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me, amir73il@gmail.com, ebiggers@kernel.org Date: Mon, 21 Jun 2021 16:10:12 -0700 Message-ID: <162431701217.4090790.3582211048806383763.stgit@locust> In-Reply-To: <162431700639.4090790.11684371602638166127.stgit@locust> References: <162431700639.4090790.11684371602638166127.stgit@locust> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Darrick J. Wong In the tests/*/group files, group names are found in the Nth columns of the file, where N > 1. The grep expression to warn about unknown groups is not correct (since it currently checks column 1), so fix this. Signed-off-by: Darrick J. Wong Reviewed-by: Chandan Babu R Reviewed-by: Allison Henderson Reviewed-by: Christoph Hellwig --- new | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/new b/new index bb427f0d..357983d9 100755 --- a/new +++ b/new @@ -243,10 +243,7 @@ else # for g in $* do - if grep "^$g[ ]" $tdir/group >/dev/null - then - : - else + if ! grep -q "[[:space:]]$g" "$tdir/group"; then echo "Warning: group \"$g\" not defined in $tdir/group" fi done From patchwork Mon Jun 21 23:10:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 12335945 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.4 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=ham 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 05C44C4743C for ; Mon, 21 Jun 2021 23:10:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DBA0F61042 for ; Mon, 21 Jun 2021 23:10:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231246AbhFUXMd (ORCPT ); Mon, 21 Jun 2021 19:12:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:60936 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231241AbhFUXMc (ORCPT ); Mon, 21 Jun 2021 19:12:32 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E490060FDB; Mon, 21 Jun 2021 23:10:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624317018; bh=HWumwsWH2lec5Xyzhl29LjTFHmaDX+4stZPGpmEThao=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=IWsbltgxZBp8dtaG3cL4Rl7psP0pd0kjY3Inkriwqzf3nrhDLZ036xnsScsJGFz9n 5SaMy9mwfkPsAIRKG+4OLapElt385c0gvORLv4C1K982TSQPU6Er+4p/0agGBIa11p 6rgt1zHu2afjU+0VTfjoB+Rs/skYnX0aUmcnq/RJzwWIISNd24fstEpyHH33UZDvup 6xqVl7mi17q3GQ93ED2WodHJfjjUks2YuUxTGa61VYzuXzNBpRaFRiolBuVMjhIj3v L4gsdegsHUVwuyXQo3M6RgpIyupVF48YnHLV2CRmOunU6ErBqiDYbUf6aexZ33uMEr XDASnfVz/1nYg== Subject: [PATCH 02/13] misc: move exit status into trap handler From: "Darrick J. Wong" To: djwong@kernel.org, guaneryu@gmail.com Cc: Chandan Babu R , Allison Henderson , Christoph Hellwig , linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me, amir73il@gmail.com, ebiggers@kernel.org Date: Mon, 21 Jun 2021 16:10:17 -0700 Message-ID: <162431701767.4090790.11477157994058494766.stgit@locust> In-Reply-To: <162431700639.4090790.11684371602638166127.stgit@locust> References: <162431700639.4090790.11684371602638166127.stgit@locust> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Darrick J. Wong Move the "exit $status" clause of the _cleanup function into the argument to the "trap" command so that we can standardize the registration of the atexit cleanup code in the next few patches. Signed-off-by: Darrick J. Wong Reviewed-by: Chandan Babu R Reviewed-by: Allison Henderson Reviewed-by: Christoph Hellwig --- tests/generic/068 | 3 +-- tests/xfs/004 | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/generic/068 b/tests/generic/068 index 932a8560..573fbd45 100755 --- a/tests/generic/068 +++ b/tests/generic/068 @@ -22,10 +22,9 @@ _cleanup() cd / trap 0 1 2 3 15 - exit $status } -trap "_cleanup" 0 1 2 3 15 +trap "_cleanup; exit \$status" 0 1 2 3 15 # get standard environment, filters and checks . ./common/rc diff --git a/tests/xfs/004 b/tests/xfs/004 index d3fb9c95..4d92a08e 100755 --- a/tests/xfs/004 +++ b/tests/xfs/004 @@ -18,9 +18,8 @@ _cleanup() { _scratch_unmount rm -f $tmp.* - exit $status } -trap "_cleanup" 0 1 2 3 15 +trap "_cleanup; exit \$status" 0 1 2 3 15 _populate_scratch() { From patchwork Mon Jun 21 23:10:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 12335947 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.4 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=ham 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 613B3C4743C for ; Mon, 21 Jun 2021 23:10:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 47FE3611BD for ; Mon, 21 Jun 2021 23:10:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229940AbhFUXMi (ORCPT ); Mon, 21 Jun 2021 19:12:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:32790 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231303AbhFUXMi (ORCPT ); Mon, 21 Jun 2021 19:12:38 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6040460FDB; Mon, 21 Jun 2021 23:10:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624317023; bh=svo2yslHV6vLBvNuHy+0po+SdKZ2IoFuEW3kHhvDfM8=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=bRqrKuKPAjm96MJPfueL6tcKZdRg7+huTR5oV0LKo99mi77dahrcLQ5I44pr1D0jP tFIyFbFfnhkI4YZOu8YkdN6lEcg++e29aNbjt8l2PZi1c8ZRnYZnMNZBo2+Usaoe6s 03lDYBKqjGS0KjXlmTvz4ErLCdGkONc9o9yjZ8v6BPrQbroqso400kvxoUfgT6p1ad fnlFyCEcNkNOHLZDQd36OgOrgJwxPsbcwyHWL6LrQN81VVIR/QDFtP5J3RmhvT/sFy VvzEhbFd9aCxEHDOVm1oVgsXbRB7zM6/ZKu+MtC+yuHEbohBajcbzAdFb3YB4u6Gyg qWbCKbv+Dvurg== Subject: [PATCH 03/13] fstests: refactor test boilerplate code From: "Darrick J. Wong" To: djwong@kernel.org, guaneryu@gmail.com Cc: Chandan Babu R , Allison Henderson , Christoph Hellwig , Eric Biggers , linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me, amir73il@gmail.com, ebiggers@kernel.org Date: Mon, 21 Jun 2021 16:10:23 -0700 Message-ID: <162431702312.4090790.12118119463621535575.stgit@locust> In-Reply-To: <162431700639.4090790.11684371602638166127.stgit@locust> References: <162431700639.4090790.11684371602638166127.stgit@locust> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Darrick J. Wong Create two new helper functions to deal with boilerplate test code: A helper function to set the seq and seqnum variables. We will expand on this in the next patch so that fstests can autogenerate group files from now on. A helper function to register cleanup code that will run if the test exits or trips over a standard range of signals. Signed-off-by: Darrick J. Wong Reviewed-by: Chandan Babu R Reviewed-by: Allison Henderson Reviewed-by: Christoph Hellwig Reviewed-by: Eric Biggers --- common/preamble | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ new | 33 ++++++++++++--------------------- 2 files changed, 67 insertions(+), 21 deletions(-) create mode 100644 common/preamble diff --git a/common/preamble b/common/preamble new file mode 100644 index 00000000..fba766de --- /dev/null +++ b/common/preamble @@ -0,0 +1,55 @@ +#!/bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2021 Oracle. All Rights Reserved. + +# Boilerplate fstests functionality + +# Standard cleanup function. Individual tests can override this. +_cleanup() +{ + cd / + rm -r -f $tmp.* +} + +# Install the supplied cleanup code as a signal handler for HUP, INT, QUIT, +# TERM, or when the test exits. Extra signals can be specified as subsequent +# parameters. +_register_cleanup() +{ + local cleanup="$1" + shift + + test -n "$cleanup" && cleanup="${cleanup}; " + trap "${cleanup}exit \$status" EXIT HUP INT QUIT TERM $* +} + +# Prepare to run a fstest by initializing the required global variables to +# their defaults, sourcing common functions, registering a cleanup function, +# and removing the $seqres.full file. +# +# The list of group memberships for this test (e.g. auto quick rw) must be +# passed as arguments to this helper. It is not necessary to name this test +# explicitly as a member of the 'all' group. +_begin_fstest() +{ + if [ -n "$seq" ]; then + echo "_begin_fstest can only be called once!" + exit 1 + fi + + seq=`basename $0` + seqres=$RESULT_DIR/$seq + echo "QA output created by $seq" + + here=`pwd` + tmp=/tmp/$$ + status=1 # failure is the default! + + _register_cleanup _cleanup + + . ./common/rc + + # remove previous $seqres.full before test + rm -f $seqres.full + +} diff --git a/new b/new index 357983d9..531fd123 100755 --- a/new +++ b/new @@ -153,27 +153,18 @@ cat <$tdir/$id # # what am I here for? # -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 - -_cleanup() -{ - cd / - rm -f \$tmp.* -} - -# get standard environment, filters and checks -. ./common/rc -. ./common/filter - -# remove previous \$seqres.full before test -rm -f \$seqres.full +. ./common/preamble +_begin_fstest group list here + +# Override the default cleanup function. +# _cleanup() +# { +# cd / +# rm -r -f \$tmp.* +# } + +# Import common functions. +# . ./common/filter # real QA test starts here From patchwork Mon Jun 21 23:10:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 12335949 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.4 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=ham 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 8EAF2C4743C for ; Mon, 21 Jun 2021 23:10:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7A8E561245 for ; Mon, 21 Jun 2021 23:10:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230274AbhFUXMo (ORCPT ); Mon, 21 Jun 2021 19:12:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:32838 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231321AbhFUXMn (ORCPT ); Mon, 21 Jun 2021 19:12:43 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C7B3F61164; Mon, 21 Jun 2021 23:10:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624317028; bh=9wpMlNRFR79HuGP8o06CLQOuNKtKppvG1pEnF9wp3ps=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=ekgzqPcyCvCVe3qEx8FLF1d3I4VtxNK3UMmKujZWc4yUHWwSf7ptI1Eg5rYrWUV/m DmPa11XNfnDmQoeoLJL9gLHx1b/avsRNqwi+2e1MC8oA289j/Mtni5f367Y3JSSDYa kpr85yaxjrz/Ju/bxFsZNkGmTatTI4G3an9d0kcuCAtvzFxszTODWnGL3YBFQtZ/Lr /9lHkScJwIWFlXG+Wnxki3mZB18yWuo93uo0jfNluJqdVyzPEJy18GhzlMdPGbny3R qpU5Uh1d+b4sEUh88PpmRCAO0jBNA2wFq8glbejsjBUJsCaOcnM/0hvBl21yGvdOXS 2HCcW9eV67LWg== Subject: [PATCH 04/13] fstests: add tool migrate group membership data to test files From: "Darrick J. Wong" To: djwong@kernel.org, guaneryu@gmail.com Cc: Chandan Babu R , Allison Henderson , Christoph Hellwig , linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me, amir73il@gmail.com, ebiggers@kernel.org Date: Mon, 21 Jun 2021 16:10:28 -0700 Message-ID: <162431702856.4090790.8962121526105342327.stgit@locust> In-Reply-To: <162431700639.4090790.11684371602638166127.stgit@locust> References: <162431700639.4090790.11684371602638166127.stgit@locust> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Darrick J. Wong Create a tool to migrate the mapping of tests <-> groups out of the group file and into the individual test file as a _begin_fstest call. In the next patches we'll rewrite all the test files and auto generate the group files from the tests. Signed-off-by: Darrick J. Wong Reviewed-by: Chandan Babu R Reviewed-by: Allison Henderson Reviewed-by: Christoph Hellwig --- tools/convert-group | 138 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 138 insertions(+) create mode 100755 tools/convert-group diff --git a/tools/convert-group b/tools/convert-group new file mode 100755 index 00000000..81ad9934 --- /dev/null +++ b/tools/convert-group @@ -0,0 +1,138 @@ +#!/bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2021 Oracle. All Rights Reserved. + +# Move group tags from the groups file into the test files themselves. + +if [ -z "$1" ] || [ "$1" = "--help" ]; then + echo "Usage: $0 test_dir [test_dirs...]" + exit 1 +fi + +obliterate_group_file() { + sed -e 's/^#.*$//g' < group | while read test groups; do + if [ -z "$test" ]; then + continue; + elif [ ! -e "$test" ]; then + echo "Ignoring unknown test file \"$test\"." + continue + fi + + # Replace all the open-coded test preparation code with a + # single call to _begin_fstest. + sed -e '/^seqres=\$RESULT_DIR\/\$seq$/d' \ + -e '/^seqres=\"\$RESULT_DIR\/\$seq\"$/d' \ + -e '/^echo "QA output created by \$seq"$/d' \ + -e '/^here=`pwd`$/d' \ + -e '/^here=\$(pwd)$/d' \ + -e '/^here=\$PWD$/d' \ + -e '/^here=\"`pwd`\"$/d' \ + -e '/^tmp=\/tmp\/\$\$$/d' \ + -e '/^status=1.*failure.*is.*the.*default/d' \ + -e '/^status=1.*FAILure.*is.*the.*default/d' \ + -e '/^status=1.*success.*is.*the.*default/d' \ + -e '/^status=1.*default.*failure/d' \ + -e '/^echo.*QA output created by.*seq/d' \ + -e '/^# remove previous \$seqres.full before test/d' \ + -e '/^rm -f \$seqres.full/d' \ + -e 's|^# get standard environment, filters and checks|# Import common functions.|g' \ + -e '/^\. \.\/common\/rc/d' \ + -e '/^\. common\/rc/d' \ + -e 's|^seq=.*$|. ./common/preamble\n_begin_fstest '"$groups"'|g' \ + -i "$test" + + # Replace the open-coded trap calls that register cleanup code + # with a call to _register_cleanup. + # + # For tests that registered empty-string cleanups or open-coded + # calls to remove $tmp files, remove the _register_cleanup + # calls entirely because the default _cleanup does that for us. + # + # For tests that now have a _register_cleanup call for the + # _cleanup function, remove the explicit call because + # _begin_fstest already registers that for us. + # + # For tests that override _cleanup, insert a comment noting + # that it is overriding the default, to match the ./new + # template. + sed -e 's|^trap "exit \\\$status" 0 1 2 3 15|_register_cleanup ""|g' \ + -e 's|^trap "\(.*\)[[:space:]]*; exit \\\$status" 0 1 2 3 15|_register_cleanup "\1"|g' \ + -e 's|^trap "\(.*\)[[:space:]]*; exit \\\$status" 1 2 3 15|_register_cleanup "\1"|g' \ + -e 's|^trap '"'"'\(.*\)[[:space:]]*; exit \$status'"'"' 0 1 2 3 15|_register_cleanup "\1"|g' \ + -e 's|^trap "\(.*\)[[:space:]]*; exit \\\$status" 0 1 2 3 7 15|_register_cleanup "\1" BUS|g' \ + -e 's|^_register_cleanup "[[:space:]]*\([^[:space:]]*\)[[:space:]]*"|_register_cleanup "\1"|g' \ + -e '/^_register_cleanup ""$/d' \ + -e '/^_register_cleanup "rm -f \$tmp.*"$/d' \ + -e '/^_register_cleanup "_cleanup"$/d' \ + -e 's|^_cleanup()|# Override the default cleanup function.\n_cleanup()|g' \ + -i "$test" + + # If the test doesn't import any common functionality, + # get rid of the pointless comment. + if ! grep -q '^\. .*common' "$test"; then + sed -e '/^# Import common functions.$/d' -i "$test" + fi + + # Replace the "status=1" lines that don't have the usual + # "failure is the default" message if there's no other code + # between _begin_fstest and status=1. + if grep -q '^status=1$' "$test"; then + awk ' +BEGIN { + saw_groupinfo = 0; +} +{ + if ($0 ~ /^_begin_fstest/) { + saw_groupinfo = 1; + printf("%s\n", $0); + } else if ($0 ~ /^status=1$/) { + if (saw_groupinfo == 0) { + printf("%s\n", $0); + } + } else if ($0 == "") { + printf("\n"); + } else { + saw_groupinfo = 0; + printf("%s\n", $0); + } +} +' < "$test" > "$test.new" + cat "$test.new" > "$test" + rm -f "$test.new" + fi + + # Get rid of _cleanup functions that match the standard one. + # Thanks to Eric Biggers for providing this. + sed -z -E \ + -e 's/(#[^#\n]*\n)*_cleanup\(\)\n\{\n(\s+cd \/\n)?\s+rm -r?f "?\$tmp"?\.\*\n\}\n\n?//' \ + -e 's/(#[^#\n]*\n)*_cleanup\(\)\n\{\n(\s+cd \/\n)?\s+rm -fr "?\$tmp"?\.\*\n\}\n\n?//' \ + -i "$test" + + # Collapse sequences of blank lines to a single blank line. + awk ' +BEGIN { + saw_blank = 0; +} +{ + if ($0 ~ /^$/) { + if (saw_blank == 0) { + printf("\n"); + saw_blank = 1; + } + } else { + printf("%s\n", $0); + saw_blank = 0; + } +} +' < "$test" > "$test.new" + cat "$test.new" > "$test" + rm -f "$test.new" + done +} + +curr_dir="$PWD" +for tdir in "$@"; do + cd "tests/$tdir" + obliterate_group_file + cd "$curr_dir" +done From patchwork Mon Jun 21 23:10:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 12335951 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.4 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 7EE96C4743C for ; Mon, 21 Jun 2021 23:10:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 695F9611BD for ; Mon, 21 Jun 2021 23:10:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231331AbhFUXMt (ORCPT ); Mon, 21 Jun 2021 19:12:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:32882 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231246AbhFUXMt (ORCPT ); Mon, 21 Jun 2021 19:12:49 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3A46761042; Mon, 21 Jun 2021 23:10:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624317034; bh=WchwrvPZZWKDzYuyzzrlFERLZ63Majyv6K2HYW6SjJA=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=ru0sBR4L3j8XVJxt200oZ/2Bor3anAMa2ajn0VBwlKF5E1GYgMJHrzB7LHYGikc7/ K3cGJ81k3lBiDHvqetxOvBzdKWZ6L+xnVAF//N08A5yo6E6/tCURlCVdcrga1R/9oh Dz6iJah79LW4Q/XyIYG8rz6wLyx+IanWwLKboPa6A999GPkOarqXGVjv44fVfHarn2 d9GuhGVwc2AufEkd8uMv2R+RsljBJyZq7rEaZqXfTpn8cVjhGdY861pgLlo82QNGX8 sHh7oC2PS0LSou15yS1kKFJ9D1amkuh35v7ThlvF61eKeugGtXVLLThaLPmjx+AjfN WdoRIinRpgdPA== Subject: [PATCH 05/13] fstests: clean up open-coded golden output From: "Darrick J. Wong" To: djwong@kernel.org, guaneryu@gmail.com Cc: Chandan Babu R , Allison Henderson , linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me, amir73il@gmail.com, ebiggers@kernel.org Date: Mon, 21 Jun 2021 16:10:34 -0700 Message-ID: <162431703399.4090790.6089193587867854324.stgit@locust> In-Reply-To: <162431700639.4090790.11684371602638166127.stgit@locust> References: <162431700639.4090790.11684371602638166127.stgit@locust> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Darrick J. Wong Fix the handful of tests that open-coded 'QA output created by XXX'. Signed-off-by: Darrick J. Wong Reviewed-by: Chandan Babu R Reviewed-by: Allison Henderson --- tests/btrfs/006 | 2 +- tests/btrfs/006.out | 2 +- tests/btrfs/012 | 2 +- tests/btrfs/012.out | 2 +- tests/generic/184 | 2 +- tests/generic/184.out | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/btrfs/006 b/tests/btrfs/006 index 67f1fcd8..8168992f 100755 --- a/tests/btrfs/006 +++ b/tests/btrfs/006 @@ -9,7 +9,7 @@ # seq=`basename $0` seqres=$RESULT_DIR/$seq -echo "== QA output created by $seq" +echo "QA output created by $seq" here=`pwd` tmp=/tmp/$$ diff --git a/tests/btrfs/006.out b/tests/btrfs/006.out index a9769721..b7f29f96 100644 --- a/tests/btrfs/006.out +++ b/tests/btrfs/006.out @@ -1,4 +1,4 @@ -== QA output created by 006 +QA output created by 006 == Set filesystem label to TestLabel.006 == Get filesystem label TestLabel.006 diff --git a/tests/btrfs/012 b/tests/btrfs/012 index 2d4cece5..0feca7d9 100755 --- a/tests/btrfs/012 +++ b/tests/btrfs/012 @@ -15,7 +15,7 @@ # seq=`basename $0` seqres=$RESULT_DIR/$seq -echo "== QA output created by $seq" +echo "QA output created by $seq" here=`pwd` tmp=/tmp/$$ diff --git a/tests/btrfs/012.out b/tests/btrfs/012.out index 2a41e7e4..7aa5ae94 100644 --- a/tests/btrfs/012.out +++ b/tests/btrfs/012.out @@ -1 +1 @@ -== QA output created by 012 +QA output created by 012 diff --git a/tests/generic/184 b/tests/generic/184 index c80d5967..e9169244 100755 --- a/tests/generic/184 +++ b/tests/generic/184 @@ -8,7 +8,7 @@ # seq=`basename $0` seqres=$RESULT_DIR/$seq -echo "QA output created by $seq - silence is golden" +echo "QA output created by $seq" here=`pwd` tmp=/tmp/$$ diff --git a/tests/generic/184.out b/tests/generic/184.out index 2d19691d..4c300543 100644 --- a/tests/generic/184.out +++ b/tests/generic/184.out @@ -1 +1 @@ -QA output created by 184 - silence is golden +QA output created by 184 From patchwork Mon Jun 21 23:10:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 12335953 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.4 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=ham 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 81103C4743C for ; Mon, 21 Jun 2021 23:10:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 69005611BD for ; Mon, 21 Jun 2021 23:10:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231417AbhFUXMz (ORCPT ); Mon, 21 Jun 2021 19:12:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:32918 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231303AbhFUXMy (ORCPT ); Mon, 21 Jun 2021 19:12:54 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B524261042; Mon, 21 Jun 2021 23:10:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624317039; bh=fJpokN53tpLYp7Wo6Sg+nVHbzCp4syjZc/OV3TKwFlE=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=M1vAdVF/a+Bra+VndTlA8+UFqI4GYmKKrlvynhzhBzocSOtFGdVIC5PiPQ4VJM2wz 77Ubj8CVYSrQZEh1OPDf5z5Hb3bULV+7hjWsCP7SbrCEe5mDUORawcpDtne7KyCG2d vBinz8Yf0Y9M9UL05gjltSt0t/e3Z/oq3hdjEjXhRmINgwLd/vuQ32sT7uoGYU19Um kYTjNGdpAD4jYtHuidTlq5PEiE0RBIrpq1LW79Qy7OWEfDsxdF5cT/Zi6yTwspti1n sZTvh1jkJ5z8Dxihu+a1N/LKcg5ukutgVMsTi0tMbITo6Uhfdv06S5MOYrH4FrD6xD NsN3B7EybO4Bw== Subject: [PATCH 06/13] fstests: move test group info to test files From: "Darrick J. Wong" To: djwong@kernel.org, guaneryu@gmail.com Cc: Allison Henderson , Eric Biggers , linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me, amir73il@gmail.com, ebiggers@kernel.org Date: Mon, 21 Jun 2021 16:10:39 -0700 Message-ID: <162431703944.4090790.8160038305801433822.stgit@locust> In-Reply-To: <162431700639.4090790.11684371602638166127.stgit@locust> References: <162431700639.4090790.11684371602638166127.stgit@locust> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org 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 Reviewed-by: Allison Henderson Reviewed-by: Eric Biggers --- tests/btrfs/001 | 19 +++---------------- tests/btrfs/002 | 19 +++---------------- tests/btrfs/003 | 15 ++++----------- tests/btrfs/004 | 15 ++++----------- tests/btrfs/005 | 21 +++------------------ tests/btrfs/006 | 21 +++------------------ 6 files changed, 20 insertions(+), 90 deletions(-) diff --git a/tests/btrfs/001 b/tests/btrfs/001 index fb051e8a..000aeb34 100755 --- a/tests/btrfs/001 +++ b/tests/btrfs/001 @@ -6,23 +6,10 @@ # # Test btrfs's subvolume and snapshot support # -seq=`basename $0` -seqres=$RESULT_DIR/$seq -echo "QA output created by $seq" +. ./common/preamble +_begin_fstest auto quick subvol snapshot -here=`pwd` -tmp=/tmp/$$ -status=1 # failure is the default! - -_cleanup() -{ - rm -f $tmp.* -} - -trap "_cleanup ; exit \$status" 0 1 2 3 15 - -# get standard environment, filters and checks -. ./common/rc +# Import common functions. . ./common/filter . ./common/filter.btrfs diff --git a/tests/btrfs/002 b/tests/btrfs/002 index 66775562..58f0cdcd 100755 --- a/tests/btrfs/002 +++ b/tests/btrfs/002 @@ -6,23 +6,10 @@ # # Extented btrfs snapshot test cases # -seq=`basename $0` -seqres=$RESULT_DIR/$seq -echo "QA output created by $seq" +. ./common/preamble +_begin_fstest auto snapshot -here=`pwd` -tmp=/tmp/$$ -status=1 # failure is the default! - -_cleanup() -{ - rm -f $tmp.* -} - -trap "_cleanup ; exit \$status" 0 1 2 3 15 - -# get standard environment, filters and checks -. ./common/rc +# Import common functions. . ./common/filter _supported_fs btrfs diff --git a/tests/btrfs/003 b/tests/btrfs/003 index fbb313fb..d241ec6e 100755 --- a/tests/btrfs/003 +++ b/tests/btrfs/003 @@ -6,16 +6,11 @@ # # btrfs vol tests # -seq=`basename $0` -seqres=$RESULT_DIR/$seq -echo "QA output created by $seq" +. ./common/preamble +_begin_fstest auto replace volume balance -here=`pwd` -tmp=/tmp/$$ -status=1 # failure is the default! dev_removed=0 removed_dev_htl="" -trap "_cleanup; exit \$status" 0 1 2 3 15 # Check if all scratch dev pools are deletable deletable_scratch_dev_pool() @@ -32,6 +27,7 @@ deletable_scratch_dev_pool() return 0 } +# Override the default cleanup function. _cleanup() { cd / @@ -42,8 +38,7 @@ _cleanup() fi } -# get standard environment, filters and checks -. ./common/rc +# Import common functions. . ./common/filter _supported_fs btrfs @@ -51,8 +46,6 @@ _require_scratch _require_scratch_dev_pool 4 _require_command "$WIPEFS_PROG" wipefs -rm -f $seqres.full - # Test cases related to raid in btrfs _test_raid0() { diff --git a/tests/btrfs/004 b/tests/btrfs/004 index 0458d2b6..4e767a2f 100755 --- a/tests/btrfs/004 +++ b/tests/btrfs/004 @@ -9,25 +9,20 @@ # run filefrag to get the extent mapping and follow the backrefs. # We check to end up back at the original file with the correct offset. # -seq=`basename $0` -seqres=$RESULT_DIR/$seq -echo "QA output created by $seq" +. ./common/preamble +_begin_fstest auto rw metadata -here=`pwd` -tmp=/tmp/$$ -status=1 noise_pid=0 +# Override the default cleanup function. _cleanup() { rm $tmp.running wait rm -f $tmp.* } -trap "_cleanup; exit \$status" 0 1 2 3 15 -# get standard environment, filters and checks -. ./common/rc +# Import common functions. . ./common/filter # real QA test starts here @@ -38,8 +33,6 @@ _require_btrfs_command inspect-internal logical-resolve _require_btrfs_command inspect-internal inode-resolve _require_command "$FILEFRAG_PROG" filefrag -rm -f $seqres.full - FILEFRAG_FILTER=' if (/blocks? of (\d+) bytes/) { $blocksize = $1; diff --git a/tests/btrfs/005 b/tests/btrfs/005 index ff20a638..878a8c7c 100755 --- a/tests/btrfs/005 +++ b/tests/btrfs/005 @@ -6,23 +6,11 @@ # # Btrfs Online defragmentation tests # -seq=`basename $0` -seqres=$RESULT_DIR/$seq -echo "QA output created by $seq" -here="`pwd`" -tmp=/tmp/$$ +. ./common/preamble +_begin_fstest auto defrag cnt=119 filesize=48000 -status=1 # failure is the default! -trap "_cleanup; exit \$status" 0 1 2 3 15 - -_cleanup() -{ - cd / - rm -f $tmp.* -} - _create_file() { if [ $1 -ne 2 ]; then @@ -111,8 +99,7 @@ _rundefrag() _check_scratch_fs } -# get standard environment, filters and checks -. ./common/rc +# Import common functions. . ./common/filter . ./common/defrag @@ -120,8 +107,6 @@ _rundefrag() _supported_fs btrfs _require_scratch -rm -f $seqres.full - _scratch_mkfs >/dev/null 2>&1 _scratch_mount _require_defrag diff --git a/tests/btrfs/006 b/tests/btrfs/006 index 8168992f..fd0f89e2 100755 --- a/tests/btrfs/006 +++ b/tests/btrfs/006 @@ -7,23 +7,10 @@ # 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" +. ./common/preamble +_begin_fstest auto quick volume -here=`pwd` -tmp=/tmp/$$ -status=1 # failure is the default! -trap "_cleanup; exit \$status" 0 1 2 3 15 - -_cleanup() -{ - cd / - rm -f $tmp.* -} - -# get standard environment, filters and checks -. ./common/rc +# Import common functions. . ./common/filter.btrfs # real QA test starts here @@ -33,8 +20,6 @@ _supported_fs btrfs _require_scratch _require_scratch_dev_pool -rm -f $seqres.full - FIRST_POOL_DEV=`echo $SCRATCH_DEV_POOL | awk '{print $1}'` LAST_POOL_DEV=`echo $SCRATCH_DEV_POOL | awk '{print $NF}'` TOTAL_DEVS=`echo $SCRATCH_DEV_POOL | wc -w` From patchwork Mon Jun 21 23:10:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 12335955 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.4 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 9E1D7C48BC2 for ; Mon, 21 Jun 2021 23:10:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 88915611BD for ; Mon, 21 Jun 2021 23:10:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231346AbhFUXNA (ORCPT ); Mon, 21 Jun 2021 19:13:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:32976 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231246AbhFUXNA (ORCPT ); Mon, 21 Jun 2021 19:13:00 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 34EA960FDB; Mon, 21 Jun 2021 23:10:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624317045; bh=8nBpmfVDlQRT+uYDol2DweWYnRSh80cr5VRwZGKqp+I=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=UrFl+seuoVsHd1IRqm/IcXrLLyryPq4u19Q4zXe/ukEPPIiZr95YPDZs62JwIarPs nph4Dm+qw1ZJtIunVrFSIXUDG785FWHznE6TPLyC8YrKWRcduMDYeDQ3LeQRboq9DL /ijJkyr32EVOei61IQSUMd1IDYPRFqrhHaBCy32Y5OTmCudV4cc3coFur9gwVgZfzK ZTlx41t8sJM0V3XQJAA9aDyoTpQMDv5Zh57qHjjzLOe4cVojnz9sPe11P9wy5Le/By CeoyHN3Md/lpxwfn612y1LmKph5dFC3yIQQqDp5kCSRuI3dGMiPamseIQviLYLwCZN n9JiO/OVV5qyw== Subject: [PATCH 07/13] fstests: automatically generate group files From: "Darrick J. Wong" To: djwong@kernel.org, guaneryu@gmail.com Cc: Chandan Babu R , Allison Henderson , linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me, amir73il@gmail.com, ebiggers@kernel.org Date: Mon, 21 Jun 2021 16:10:44 -0700 Message-ID: <162431704491.4090790.16378099216662572242.stgit@locust> In-Reply-To: <162431700639.4090790.11684371602638166127.stgit@locust> References: <162431700639.4090790.11684371602638166127.stgit@locust> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Darrick J. Wong Now that we've moved the group membership details into the test case files themselves, automatically generate the group files during build. The autogenerated files are named "group.list" instead of "group" to avoid conflicts between generated and (stale) SCM files as everyone rebases. Signed-off-by: Darrick J. Wong Reviewed-by: Chandan Babu R Reviewed-by: Allison Henderson --- .gitignore | 3 +++ common/preamble | 8 ++++++++ include/buildgrouplist | 8 ++++++++ tests/Makefile | 4 ++++ tests/btrfs/Makefile | 6 +++++- tests/ceph/Makefile | 6 +++++- tests/cifs/Makefile | 6 +++++- tests/ext4/Makefile | 6 +++++- tests/f2fs/Makefile | 6 +++++- tests/generic/Makefile | 6 +++++- tests/nfs/Makefile | 6 +++++- tests/ocfs2/Makefile | 6 +++++- tests/overlay/Makefile | 6 +++++- tests/perf/Makefile | 6 +++++- tests/shared/Makefile | 6 +++++- tests/udf/Makefile | 6 +++++- tests/xfs/Makefile | 6 +++++- tools/mkgroupfile | 42 ++++++++++++++++++++++++++++++++++++++++++ 18 files changed, 130 insertions(+), 13 deletions(-) create mode 100644 include/buildgrouplist create mode 100755 tools/mkgroupfile diff --git a/.gitignore b/.gitignore index d3194e76..2d72b064 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,9 @@ tags /local.config /results +# autogenerated group files +/tests/*/group.list + # autoconf generated files /aclocal.m4 /autom4te.cache diff --git a/common/preamble b/common/preamble index fba766de..66b0ed05 100644 --- a/common/preamble +++ b/common/preamble @@ -38,6 +38,14 @@ _begin_fstest() fi seq=`basename $0` + + # If we're only running the test to generate a group.list file, + # spit out the group data and exit. + if [ -n "$GENERATE_GROUPS" ]; then + echo "$seq $@" + exit 0 + fi + seqres=$RESULT_DIR/$seq echo "QA output created by $seq" diff --git a/include/buildgrouplist b/include/buildgrouplist new file mode 100644 index 00000000..d898efa3 --- /dev/null +++ b/include/buildgrouplist @@ -0,0 +1,8 @@ +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2021 Oracle, Inc. All Rights Reserved. +# +.PHONY: group.list + +group.list: + @echo " [GROUP] $$PWD/$@" + $(Q)$(TOPDIR)/tools/mkgroupfile $@ diff --git a/tests/Makefile b/tests/Makefile index 8ce8f209..5c8f0b10 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -7,6 +7,10 @@ include $(TOPDIR)/include/builddefs TESTS_SUBDIRS = $(sort $(dir $(wildcard $(CURDIR)/[[:lower:]]*/))) +SUBDIRS = $(wildcard [[:lower:]]*) + +default: $(SUBDIRS) + include $(BUILDRULES) install: $(addsuffix -install,$(TESTS_SUBDIRS)) diff --git a/tests/btrfs/Makefile b/tests/btrfs/Makefile index 2d936421..1b72a1a1 100644 --- a/tests/btrfs/Makefile +++ b/tests/btrfs/Makefile @@ -4,16 +4,20 @@ TOPDIR = ../.. include $(TOPDIR)/include/builddefs +include $(TOPDIR)/include/buildgrouplist BTRFS_DIR = btrfs TARGET_DIR = $(PKG_LIB_DIR)/$(TESTS_DIR)/$(BTRFS_DIR) +DIRT = group.list + +default: $(DIRT) include $(BUILDRULES) install: $(INSTALL) -m 755 -d $(TARGET_DIR) $(INSTALL) -m 755 $(TESTS) $(TARGET_DIR) - $(INSTALL) -m 644 group $(TARGET_DIR) + $(INSTALL) -m 644 group.list $(TARGET_DIR) $(INSTALL) -m 644 $(OUTFILES) $(TARGET_DIR) # Nothing. diff --git a/tests/ceph/Makefile b/tests/ceph/Makefile index 55e35d77..2761e1e9 100644 --- a/tests/ceph/Makefile +++ b/tests/ceph/Makefile @@ -2,16 +2,20 @@ TOPDIR = ../.. include $(TOPDIR)/include/builddefs +include $(TOPDIR)/include/buildgrouplist CEPH_DIR = ceph TARGET_DIR = $(PKG_LIB_DIR)/$(TESTS_DIR)/$(CEPH_DIR) +DIRT = group.list + +default: $(DIRT) include $(BUILDRULES) install: $(INSTALL) -m 755 -d $(TARGET_DIR) $(INSTALL) -m 755 $(TESTS) $(TARGET_DIR) - $(INSTALL) -m 644 group $(TARGET_DIR) + $(INSTALL) -m 644 group.list $(TARGET_DIR) $(INSTALL) -m 644 $(OUTFILES) $(TARGET_DIR) # Nothing. diff --git a/tests/cifs/Makefile b/tests/cifs/Makefile index 0c5cf3be..62c48935 100644 --- a/tests/cifs/Makefile +++ b/tests/cifs/Makefile @@ -4,16 +4,20 @@ TOPDIR = ../.. include $(TOPDIR)/include/builddefs +include $(TOPDIR)/include/buildgrouplist CIFS_DIR = cifs TARGET_DIR = $(PKG_LIB_DIR)/$(TESTS_DIR)/$(CIFS_DIR) +DIRT = group.list + +default: $(DIRT) include $(BUILDRULES) install: $(INSTALL) -m 755 -d $(TARGET_DIR) $(INSTALL) -m 755 $(TESTS) $(TARGET_DIR) - $(INSTALL) -m 644 group $(TARGET_DIR) + $(INSTALL) -m 644 group.list $(TARGET_DIR) $(INSTALL) -m 644 $(OUTFILES) $(TARGET_DIR) # Nothing. diff --git a/tests/ext4/Makefile b/tests/ext4/Makefile index beb1541f..a2a0d561 100644 --- a/tests/ext4/Makefile +++ b/tests/ext4/Makefile @@ -4,16 +4,20 @@ TOPDIR = ../.. include $(TOPDIR)/include/builddefs +include $(TOPDIR)/include/buildgrouplist EXT4_DIR = ext4 TARGET_DIR = $(PKG_LIB_DIR)/$(TESTS_DIR)/$(EXT4_DIR) +DIRT = group.list + +default: $(DIRT) include $(BUILDRULES) install: $(INSTALL) -m 755 -d $(TARGET_DIR) $(INSTALL) -m 755 $(TESTS) $(TARGET_DIR) - $(INSTALL) -m 644 group $(TARGET_DIR) + $(INSTALL) -m 644 group.list $(TARGET_DIR) $(INSTALL) -m 644 $(OUTFILES) $(TARGET_DIR) # Nothing. diff --git a/tests/f2fs/Makefile b/tests/f2fs/Makefile index d13bca3f..9d1ed3c6 100644 --- a/tests/f2fs/Makefile +++ b/tests/f2fs/Makefile @@ -5,16 +5,20 @@ TOPDIR = ../.. include $(TOPDIR)/include/builddefs +include $(TOPDIR)/include/buildgrouplist F2FS_DIR = f2fs TARGET_DIR = $(PKG_LIB_DIR)/$(TESTS_DIR)/$(F2FS_DIR) +DIRT = group.list + +default: $(DIRT) include $(BUILDRULES) install: $(INSTALL) -m 755 -d $(TARGET_DIR) $(INSTALL) -m 755 $(TESTS) $(TARGET_DIR) - $(INSTALL) -m 644 group $(TARGET_DIR) + $(INSTALL) -m 644 group.list $(TARGET_DIR) $(INSTALL) -m 644 $(OUTFILES) $(TARGET_DIR) # Nothing. diff --git a/tests/generic/Makefile b/tests/generic/Makefile index 3878d05c..b464b22b 100644 --- a/tests/generic/Makefile +++ b/tests/generic/Makefile @@ -4,16 +4,20 @@ TOPDIR = ../.. include $(TOPDIR)/include/builddefs +include $(TOPDIR)/include/buildgrouplist GENERIC_DIR = generic TARGET_DIR = $(PKG_LIB_DIR)/$(TESTS_DIR)/$(GENERIC_DIR) +DIRT = group.list + +default: $(DIRT) include $(BUILDRULES) install: $(INSTALL) -m 755 -d $(TARGET_DIR) $(INSTALL) -m 755 $(TESTS) $(TARGET_DIR) - $(INSTALL) -m 644 group $(TARGET_DIR) + $(INSTALL) -m 644 group.list $(TARGET_DIR) $(INSTALL) -m 644 $(OUTFILES) $(TARGET_DIR) # Nothing. diff --git a/tests/nfs/Makefile b/tests/nfs/Makefile index 754f2b25..128d2a3a 100644 --- a/tests/nfs/Makefile +++ b/tests/nfs/Makefile @@ -4,16 +4,20 @@ TOPDIR = ../.. include $(TOPDIR)/include/builddefs +include $(TOPDIR)/include/buildgrouplist NFS_DIR = nfs TARGET_DIR = $(PKG_LIB_DIR)/$(TESTS_DIR)/$(NFS_DIR) +DIRT = group.list + +default: $(DIRT) include $(BUILDRULES) install: $(INSTALL) -m 755 -d $(TARGET_DIR) $(INSTALL) -m 755 $(TESTS) $(TARGET_DIR) - $(INSTALL) -m 644 group $(TARGET_DIR) + $(INSTALL) -m 644 group.list $(TARGET_DIR) $(INSTALL) -m 644 $(OUTFILES) $(TARGET_DIR) # Nothing. diff --git a/tests/ocfs2/Makefile b/tests/ocfs2/Makefile index e1337908..260ad31b 100644 --- a/tests/ocfs2/Makefile +++ b/tests/ocfs2/Makefile @@ -4,16 +4,20 @@ TOPDIR = ../.. include $(TOPDIR)/include/builddefs +include $(TOPDIR)/include/buildgrouplist OCFS2_DIR = ocfs2 TARGET_DIR = $(PKG_LIB_DIR)/$(TESTS_DIR)/$(OCFS2_DIR) +DIRT = group.list + +default: $(DIRT) include $(BUILDRULES) install: $(INSTALL) -m 755 -d $(TARGET_DIR) $(INSTALL) -m 755 $(TESTS) $(TARGET_DIR) - $(INSTALL) -m 644 group $(TARGET_DIR) + $(INSTALL) -m 644 group.list $(TARGET_DIR) $(INSTALL) -m 644 $(OUTFILES) $(TARGET_DIR) # Nothing. diff --git a/tests/overlay/Makefile b/tests/overlay/Makefile index b07f8925..de3203c2 100644 --- a/tests/overlay/Makefile +++ b/tests/overlay/Makefile @@ -4,16 +4,20 @@ TOPDIR = ../.. include $(TOPDIR)/include/builddefs +include $(TOPDIR)/include/buildgrouplist TEST_DIR = overlay TARGET_DIR = $(PKG_LIB_DIR)/$(TESTS_DIR)/$(TEST_DIR) +DIRT = group.list + +default: $(DIRT) include $(BUILDRULES) install: $(INSTALL) -m 755 -d $(TARGET_DIR) $(INSTALL) -m 755 $(TESTS) $(TARGET_DIR) - $(INSTALL) -m 644 group $(TARGET_DIR) + $(INSTALL) -m 644 group.list $(TARGET_DIR) $(INSTALL) -m 644 $(OUTFILES) $(TARGET_DIR) # Nothing. diff --git a/tests/perf/Makefile b/tests/perf/Makefile index 620f1dbf..0c74ba39 100644 --- a/tests/perf/Makefile +++ b/tests/perf/Makefile @@ -4,16 +4,20 @@ TOPDIR = ../.. include $(TOPDIR)/include/builddefs +include $(TOPDIR)/include/buildgrouplist PERF_DIR = perf TARGET_DIR = $(PKG_LIB_DIR)/$(TESTS_DIR)/$(PERF_DIR) +DIRT = group.list + +default: $(DIRT) include $(BUILDRULES) install: $(INSTALL) -m 755 -d $(TARGET_DIR) $(INSTALL) -m 755 $(TESTS) $(TARGET_DIR) - $(INSTALL) -m 644 group $(TARGET_DIR) + $(INSTALL) -m 644 group.list $(TARGET_DIR) $(INSTALL) -m 644 $(OUTFILES) $(TARGET_DIR) # Nothing. diff --git a/tests/shared/Makefile b/tests/shared/Makefile index 8a832782..f3128714 100644 --- a/tests/shared/Makefile +++ b/tests/shared/Makefile @@ -4,16 +4,20 @@ TOPDIR = ../.. include $(TOPDIR)/include/builddefs +include $(TOPDIR)/include/buildgrouplist SHARED_DIR = shared TARGET_DIR = $(PKG_LIB_DIR)/$(TESTS_DIR)/$(SHARED_DIR) +DIRT = group.list + +default: $(DIRT) include $(BUILDRULES) install: $(INSTALL) -m 755 -d $(TARGET_DIR) $(INSTALL) -m 755 $(TESTS) $(TARGET_DIR) - $(INSTALL) -m 644 group $(TARGET_DIR) + $(INSTALL) -m 644 group.list $(TARGET_DIR) $(INSTALL) -m 644 $(OUTFILES) $(TARGET_DIR) # Nothing. diff --git a/tests/udf/Makefile b/tests/udf/Makefile index c9c9f1bd..ed4434f0 100644 --- a/tests/udf/Makefile +++ b/tests/udf/Makefile @@ -4,16 +4,20 @@ TOPDIR = ../.. include $(TOPDIR)/include/builddefs +include $(TOPDIR)/include/buildgrouplist UDF_DIR = udf TARGET_DIR = $(PKG_LIB_DIR)/$(TESTS_DIR)/$(UDF_DIR) +DIRT = group.list + +default: $(DIRT) include $(BUILDRULES) install: $(INSTALL) -m 755 -d $(TARGET_DIR) $(INSTALL) -m 755 $(TESTS) $(TARGET_DIR) - $(INSTALL) -m 644 group $(TARGET_DIR) + $(INSTALL) -m 644 group.list $(TARGET_DIR) $(INSTALL) -m 644 $(OUTFILES) $(TARGET_DIR) # Nothing. diff --git a/tests/xfs/Makefile b/tests/xfs/Makefile index d64800ea..5f413e67 100644 --- a/tests/xfs/Makefile +++ b/tests/xfs/Makefile @@ -4,16 +4,20 @@ TOPDIR = ../.. include $(TOPDIR)/include/builddefs +include $(TOPDIR)/include/buildgrouplist XFS_DIR = xfs TARGET_DIR = $(PKG_LIB_DIR)/$(TESTS_DIR)/$(XFS_DIR) +DIRT = group.list + +default: $(DIRT) include $(BUILDRULES) install: $(INSTALL) -m 755 -d $(TARGET_DIR) $(INSTALL) -m 755 $(TESTS) $(TARGET_DIR) - $(INSTALL) -m 644 group $(TARGET_DIR) + $(INSTALL) -m 644 group.list $(TARGET_DIR) $(INSTALL) -m 644 $(OUTFILES) $(TARGET_DIR) # Nothing. diff --git a/tools/mkgroupfile b/tools/mkgroupfile new file mode 100755 index 00000000..0681e5d2 --- /dev/null +++ b/tools/mkgroupfile @@ -0,0 +1,42 @@ +#!/bin/bash + +# Generate a group file from the _begin_fstest call in each test. + +if [ "$1" = "--help" ]; then + echo "Usage: (cd tests/XXX/ ; ../../tools/mkgroupfile [output])" + exit 1 +fi + +test_dir="$PWD" +groupfile="$1" + +if [ ! -x ../../check ]; then + echo "$0: Run this from tests/XXX/." + exit 1 +fi + +generate_groupfile() { + cat << ENDL +# QA groups control file, automatically generated. +# See _begin_fstest in each test for details. + +ENDL + cd ../../ + export GENERATE_GROUPS=yes + grep -R -l "^_begin_fstest" "$test_dir/" 2>/dev/null | while read testfile; do + test -x "$testfile" && "$testfile" + done | sort -g + cd "$test_dir" +} + +if [ -z "$groupfile" ] || [ "$groupfile" = "-" ]; then + # Dump the group file to stdout and exit + generate_groupfile + exit 0 +fi + +# Otherwise, write the group file to disk somewhere. +ngroupfile="${groupfile}.new" +rm -f "$ngroupfile" +generate_groupfile >> "$ngroupfile" +mv "$ngroupfile" "$groupfile" From patchwork Mon Jun 21 23:10:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 12335957 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.4 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=ham 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 B5A74C4743C for ; Mon, 21 Jun 2021 23:10:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 99116611BD for ; Mon, 21 Jun 2021 23:10:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229940AbhFUXNF (ORCPT ); Mon, 21 Jun 2021 19:13:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:33012 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231246AbhFUXNF (ORCPT ); Mon, 21 Jun 2021 19:13:05 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A49E061042; Mon, 21 Jun 2021 23:10:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624317050; bh=j1QIAiCE+FD29sBmZuDMQ5N/OGckrJP81XxwkXsQ8p0=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=Euqc9gV/HGF93+nMH/gbTy3TJjjk5cAjTus/BiocyDseEp5I7jXRQJC5HfMUWoFlo yAbcLPtwnWU62xULAb4RY3CFfWYuArP5fas5RRmK6en1/B1B4c13O21NFeZhS73rQA /CrO6gOzZnkGvS/hSaVJc0H0YUv1RMOe4QYiy7pW5GZi/ZE7vQd9Aohv2i5WXjrqIa ZAXCc6U+67tZwnHNuWNvOli54Z5KRvvjDDc2pGmR6OE9YgCvwTfF7oVysoycLIGNfA 8CTgDQm4gRuNKmdVuiL9wRxp842dkjIw5jPWHbpHJDF1c/CGiOee3vxx6h+/r2yOEA geYuwLFn2Phow== Subject: [PATCH 08/13] fstests: convert nextid to use automatic group generation From: "Darrick J. Wong" To: djwong@kernel.org, guaneryu@gmail.com Cc: Allison Henderson , Chandan Babu R , Eric Biggers , linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me, amir73il@gmail.com, ebiggers@kernel.org Date: Mon, 21 Jun 2021 16:10:50 -0700 Message-ID: <162431705041.4090790.3664142527610163884.stgit@locust> In-Reply-To: <162431700639.4090790.11684371602638166127.stgit@locust> References: <162431700639.4090790.11684371602638166127.stgit@locust> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Darrick J. Wong Convert the nextid script to use the automatic group file generation to figure out the next available test id. Signed-off-by: Darrick J. Wong Reviewed-by: Allison Henderson Reviewed-by: Chandan Babu R Reviewed-by: Eric Biggers --- tools/nextid | 1 - tools/nextid | 31 +++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) delete mode 120000 tools/nextid create mode 100755 tools/nextid diff --git a/tools/nextid b/tools/nextid deleted file mode 120000 index 5c31d602..00000000 --- a/tools/nextid +++ /dev/null @@ -1 +0,0 @@ -sort-group \ No newline at end of file diff --git a/tools/nextid b/tools/nextid new file mode 100755 index 00000000..9507de29 --- /dev/null +++ b/tools/nextid @@ -0,0 +1,31 @@ +#!/bin/bash + +# Compute the next available test id in a given test directory. + +if [ $# != 1 ] || [ "$1" = "--help" ] || [ ! -d "tests/$1/" ]; then + echo "Usage: $0 test_dir" + exit 1 +fi + +. ./common/test_names + +i=0 +eof=1 + +while read found other_junk; +do + i=$((i+1)) + id=`printf "%03d" $i` + if [ "$id" != "$found" ]; then + eof=0 + break + fi +done < <(cd "tests/$1/" ; ../../tools/mkgroupfile | \ + grep "^$VALID_TEST_NAME\>" | tr - ' ') + +if [ $eof -eq 1 ]; then + i=$((i+1)) + id=`printf "%03d" $i` +fi + +echo "$1/$id" From patchwork Mon Jun 21 23:10:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 12335959 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.4 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 3372DC4743C for ; Mon, 21 Jun 2021 23:10:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1E0FA61164 for ; Mon, 21 Jun 2021 23:10:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231128AbhFUXNL (ORCPT ); Mon, 21 Jun 2021 19:13:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:33052 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231246AbhFUXNK (ORCPT ); Mon, 21 Jun 2021 19:13:10 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2428560FDB; Mon, 21 Jun 2021 23:10:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624317056; bh=uoj3umBM0S8ULTxG7t7QXfsBTca2AocJlJn+jhlAEE0=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=bVXlHvBuLjimb37gddr0MlajV3nYOQCQbP8rh4XuDHn3eLzYNCjdptSKzXBhjjUjL eOu30GoqnnRFYewFN5d4acuyQHwVav2SrdzQZ3UJgNidNDRduouUpkn4noARfA3Kzq OvaOZfp1O0d9nKqGNw69ACCQVcQxox5HEoeYEZFmT7pCTYPlCkZ12+Jkz7LDW7xnca l4gIEZY90UTrbAmCByI5VljshZXyFPqKgB2Ry5tZjiE4nTsyo2/KwOMZRWNu/lySnc VaqJs3aVwsBIVHJMeEKESAYk7PScKIB1vNw/UKHEP1VP6aGwn2ImQOUTL5TzMcIr2b YZHf/jQNAOPiA== Subject: [PATCH 09/13] fstests: adapt the new test script to our new group tagging scheme From: "Darrick J. Wong" To: djwong@kernel.org, guaneryu@gmail.com Cc: Chandan Babu R , Allison Henderson , linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me, amir73il@gmail.com, ebiggers@kernel.org Date: Mon, 21 Jun 2021 16:10:55 -0700 Message-ID: <162431705586.4090790.4739380907901738103.stgit@locust> In-Reply-To: <162431700639.4090790.11684371602638166127.stgit@locust> References: <162431700639.4090790.11684371602638166127.stgit@locust> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Darrick J. Wong Now that we autogenerate group files, adapt the new test creation script to use autogenerated group files and to set the group data in the new test. Signed-off-by: Darrick J. Wong Reviewed-by: Chandan Babu R Reviewed-by: Allison Henderson --- new | 179 ++++++++++++++++++++----------------------------------------------- 1 file changed, 54 insertions(+), 125 deletions(-) diff --git a/new b/new index 531fd123..07144399 100755 --- a/new +++ b/new @@ -9,7 +9,8 @@ iam=new . ./common/test_names -trap "rm -f /tmp/$$.; exit" 0 1 2 3 15 +tmpfile="/tmp/$$." +trap "rm -f $tmpfile; exit" 0 1 2 3 15 _cleanup() { @@ -26,71 +27,18 @@ usage() [ $# -eq 0 ] && usage tdir=tests/$1 -shift - -if [ ! -f $tdir/group ] -then - echo "Creating the $tdir/group index ..." - cat <<'End-of-File' >$tdir/group -# QA groups control -# -# define groups and default group owners -# do not start group name with a digit -# - -# catch-all -# -other some-user-login - -# test-group association ... one line per test -# -End-of-File -fi - -if [ ! -w $tdir/group ] -then - chmod u+w $tdir/group - echo "Warning: making the index file \"$tdir/group\" writeable" -fi - -if make -then - : -else - echo "Warning: make failed -- some tests may be missing" -fi i=0 line=0 eof=1 -[ -f "$tdir/group" ] || usage +[ -d "$tdir/" ] || usage export AWK_PROG="$(type -P awk)" [ "$AWK_PROG" = "" ] && { echo "awk not found"; exit; } -for found in `cat $tdir/group | tr - ' ' | $AWK_PROG '{ print $1 }'` -do - line=$((line+1)) - if [ -z "$found" ] || [ "$found" == "#" ]; then - continue - elif ! echo "$found" | grep -q "^$VALID_TEST_NAME$"; then - # this one is for tests not named by a number - continue - fi - i=$((i+1)) - id=`printf "%03d" $i` - if [ "$id" != "$found" ];then - eof=0 - break - fi -done -if [ $eof -eq 1 ]; then - line=$((line+1)) - i=$((i+1)) - id=`printf "%03d" $i` -fi - +id="$(basename "$(./tools/nextid "$1")")" echo "Next test id is $id" +shift read -p "Append a name to the ID? Test name will be $id-\$name. y,[n]: " -r if [[ $REPLY = [Yy] ]]; then @@ -113,24 +61,9 @@ if [[ $REPLY = [Yy] ]]; then fi done - # now find where to insert this name - eof=1 - for found in `tail -n +$line $tdir/group | $AWK_PROG '{ print $1 }'`; do - found_id=$(echo "$found" | cut -d "-" -f 1 - ) - line=$((line+1)) - if [ -z "$found" ] || [ "$found" == "#" ]; then - continue - elif [ $found_id -gt $id ]; then - eof=0 - break - fi - done - if [ $eof -eq 0 ]; then - # If place wasn't found, let $line be the end of the file - line=$((line-1)) - fi id="$id-$name" fi + echo "Creating test file '$id'" if [ -f $tdir/$id ] @@ -140,6 +73,53 @@ then exit 1 fi +if [ $# -eq 0 ] +then + + while true + do + echo -n "Add to group(s) [other] (separate by space, ? for list): " + read ans + [ -z "$ans" ] && ans=other + if [ "X$ans" = "X?" ] + then + for d in $SRC_GROUPS; do + (cd "tests/$d/" ; ../../tools/mkgroupfile "$tmpfile") + l=$(sed -n < "$tmpfile" \ + -e 's/#.*//' \ + -e 's/$/ /' \ + -e 's;\(^[0-9][0-9][0-9]\)\(.*$\);\2;p') + grpl="$grpl $l" + done + lst=`for word in $grpl; do echo $word; done | sort| uniq ` + echo $lst + else + # only allow lower cases, spaces, digits and underscore in group + inval=`echo $ans | tr -d '[:lower:][:space:][:digit:]_'` + if [ "$inval" != "" ]; then + echo "Invalid characters in group(s): $inval" + echo "Only lower cases, digits and underscore are allowed in groups, separated by space" + continue + else + # remove redundant spaces/tabs + ans=`echo "$ans" | sed 's/\s\+/ /g'` + break + fi + fi + done +else + # expert mode, groups are on the command line + # + (cd "$tdir" ; ../../tools/mkgroupfile "$tmpfile") + for g in $* + do + if ! grep -q "[[:space:]]$g" "$tmpfile"; then + echo "Warning: group \"$g\" not defined in $tdir tests" + fi + done + ans="$*" +fi + echo -n "Creating skeletal script for you to edit ..." year=`date +%Y` @@ -154,7 +134,7 @@ cat <$tdir/$id # what am I here for? # . ./common/preamble -_begin_fstest group list here +_begin_fstest $ans # Override the default cleanup function. # _cleanup() @@ -196,56 +176,5 @@ QA output created by $id Silence is golden End-of-File -if [ $# -eq 0 ] -then - - while true - do - echo -n "Add to group(s) [other] (separate by space, ? for list): " - read ans - [ -z "$ans" ] && ans=other - if [ "X$ans" = "X?" ] - then - for d in $SRC_GROUPS; do - l=$(sed -n < tests/$d/group \ - -e 's/#.*//' \ - -e 's/$/ /' \ - -e 's;\(^[0-9][0-9][0-9]\)\(.*$\);\2;p') - grpl="$grpl $l" - done - lst=`for word in $grpl; do echo $word; done | sort| uniq ` - echo $lst - else - # only allow lower cases, spaces, digits and underscore in group - inval=`echo $ans | tr -d '[:lower:][:space:][:digit:]_'` - if [ "$inval" != "" ]; then - echo "Invalid characters in group(s): $inval" - echo "Only lower cases, digits and underscore are allowed in groups, separated by space" - continue - else - # remove redundant spaces/tabs - ans=`echo "$ans" | sed 's/\s\+/ /g'` - break - fi - fi - done -else - # expert mode, groups are on the command line - # - for g in $* - do - if ! grep -q "[[:space:]]$g" "$tdir/group"; then - echo "Warning: group \"$g\" not defined in $tdir/group" - fi - done - ans="$*" -fi - -echo -n "Adding $id to group index ..." -head -n $(($line-1)) $tdir/group > /tmp/$$.group -echo "$id $ans" >> /tmp/$$.group -tail -n +$((line)) $tdir/group >> /tmp/$$.group -mv /tmp/$$.group $tdir/group echo " done." - exit 0 From patchwork Mon Jun 21 23:11:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 12335961 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.4 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=ham 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 CDA40C4743C for ; Mon, 21 Jun 2021 23:11:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B6B7661042 for ; Mon, 21 Jun 2021 23:11:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231373AbhFUXNQ (ORCPT ); Mon, 21 Jun 2021 19:13:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:33092 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230274AbhFUXNQ (ORCPT ); Mon, 21 Jun 2021 19:13:16 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9C50360FDB; Mon, 21 Jun 2021 23:11:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624317061; bh=EtDE16AP8kQDI6bGAo//XLOCqSL2S2neaTvKqhs1qMo=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=pmWstlU3y1hMGe+S3do02xKtQqAR+70rnHlKttcjldQmzkjEydbnSPxWv2oG7pr/o gXVydXu3bCZI1QSQcNJLPDLT/QkfCX/hkGFUTXIcbKighNW6OagD583owfnO6NgW1T vxrHFyVZiunb+tKKTXt6qNw4nYnmzJWGDOujj5aaaGvIkXJmPXOraa+pmeOtIyXooK wuHUvpjnBWrwVVS8llwly3qpRHTX5KrI18Cr2MVtRdFsn9FifDgFd5aP0B4QpUkJLN 6PvtB+4hJHdRx4L0MCg/43rGe8CC+0QA2zU7TGmQamNZHXmnUonQ4LyyHM/Q6XORB3 chjRIx5Ke0LIg== Subject: [PATCH 10/13] check: use generated group files From: "Darrick J. Wong" To: djwong@kernel.org, guaneryu@gmail.com Cc: Chandan Babu R , Allison Henderson , Eric Biggers , linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me, amir73il@gmail.com, ebiggers@kernel.org Date: Mon, 21 Jun 2021 16:11:01 -0700 Message-ID: <162431706134.4090790.4006205589840103999.stgit@locust> In-Reply-To: <162431700639.4090790.11684371602638166127.stgit@locust> References: <162431700639.4090790.11684371602638166127.stgit@locust> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Darrick J. Wong Convert the ./check script to use the automatically generated group list membership files, as the transition is now complete. Signed-off-by: Darrick J. Wong Reviewed-by: Chandan Babu R Reviewed-by: Allison Henderson Reviewed-by: Eric Biggers --- check | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/check b/check index ba192042..3dab7630 100755 --- a/check +++ b/check @@ -124,9 +124,9 @@ get_sub_group_list() local d=$1 local grp=$2 - test -s "$SRC_DIR/$d/group" || return 1 + test -s "$SRC_DIR/$d/group.list" || return 1 - local grpl=$(sed -n < $SRC_DIR/$d/group \ + local grpl=$(sed -n < $SRC_DIR/$d/group.list \ -e 's/#.*//' \ -e 's/$/ /' \ -e "s;^\($VALID_TEST_NAME\).* $grp .*;$SRC_DIR/$d/\1;p") @@ -384,7 +384,7 @@ if $have_test_arg; then test_dir=`dirname $t` test_dir=${test_dir#$SRC_DIR/*} test_name=`basename $t` - group_file=$SRC_DIR/$test_dir/group + group_file=$SRC_DIR/$test_dir/group.list if egrep -q "^$test_name" $group_file; then # in group file ... OK From patchwork Mon Jun 21 23:11:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 12335963 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.4 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 A3E4AC4743C for ; Mon, 21 Jun 2021 23:11:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8586161164 for ; Mon, 21 Jun 2021 23:11:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231486AbhFUXNW (ORCPT ); Mon, 21 Jun 2021 19:13:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:33130 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231246AbhFUXNW (ORCPT ); Mon, 21 Jun 2021 19:13:22 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2683361042; Mon, 21 Jun 2021 23:11:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624317067; bh=n0aZqEl2br9q9eWiVK5a3rls/KLy3SnBu5TGY9ooHzo=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=UzeS8Yo3PYbjihgfAJ6z5UlT6tBjvJLG2l3FqV7SNwPj2+jDHO366XEl8mc61txjr G7VoxzNP5KSJWjdXWzkAV45Il3utQu7ydiJ+XhCrHpnkyiBueKTcTENrFKJInDMVjL m5+3L6itVhgNPUZehhL+XlxgwQ3FaHIttCJUBVwqTB2nyrg3dsvrhCcXnq9VZ9S8De CQ6pct2yN3T8ufeWQB9yIRSyrcpX0LElIKz9xSbCXVvFJAiYADpLI5adEy6bfM2JuK 6aTQw41ZZbjCH0juCjbCdUZewN3uMWgW9PUqNBTl8YFmlXV8zpMtZNPxFEz6CMBhcM +byME36PQCQ6Q== Subject: [PATCH 11/13] fstests: remove group files From: "Darrick J. Wong" To: djwong@kernel.org, guaneryu@gmail.com Cc: Chandan Babu R , Allison Henderson , Eric Biggers , linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me, amir73il@gmail.com, ebiggers@kernel.org Date: Mon, 21 Jun 2021 16:11:06 -0700 Message-ID: <162431706682.4090790.2521483786645614148.stgit@locust> In-Reply-To: <162431700639.4090790.11684371602638166127.stgit@locust> References: <162431700639.4090790.11684371602638166127.stgit@locust> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Darrick J. Wong From: Darrick J. Wong Now that we autogenerate group files, get rid of them in the source tree. Signed-off-by: Darrick J. Wong Reviewed-by: Chandan Babu R Reviewed-by: Allison Henderson Reviewed-by: Eric Biggers --- tests/btrfs/group | 246 -------------------- tests/ceph/group | 4 tests/cifs/group | 6 tests/ext4/group | 64 ----- tests/f2fs/group | 7 - tests/generic/group | 643 --------------------------------------------------- tests/nfs/group | 6 tests/ocfs2/group | 1 tests/overlay/group | 100 -------- tests/perf/group | 1 tests/shared/group | 8 - tests/udf/group | 6 tests/xfs/group | 534 ------------------------------------------ 13 files changed, 1626 deletions(-) delete mode 100644 tests/btrfs/group delete mode 100644 tests/ceph/group delete mode 100644 tests/cifs/group delete mode 100644 tests/ext4/group delete mode 100644 tests/f2fs/group delete mode 100644 tests/generic/group delete mode 100644 tests/nfs/group delete mode 100644 tests/ocfs2/group delete mode 100644 tests/overlay/group delete mode 100644 tests/perf/group delete mode 100644 tests/shared/group delete mode 100644 tests/udf/group delete mode 100644 tests/xfs/group diff --git a/tests/btrfs/group b/tests/btrfs/group deleted file mode 100644 index 4fdd4d44..00000000 --- a/tests/btrfs/group +++ /dev/null @@ -1,246 +0,0 @@ -# QA groups control file -# Defines test groups and nominal group owners -# - do not start group names with a digit -# - comment line before each group is "new" description -# -001 auto quick subvol snapshot -002 auto snapshot -003 auto replace volume balance -004 auto rw metadata -005 auto defrag -006 auto quick volume -007 auto quick rw metadata send seek -008 auto quick send -009 auto quick subvol -010 auto -011 auto replace volume -012 auto convert -013 auto quick balance -014 auto balance -015 auto quick snapshot -016 auto quick send -017 auto quick qgroup -018 auto quick subvol -019 auto quick send -020 auto quick replace volume -021 auto quick balance defrag -022 auto qgroup limit -023 auto -024 auto quick compress -025 auto quick send clone -026 auto quick compress prealloc -027 auto replace volume -028 auto qgroup balance -029 auto quick clone -030 auto quick send -031 auto quick subvol clone -032 auto quick remount -033 auto quick send snapshot -034 auto quick send -035 auto quick clone -036 auto quick send snapshot -037 auto quick compress -038 auto quick compress send -039 auto quick send -040 auto quick send -041 auto quick compress -042 auto quick qgroup limit -043 auto quick send -044 auto quick send -045 auto quick send -046 auto quick send -047 auto quick snapshot attr -048 auto quick -049 auto quick -050 auto quick send -051 auto quick send -052 auto quick clone -053 auto quick send -054 auto quick send -055 auto quick clone -056 auto quick clone log -057 auto quick -058 auto quick send snapshot -059 auto quick -060 auto balance subvol -061 auto balance scrub -062 auto balance defrag compress -063 auto balance remount compress -064 auto balance replace volume -065 auto subvol replace volume -066 auto subvol scrub -067 auto subvol defrag compress -068 auto subvol remount compress -069 auto replace scrub volume -070 auto replace defrag compress volume -071 auto replace remount compress volume -072 auto scrub defrag compress -073 auto scrub remount compress -074 auto defrag remount compress -075 auto quick subvol -076 auto quick compress -077 auto quick send snapshot -078 auto snapshot -079 auto rw metadata -080 auto snapshot -081 auto quick clone -082 auto quick remount -083 auto quick send -084 auto quick send -085 auto quick metadata subvol -086 auto quick clone -087 auto quick send -088 auto quick metadata -089 auto quick subvol -090 auto quick metadata -091 auto quick qgroup -092 auto quick send -093 auto quick clone -094 auto quick send -095 auto quick metadata log -096 auto quick clone -097 auto quick send clone -098 auto quick metadata clone log -099 auto quick qgroup limit -100 auto replace volume eio -101 auto replace volume eio -102 auto quick metadata enospc balance -103 auto quick clone compress -104 auto qgroup -105 auto quick send -106 auto quick clone compress -107 auto quick prealloc -108 auto quick send clone punch -109 auto quick send clone compress -110 auto quick send -111 auto quick send -112 auto quick clone -113 auto quick compress clone -114 auto qgroup -115 auto qgroup -116 auto quick metadata -117 auto quick send clone -118 auto quick snapshot metadata log -119 auto quick snapshot metadata qgroup log -120 auto quick snapshot metadata log -121 auto quick snapshot qgroup -122 auto quick snapshot qgroup -123 auto quick qgroup balance -124 auto replace volume balance -125 replace volume balance -126 auto quick qgroup limit -127 auto quick send -128 auto quick send -129 auto quick send -130 auto quick clone send -131 auto quick -132 auto enospc -133 auto quick send -134 auto quick send -135 auto quick send -136 auto convert -137 auto quick send -138 auto compress -139 auto qgroup limit -140 auto quick -141 auto quick -142 auto quick -143 auto quick -144 auto quick send -145 auto quick send -146 auto quick eio -147 auto quick send -148 auto quick rw -149 auto quick send compress -150 auto quick dangerous -151 auto quick volume -152 auto quick metadata qgroup send -153 auto quick qgroup limit -154 auto quick -155 auto quick send -156 auto quick trim balance -157 auto quick raid -158 auto quick raid scrub -159 auto quick punch log -160 auto quick eio -161 auto quick volume seed -162 auto quick volume seed -163 auto quick volume seed -164 auto quick volume -165 auto quick subvol -166 auto quick qgroup -167 auto quick replace volume -168 auto quick send -169 auto quick send -170 auto quick snapshot -171 auto quick qgroup -172 auto quick log replay -173 auto quick swap -174 auto quick swap -175 auto quick swap volume -176 auto quick swap volume -177 auto quick swap balance -178 auto quick send -179 auto qgroup dangerous -180 auto quick qgroup limit -181 auto quick balance -182 auto quick balance -183 auto quick clone compress punch -184 auto quick volume -185 volume -186 auto quick send volume -187 auto send dedupe clone balance -188 auto quick send prealloc punch -189 auto quick send clone -190 auto quick replay balance qgroup -191 auto quick send dedupe -192 auto replay snapshot stress -193 auto quick qgroup enospc limit -194 auto volume -195 auto volume balance -196 auto metadata log volume -197 auto quick volume -198 quick volume -199 auto quick trim -200 auto quick send clone -201 auto quick punch log -202 auto quick subvol snapshot -203 auto quick send clone -204 auto quick punch -205 auto quick clone compress -206 auto quick log replay -207 auto rw raid -208 auto quick subvol -209 auto quick log -210 auto quick qgroup snapshot -211 auto quick log prealloc -212 auto balance dangerous -213 auto balance dangerous -214 auto quick send snapshot -215 auto quick -216 auto quick seed -217 auto quick trim dangerous -218 auto quick volume -219 auto quick volume -220 auto quick -221 auto quick send -222 auto quick send -223 auto quick replace trim -224 auto quick qgroup -225 auto quick volume seed -226 auto quick rw snapshot clone prealloc punch -227 auto quick send -228 auto quick volume -229 auto quick send clone -230 auto quick qgroup limit -231 auto quick clone log replay -232 auto quick qgroup limit -233 auto quick subvolume -234 auto quick compress rw -235 auto quick send -236 auto quick log -237 auto quick zone balance -238 auto quick seed trim -239 auto quick log -240 auto quick prealloc log -241 auto quick send diff --git a/tests/ceph/group b/tests/ceph/group deleted file mode 100644 index 47903d21..00000000 --- a/tests/ceph/group +++ /dev/null @@ -1,4 +0,0 @@ -001 auto quick copy -002 auto quick copy -003 auto quick copy -004 auto quick quota diff --git a/tests/cifs/group b/tests/cifs/group deleted file mode 100644 index 6d07b1c4..00000000 --- a/tests/cifs/group +++ /dev/null @@ -1,6 +0,0 @@ -# QA groups control file -# Defines test groups and nominal group owners -# - do not start group names with a digit -# - comment line before each group is "new" description -# -001 auto quick diff --git a/tests/ext4/group b/tests/ext4/group deleted file mode 100644 index 16eee914..00000000 --- a/tests/ext4/group +++ /dev/null @@ -1,64 +0,0 @@ -# QA groups control file -# Defines test groups and nominal group owners -# - do not start group names with a digit -# - comment line before each group is "new" description -# -001 auto prealloc quick zero -002 shutdown mount auto quick -003 auto quick -004 auto dump -005 auto quick metadata ioctl rw -006 dangerous_fuzzers -007 fuzzers -008 fuzzers -009 fuzzers -010 fuzzers -011 fuzzers -012 fuzzers -013 fuzzers -014 fuzzers -015 fuzzers punch -016 fuzzers -017 fuzzers -018 fuzzers -019 fuzzers -020 auto quick ioctl rw defrag -021 auto quick -022 auto quick attr dangerous -023 auto quick scrub -024 auto quick encrypt dangerous -025 auto quick fuzzers dangerous -026 auto quick attr -027 auto quick fsmap -028 auto quick fsmap -029 auto quick fsmap -030 auto quick dax -031 auto quick dax -032 auto quick ioctl resize -033 auto ioctl resize -034 auto quick quota -035 auto quick resize -036 auto quick -037 auto quick -038 auto quick -039 auto enospc rw -040 dangerous_fuzzers -041 dangerous_fuzzers -042 auto quick -043 auto quick -044 auto quick -045 auto dir -046 auto prealloc quick -047 auto quick dax -048 auto quick dir -049 auto quick -050 auto ioctl quick -271 auto rw quick -301 aio auto ioctl rw stress defrag -302 aio auto ioctl rw stress defrag -303 aio auto ioctl rw stress defrag -304 aio auto ioctl rw stress defrag -305 auto -306 auto rw resize quick -307 auto ioctl rw defrag -308 auto ioctl rw prealloc quick defrag diff --git a/tests/f2fs/group b/tests/f2fs/group deleted file mode 100644 index 7cd42fe4..00000000 --- a/tests/f2fs/group +++ /dev/null @@ -1,7 +0,0 @@ -# QA groups control file -# Defines test groups and nominal group owners -# - do not start group names with a digit -# - comment line before each group is "new" description -# -001 auto quick rw -002 auto quick rw encrypt compress diff --git a/tests/generic/group b/tests/generic/group deleted file mode 100644 index 9a636b23..00000000 --- a/tests/generic/group +++ /dev/null @@ -1,643 +0,0 @@ -# QA groups control file -# Defines test groups and nominal group owners -# - do not start group names with a digit -# - comment line before each group is "new" description -# -001 rw dir udf auto quick -002 metadata udf auto quick -003 atime auto quick -004 auto quick -005 dir udf auto quick -006 dir udf auto quick -007 dir udf auto quick -008 auto quick prealloc zero -009 auto quick prealloc zero -010 other udf auto -011 dir udf auto quick -012 auto quick prealloc punch collapse -013 other ioctl udf auto quick -014 rw udf auto quick -015 other auto quick enospc -016 auto quick prealloc punch collapse -017 auto prealloc collapse -018 auto fsr quick defrag -019 aio dangerous enospc rw stress -020 metadata attr udf auto quick -021 auto quick prealloc punch collapse -022 auto quick prealloc punch collapse -023 auto quick -024 auto quick -025 auto quick -026 acl quick auto -027 auto enospc -028 auto quick -029 auto quick rw -030 auto quick rw -031 auto quick prealloc rw collapse -032 auto quick rw -033 auto quick rw zero -034 auto quick metadata log -035 auto quick -036 auto aio rw stress -037 auto quick attr metadata -038 auto stress trim -039 metadata auto quick log -040 metadata auto quick log -041 metadata auto quick log -042 shutdown rw punch zero -043 shutdown metadata log auto -044 shutdown metadata log auto -045 shutdown metadata log auto -046 shutdown metadata log auto -047 shutdown metadata rw auto -048 shutdown metadata rw auto -049 shutdown metadata rw auto -050 shutdown mount auto quick -051 shutdown auto stress log metadata repair -052 shutdown log auto quick -053 acl repair auto quick -054 shutdown log v2log auto -055 shutdown log v2log auto quota stress -056 metadata auto quick log -057 metadata auto quick log -058 auto quick prealloc punch insert -059 metadata auto quick punch log -060 auto quick prealloc punch insert -061 auto quick prealloc punch insert -062 attr udf auto quick -063 auto quick prealloc punch insert -064 auto quick prealloc collapse insert -065 metadata auto quick log -066 auto quick attr metadata log -067 auto quick mount -068 other auto freeze stress -069 rw udf auto quick -070 attr udf auto quick stress -071 auto quick prealloc -072 auto metadata stress collapse -073 metadata auto quick log -074 rw udf auto -075 rw udf auto quick -076 metadata rw udf auto quick stress -077 acl attr auto enospc -078 auto quick metadata -079 auto quick ioctl metadata -080 auto quick -081 auto quick -082 auto quick quota -083 rw auto enospc stress -084 auto metadata quick -085 auto freeze mount -086 auto prealloc preallocrw quick -087 perms auto quick -088 perms auto quick -089 metadata auto -090 metadata auto quick log -091 rw auto quick -092 auto quick prealloc -093 attr cap auto -094 auto quick prealloc -095 auto rw stress -096 auto prealloc quick zero -097 attr auto quick -098 auto quick metadata -099 acl auto quick -100 udf auto -101 auto quick metadata log -102 auto rw -103 auto quick attr enospc -104 auto quick metadata log -105 acl auto quick -106 auto quick metadata log -107 auto quick metadata log -108 auto quick rw -109 auto metadata dir -110 auto quick clone -111 auto quick clone -112 rw aio auto quick -113 rw aio auto quick -114 rw aio auto quick -115 auto quick clone -116 auto quick clone -117 attr auto quick -118 auto quick clone -119 auto quick clone -120 other atime auto quick -121 auto quick clone dedupe -122 auto quick clone dedupe -123 perms auto quick -124 pattern auto quick -125 other pnfs -126 perms auto quick -127 rw auto -128 perms auto quick -129 rw auto quick -130 pattern auto quick -131 perms auto quick -132 pattern auto -133 rw auto -134 auto quick clone -135 metadata auto quick -136 auto quick clone dedupe -137 auto clone dedupe -138 auto quick clone -139 auto quick clone -140 auto quick clone -141 rw auto quick -142 auto quick clone -143 auto quick clone -144 auto quick clone -145 auto quick clone collapse -146 auto quick clone punch -147 auto quick clone insert -148 auto quick clone -149 auto quick clone zero -150 auto quick clone -151 auto quick clone -152 auto quick clone punch -153 auto quick clone collapse -154 auto quick clone -155 auto quick clone zero -156 auto quick clone -157 auto quick clone -158 auto quick clone dedupe -159 auto quick clone -160 auto quick clone dedupe -161 auto quick clone -162 auto quick clone dedupe -163 auto quick clone dedupe -164 auto clone -165 auto clone -166 auto clone -167 auto clone -168 auto clone -169 rw metadata auto quick -170 auto clone -171 auto quick clone -172 auto quick clone -173 auto quick clone -174 auto quick clone -175 auto clone -176 auto clone punch -177 auto quick prealloc metadata punch log -178 auto quick clone punch -179 auto quick clone punch -180 auto quick clone zero -181 auto quick clone -182 auto quick clone dedupe -183 auto quick clone -184 metadata auto quick -185 auto quick clone -186 auto clone punch -187 auto clone punch -188 auto quick clone -189 auto quick clone -190 auto quick clone -191 auto quick clone -192 atime auto -193 metadata auto quick -194 auto quick clone -195 auto quick clone -196 auto quick clone -197 auto quick clone -198 auto aio quick -199 auto quick clone punch -200 auto quick clone punch -201 auto quick clone -202 auto quick clone -203 auto quick clone -204 metadata rw auto -205 auto quick clone -206 auto quick clone -207 auto aio quick -208 auto aio -209 auto aio -210 auto aio quick -211 auto aio quick -212 auto aio quick -213 rw auto prealloc quick enospc -214 rw auto prealloc quick -215 auto metadata quick -216 auto quick clone -217 auto quick clone -218 auto quick clone -219 auto quota quick -220 auto quick clone -221 auto metadata quick -222 auto quick clone -223 auto quick -224 auto -225 auto quick -226 auto enospc -227 auto quick clone -228 rw auto prealloc quick -229 auto quick clone -230 auto quota quick -231 auto quota -232 auto quota stress -233 auto quota stress -234 auto quota -235 auto quota quick -236 auto quick metadata -237 auto quick acl -238 auto quick clone -239 auto aio rw -240 auto aio quick rw -241 auto -242 auto clone -243 auto clone -244 auto quick quota -245 auto quick dir -246 auto quick rw -247 auto quick rw -248 auto quick rw -249 auto quick rw -250 auto quick prealloc rw eio -251 ioctl trim -252 auto quick prealloc rw eio -253 auto quick clone -254 auto quick clone punch -255 auto quick prealloc punch -256 auto quick punch -257 dir auto quick -258 auto quick bigtime -259 auto quick clone zero -260 auto quick trim -261 auto quick clone collapse -262 auto quick clone insert -263 rw auto quick -264 auto quick clone -265 auto quick clone eio -266 auto quick clone eio -267 auto quick clone eio -268 auto quick clone eio -269 auto rw prealloc ioctl enospc stress -270 auto quota rw prealloc ioctl enospc stress -271 auto quick clone eio -272 auto quick clone eio -273 auto rw -274 auto rw prealloc enospc -275 auto rw enospc -276 auto quick clone eio -277 auto ioctl quick metadata -278 auto quick clone eio -279 auto quick clone eio -280 auto quota freeze -281 auto quick clone eio -282 auto quick clone eio -283 auto quick clone eio -284 auto quick clone -285 auto rw seek -286 auto quick other seek -287 auto quick clone -288 auto quick ioctl trim -289 auto quick clone -290 auto quick clone -291 auto quick clone -292 auto quick clone -293 auto quick clone -294 auto quick -295 auto quick clone -296 auto quick clone -297 auto clone -298 auto clone -299 auto aio enospc rw stress -300 auto aio enospc preallocrw stress punch -301 auto quick clone -302 auto quick clone -303 auto quick clone -304 auto quick clone dedupe -305 auto quick clone -306 auto quick rw -307 auto quick acl -308 auto quick -309 auto quick -310 auto -311 auto metadata log -312 auto quick prealloc enospc -313 auto quick -314 auto quick -315 auto quick rw prealloc -316 auto quick punch -317 auto metadata quick -318 acl attr auto quick -319 acl auto quick -320 auto rw -321 auto quick metadata log -322 auto quick metadata log -323 auto aio stress -324 auto fsr quick defrag -325 auto quick data log -326 auto quick clone -327 auto quick clone -328 auto quick clone -329 auto quick clone eio -330 auto quick clone -331 auto quick clone eio -332 auto quick clone -333 auto clone -334 auto clone -335 auto quick metadata log -336 auto quick metadata log -337 auto quick attr metadata -338 auto quick rw eio -339 auto dir -340 auto -341 auto quick metadata log -342 auto quick metadata log -343 auto quick metadata log -344 auto -345 auto -346 auto quick rw -347 auto quick rw thin -348 auto quick metadata -349 blockdev rw zero -350 blockdev rw punch -351 blockdev rw punch collapse insert zero -352 auto clone -353 auto quick clone -354 auto -355 auto quick -356 auto quick clone swap -357 auto quick clone swap -358 auto quick clone -359 auto quick clone -360 auto quick metadata -361 auto quick -362 auto quick richacl -363 auto quick richacl -364 auto quick richacl -365 auto quick richacl -366 auto quick richacl -367 auto quick richacl -368 auto quick richacl -369 auto quick richacl -370 auto quick richacl -371 auto quick enospc prealloc -372 auto quick clone -373 auto quick clone -374 auto quick clone dedupe -375 auto quick acl -376 auto quick metadata log -377 attr auto quick metadata -378 auto quick metadata -379 quota auto quick -380 quota auto quick -381 auto quick quota -382 auto quick quota -383 auto quick quota -384 quota auto quick -385 quota auto quick -386 auto quick quota -387 auto clone -388 shutdown auto log metadata -389 auto quick acl -390 auto freeze stress -391 auto quick rw -392 shutdown auto quick metadata punch -393 auto quick rw -394 auto quick -395 auto quick encrypt -396 auto quick encrypt -397 auto quick encrypt -398 auto quick encrypt -399 auto encrypt -400 auto quick quota -401 auto quick -402 auto quick rw bigtime -403 auto quick attr -404 auto quick insert -405 auto mkfs thin -406 auto quick -407 auto quick clone metadata -408 auto quick clone dedupe metadata -409 auto quick mount -410 auto quick mount -411 auto quick mount -412 auto quick metadata -413 auto quick dax -414 auto quick clone -415 auto clone punch -416 auto enospc -417 auto quick shutdown log -418 auto rw -419 auto quick encrypt -420 auto quick punch -421 auto quick encrypt dangerous -422 auto quick -423 auto quick -424 auto quick -425 auto quick attr -426 auto quick exportfs -427 auto quick aio rw -428 auto quick dax -429 auto encrypt -430 auto quick copy_range -431 auto quick copy_range -432 auto quick copy_range -433 auto quick copy_range -434 auto quick copy_range -435 auto encrypt -436 auto quick rw seek prealloc -437 auto quick dax -438 auto -439 auto quick punch -440 auto quick encrypt -441 auto quick eio -442 blockdev eio -443 auto quick rw -444 auto quick acl -445 auto quick rw seek prealloc -446 auto quick rw punch -447 auto clone punch -448 auto quick rw seek -449 auto quick acl attr enospc -450 auto quick rw -451 auto quick rw aio -452 auto quick dax -453 auto quick dir -454 auto quick attr -455 auto log replay -456 auto quick metadata collapse zero prealloc -457 auto log replay clone -458 auto quick clone collapse insert zero -459 auto freeze thin -460 auto quick rw -461 auto shutdown stress -462 auto quick dax -463 auto quick clone -464 auto rw -465 auto rw quick aio -466 auto quick rw -467 auto quick exportfs -468 shutdown auto quick metadata -469 auto quick punch zero -470 auto quick dax -471 auto quick rw -472 auto quick swap -473 broken -474 auto quick shutdown metadata -475 shutdown auto log metadata eio -476 auto rw -477 auto quick exportfs -478 auto quick -479 auto quick metadata log -480 auto quick metadata log -481 auto quick log metadata -482 auto metadata replay thin -483 auto quick log metadata -484 auto quick -485 auto quick insert -486 auto quick attr -487 auto quick eio -488 auto quick -489 auto quick attr log -490 auto quick rw seek -491 auto quick freeze mount -492 auto quick -493 auto quick swap dedupe -494 auto quick swap punch -495 auto quick swap -496 auto quick swap prealloc -497 auto quick swap collapse -498 auto quick log -499 auto quick rw collapse zero -500 auto thin trim -501 auto quick clone log -502 auto quick log -503 auto quick dax punch collapse zero -504 auto quick locks -505 shutdown auto quick metadata -506 shutdown auto quick metadata quota -507 shutdown auto quick metadata -508 shutdown auto quick metadata -509 auto quick log -510 auto quick log -511 auto quick rw zero -512 auto quick log prealloc -513 auto quick clone -514 auto quick clone -515 auto quick clone -516 auto quick dedupe clone -517 auto quick dedupe clone -518 auto quick clone -519 auto quick -520 auto quick log -521 soak long_rw -522 soak long_rw -523 auto quick attr -524 auto quick -525 auto quick rw -526 auto quick log -527 auto quick log -528 auto quick -529 auto quick acl attr -530 auto quick shutdown unlink -531 auto quick unlink -532 auto quick -533 auto quick attr -534 auto quick log -535 auto quick log -536 auto quick rw shutdown -537 auto quick trim -538 auto quick aio -539 auto quick punch seek -540 auto quick clone -541 auto quick clone -542 auto quick clone -543 auto quick clone -544 auto quick clone -545 auto quick cap -546 auto quick clone enospc log -547 auto quick log -548 auto quick encrypt -549 auto quick encrypt -550 auto quick encrypt -551 auto stress aio -552 auto quick log -553 auto quick copy_range -554 auto quick copy_range swap -555 auto quick cap -556 auto quick casefold -557 auto quick log -558 auto enospc -559 auto stress dedupe -560 auto stress dedupe -561 auto stress dedupe -562 auto clone punch -563 auto quick -564 auto quick copy_range -565 auto quick copy_range -566 auto quick quota metadata -567 auto quick rw punch -568 auto quick rw prealloc -569 auto quick rw swap prealloc -570 auto quick rw swap -571 auto quick -572 auto quick verity -573 auto quick verity -574 auto quick verity -575 auto quick verity -576 auto quick verity encrypt -577 auto quick verity -578 auto quick rw clone -579 auto stress verity -580 auto quick encrypt -581 auto quick encrypt -582 auto quick encrypt -583 auto quick encrypt -584 auto quick encrypt -585 auto rename -586 auto quick rw prealloc -587 auto quick rw prealloc quota -588 auto quick log clone -589 auto mount -590 auto prealloc preallocrw -591 auto quick rw pipe splice -592 auto quick encrypt -593 auto quick encrypt -594 auto quick quota -595 auto quick encrypt -596 auto quick -597 auto quick perms -598 auto quick perms -599 auto quick remount shutdown -600 auto quick quota -601 auto quick quota -602 auto quick encrypt -603 auto quick quota -604 auto quick mount -605 auto attr quick dax -606 auto attr quick dax -607 auto attr quick dax -608 auto attr quick dax -609 auto quick rw -610 auto quick prealloc zero -611 auto quick attr -612 auto quick clone -613 auto quick encrypt -614 auto quick rw -615 auto rw -616 auto rw io_uring stress -617 auto rw io_uring stress -618 auto quick attr -619 auto rw enospc -620 auto mount quick -621 auto quick encrypt -622 auto shutdown metadata atime -623 auto quick shutdown -624 auto quick verity -625 auto quick verity -626 auto quick rename enospc -627 auto aio rw stress -628 auto quick rw clone -629 auto quick rw copy_range -630 auto quick rw dedupe clone -631 auto rw overlay rename -632 auto quick mount -633 auto quick atime attr cap idmapped io_uring mount perms rw unlink -634 auto quick atime bigtime -635 auto quick atime bigtime shutdown -636 auto quick swap -637 auto quick dir -638 auto quick rw diff --git a/tests/nfs/group b/tests/nfs/group deleted file mode 100644 index 2619eaee..00000000 --- a/tests/nfs/group +++ /dev/null @@ -1,6 +0,0 @@ -# QA groups control file -# Defines test groups and nominal group owners -# - do not start group names with a digit -# - comment line before each group is "new" description -# -001 auto quick nfs4_acl acl diff --git a/tests/ocfs2/group b/tests/ocfs2/group deleted file mode 100644 index 28e68072..00000000 --- a/tests/ocfs2/group +++ /dev/null @@ -1 +0,0 @@ -001 auto quick clone diff --git a/tests/overlay/group b/tests/overlay/group deleted file mode 100644 index bd014f20..00000000 --- a/tests/overlay/group +++ /dev/null @@ -1,100 +0,0 @@ -# QA groups control file -# Defines test groups and nominal group owners -# - do not start group names with a digit -# - comment line before each group is "new" description -# -001 auto quick copyup -002 auto quick metadata -003 auto quick whiteout -004 attr auto copyup quick -005 auto copyup quick -006 auto quick copyup whiteout -007 auto quick -008 auto quick whiteout -009 auto quick -010 auto quick whiteout -011 auto quick -012 auto quick -013 auto quick copyup -014 auto quick copyup -015 auto quick whiteout -016 auto quick copyup -017 auto quick copyup redirect -018 auto quick copyup hardlink -019 auto stress -020 auto quick copyup perms -021 auto quick copyup -022 auto quick mount nested -023 auto quick attr -024 auto quick mount -025 auto quick attr -026 auto attr quick -027 auto quick perms -028 auto copyup quick -029 auto quick nested -030 auto quick perms -031 auto quick whiteout -032 auto quick copyup hardlink -033 auto quick copyup hardlink -034 auto quick copyup hardlink -035 auto quick mount -036 auto quick mount -037 auto quick mount -038 auto quick copyup -039 auto quick atime -040 auto quick -041 auto quick copyup nonsamefs -042 auto quick copyup hardlink -043 auto quick copyup nonsamefs -044 auto quick copyup hardlink nonsamefs -045 auto quick fsck -046 auto quick fsck -047 auto quick copyup hardlink -048 auto quick copyup hardlink -049 auto quick copyup redirect -050 auto quick copyup hardlink exportfs -051 auto quick copyup hardlink exportfs nonsamefs -052 auto quick copyup redirect exportfs -053 auto quick copyup redirect exportfs nonsamefs -054 auto quick copyup redirect exportfs -055 auto quick copyup redirect exportfs nonsamefs -056 auto quick fsck -057 auto quick redirect -058 auto quick exportfs -059 auto quick copyup -060 auto quick metacopy -061 posix copyup -062 auto quick exportfs -063 auto quick whiteout -064 auto quick copyup -065 auto quick mount -066 auto quick copyup -067 auto quick copyup nonsamefs -068 auto quick copyup hardlink exportfs nested -069 auto quick copyup hardlink exportfs nested nonsamefs -070 auto quick copyup redirect nested -071 auto quick copyup redirect nested nonsamefs -072 auto quick copyup hardlink -073 auto quick whiteout -074 auto quick exportfs dangerous -075 auto quick perms -076 auto quick perms dangerous -077 auto quick dir -100 auto quick union samefs -101 auto quick union nonsamefs -102 auto quick union nonsamefs xino -103 auto union rotate samefs -104 auto union rotate nonsamefs -105 auto union rotate nonsamefs xino -106 auto union rotate nonsamefs -107 auto union rotate nonsamefs xino -108 auto union rotate nonsamefs -109 auto union rotate nonsamefs xino -110 auto quick union nested samefs -111 auto quick union nested samefs xino -112 auto quick union nested nonsamefs -113 auto quick union nested nonsamefs xino -114 auto union rotate nested samefs -115 auto union rotate nested samefs xino -116 auto union rotate nested nonsamefs -117 auto union rotate nested nonsamefs xino diff --git a/tests/perf/group b/tests/perf/group deleted file mode 100644 index d3ed4349..00000000 --- a/tests/perf/group +++ /dev/null @@ -1 +0,0 @@ -001 auto diff --git a/tests/shared/group b/tests/shared/group deleted file mode 100644 index a8b926d8..00000000 --- a/tests/shared/group +++ /dev/null @@ -1,8 +0,0 @@ -# QA groups control file -# Defines test groups and nominal group owners -# - do not start group names with a digit -# - comment line before each group is "new" description -# -002 auto metadata quick log -032 mkfs auto quick -298 auto trim diff --git a/tests/udf/group b/tests/udf/group deleted file mode 100644 index 6680da44..00000000 --- a/tests/udf/group +++ /dev/null @@ -1,6 +0,0 @@ -# QA groups control file -# Defines test groups and nominal group owners -# - do not start group names with a digit -# - comment line before each group is "new" description -# -102 udf diff --git a/tests/xfs/group b/tests/xfs/group deleted file mode 100644 index bed7f7b8..00000000 --- a/tests/xfs/group +++ /dev/null @@ -1,534 +0,0 @@ -001 db auto quick -002 auto quick growfs -003 db auto quick -004 db auto quick -005 auto quick -006 auto quick mount eio -007 auto quota quick -008 rw ioctl auto quick -009 rw ioctl auto prealloc quick -010 auto quick repair -011 auto freeze log metadata quick -012 rw auto quick -013 auto metadata stress -014 auto enospc quick quota -015 auto enospc growfs -016 rw auto quick -017 mount auto quick stress -018 deprecated # log logprint v2log -019 mkfs auto quick -020 auto repair -021 db attr auto quick -022 dump ioctl tape -023 dump ioctl tape -024 dump ioctl tape -025 dump ioctl tape -026 dump ioctl auto quick -027 dump ioctl auto quick -028 dump ioctl auto quick -029 mkfs logprint log auto quick -030 repair auto quick -031 repair mkfs auto quick -032 copy auto quick -033 repair auto quick -034 other auto quick -035 dump ioctl tape auto -036 dump ioctl remote tape -037 dump ioctl remote tape -038 dump ioctl remote tape -039 dump ioctl remote tape -040 other auto -041 growfs ioctl auto -042 fsr ioctl auto -043 dump ioctl tape -044 other auto -045 other auto quick -046 dump ioctl auto quick -047 dump ioctl auto -048 other auto quick -049 rw auto quick -050 quota auto quick -051 shutdown auto log metadata -052 quota db auto quick -053 attr acl repair quick auto -054 auto quick -055 dump ioctl remote tape -056 dump ioctl auto quick -057 auto log -058 auto quick fuzzers -059 dump ioctl auto quick -060 dump ioctl auto quick -061 dump ioctl auto quick -062 auto ioctl quick -063 dump attr auto quick -064 dump auto -065 dump auto -066 dump ioctl auto quick -067 acl attr auto quick -068 auto stress dump -069 ioctl auto quick -070 auto quick repair -071 rw auto -072 rw auto prealloc quick -073 copy auto -074 quick auto prealloc rw -075 auto quick mount -076 auto enospc punch -077 auto quick copy -078 growfs auto quick -079 shutdown auto log quick -080 rw ioctl -081 deprecated # log logprint quota -082 deprecated # log logprint v2log -083 dangerous_fuzzers punch -084 ioctl rw auto -085 fuzzers -086 fuzzers -087 fuzzers -088 fuzzers -089 fuzzers -090 rw auto realtime -091 fuzzers -092 other auto quick -093 fuzzers -094 metadata dir ioctl auto realtime -095 log v2log auto -096 mkfs v2log auto quick -097 fuzzers -098 fuzzers -099 fuzzers -100 fuzzers -101 fuzzers -102 fuzzers -103 metadata dir ioctl auto quick -104 growfs ioctl prealloc auto stress -105 fuzzers -106 auto quick quota -107 quota -108 quota auto quick -109 metadata auto -110 repair auto -111 ioctl -112 fuzzers -113 fuzzers -114 auto quick clone rmap collapse insert -115 auto quick fuzzers -116 quota auto quick -117 fuzzers -118 auto quick fsr -119 log v2log auto freeze -120 fuzzers -121 shutdown log auto quick -122 other auto quick clone realtime -123 fuzzers -124 fuzzers -125 fuzzers -126 fuzzers -127 auto quick clone -128 auto quick clone fsr -129 auto quick clone -130 fuzzers clone -131 auto quick clone realtime -132 auto quick -133 dangerous_fuzzers -134 dangerous_fuzzers -135 auto logprint quick v2log -136 attr2 -137 auto metadata v2log -138 auto quick -139 auto quick clone -140 auto clone -141 auto log metadata -142 auto quick rw attr realtime -143 auto quick realtime mount -144 auto quick quota -145 auto quick quota -146 auto quick rw realtime -147 auto quick rw realtime collapse insert unshare zero prealloc -148 auto quick fuzzers -149 auto quick growfs -150 auto quick db -151 auto quick db -152 auto quick quota idmapped -153 auto quick quota idmapped -154 auto quick repair -155 auto repair -156 auto quick admin -157 auto quick admin -158 auto quick inobtcount -159 auto quick bigtime -160 auto quick bigtime -161 auto quick bigtime quota -162 auto quick attr repair -163 auto quick growfs shrinkfs -164 rw pattern auto prealloc quick -165 rw pattern auto prealloc quick -166 rw metadata auto quick -167 rw metadata auto stress -168 auto growfs shrinkfs ioctl prealloc stress -169 auto clone -170 rw filestreams auto quick -171 rw filestreams -172 rw filestreams -173 rw filestreams -174 rw filestreams auto -178 mkfs other auto -179 auto quick clone -180 auto quick clone -181 shutdown log auto quick -182 auto quick clone -183 rw other auto quick -184 auto quick clone -186 attr auto quick -187 attr auto quick -188 ci dir auto -189 mount auto quick -190 rw auto quick -191-input-validation auto quick mkfs realtime -192 auto quick clone -193 auto quick clone -194 rw auto -195 ioctl dump auto quick -196 auto quick rw -197 dir auto quick -198 auto quick clone -199 mount auto quick -200 auto quick clone -201 metadata auto quick -202 repair auto quick -203 ioctl auto -204 auto quick clone -205 metadata rw auto -206 growfs auto quick -207 auto quick clone -208 auto quick clone -209 auto quick clone -210 auto quick clone -211 clone_stress -212 shutdown auto quick clone -213 auto quick clone -214 auto quick clone -215 auto quick clone -216 log metadata auto quick -217 log metadata auto -218 auto quick clone -219 auto quick clone -220 auto quota quick -221 auto quick clone -222 auto fsr ioctl quick -223 auto quick clone -224 auto quick clone -225 auto quick clone -226 auto quick clone -227 auto fsr -228 auto quick clone punch -229 auto rw -230 auto quick clone punch -231 auto quick clone -232 auto quick clone -233 auto quick rmap -234 auto quick rmap punch -235 fuzzers rmap -236 auto rmap punch -237 auto quick clone eio -238 auto quick metadata ioctl -239 auto quick clone -240 auto quick clone eio -241 auto quick clone -242 auto quick prealloc zero -243 auto quick clone punch -244 auto quota quick -245 auto quick clone -246 auto quick clone -247 auto quick clone -248 auto quick clone -249 auto quick clone -250 auto quick rw prealloc metadata -251 auto quick clone -252 auto quick prealloc punch -253 auto quick -254 auto quick clone -255 auto quick clone -256 auto quick clone -257 auto quick clone -258 auto quick clone -259 auto quick -260 auto quick mkfs -261 auto quick quota -262 dangerous_fuzzers dangerous_scrub dangerous_online_repair -263 auto quick quota -264 auto quick mount eio -265 auto clone -266 dump ioctl auto quick -267 dump ioctl tape -268 dump ioctl tape -269 auto quick ioctl -270 auto quick mount -271 auto quick rmap fsmap -272 auto quick rmap fsmap -273 auto rmap fsmap -274 auto quick rmap fsmap -275 auto quick rmap fsmap -276 auto quick rmap fsmap realtime -277 auto quick rmap fsmap -278 repair auto -279 auto mkfs -280 auto quick clone -281 dump ioctl auto quick -282 dump ioctl auto quick -283 dump ioctl auto quick -284 auto quick dump copy db mkfs repair -285 dangerous_fuzzers dangerous_scrub -286 dangerous_fuzzers dangerous_scrub dangerous_online_repair -287 auto dump quota quick -288 auto quick repair fuzzers -289 growfs auto quick -290 auto rw prealloc quick ioctl zero -291 auto repair -292 auto mkfs quick -293 auto quick -294 auto dir metadata -295 auto logprint quick -296 dump auto quick -297 auto freeze -298 auto attr symlink quick -299 auto quota -300 auto fsr -301 auto dump -302 auto dump -303 auto quick quota -304 auto quick quota -305 auto quota -306 auto quick punch -307 auto quick clone -308 auto quick clone -309 auto clone -310 auto clone rmap -311 auto quick -312 auto quick clone -313 auto quick clone -314 auto quick clone -315 auto quick clone -316 auto quick clone -317 auto quick rmap -318 auto quick rw -319 auto quick clone -320 auto quick clone -321 auto quick clone -322 auto quick clone -323 auto quick clone -324 auto quick clone -325 auto quick clone -326 auto quick clone -327 auto quick clone -328 auto quick clone fsr -329 auto quick clone fsr -330 auto quick clone fsr quota -331 auto quick rmap clone -332 auto quick rmap clone collapse punch insert zero -333 auto quick rmap realtime -334 auto quick rmap realtime -335 auto rmap realtime -336 auto rmap realtime -337 fuzzers rmap realtime -338 auto quick rmap realtime -339 auto quick rmap realtime -340 auto quick rmap realtime -341 auto quick rmap realtime -342 auto quick rmap realtime -343 auto quick rmap collapse punch insert zero realtime -344 auto quick clone -345 auto quick clone -346 auto quick clone -347 auto quick clone -348 auto quick fuzzers repair -349 dangerous_fuzzers scrub -350 dangerous_fuzzers dangerous_scrub dangerous_repair -351 dangerous_fuzzers dangerous_scrub dangerous_online_repair -352 dangerous_fuzzers dangerous_scrub dangerous_repair -353 dangerous_fuzzers dangerous_scrub dangerous_online_repair -354 dangerous_fuzzers dangerous_scrub dangerous_repair -355 dangerous_fuzzers dangerous_scrub dangerous_online_repair -356 dangerous_fuzzers dangerous_scrub dangerous_repair -357 dangerous_fuzzers dangerous_scrub dangerous_online_repair -358 dangerous_fuzzers dangerous_scrub dangerous_repair -359 dangerous_fuzzers dangerous_scrub dangerous_online_repair -360 dangerous_fuzzers dangerous_scrub dangerous_repair -361 dangerous_fuzzers dangerous_scrub dangerous_online_repair -362 dangerous_fuzzers dangerous_scrub dangerous_repair -363 dangerous_fuzzers dangerous_scrub dangerous_online_repair -364 dangerous_fuzzers dangerous_scrub dangerous_repair -365 dangerous_fuzzers dangerous_scrub dangerous_online_repair -366 dangerous_fuzzers dangerous_scrub dangerous_repair -367 dangerous_fuzzers dangerous_scrub dangerous_online_repair -368 dangerous_fuzzers dangerous_scrub dangerous_repair -369 dangerous_fuzzers dangerous_scrub dangerous_online_repair -370 dangerous_fuzzers dangerous_scrub dangerous_repair -371 dangerous_fuzzers dangerous_scrub dangerous_online_repair -372 dangerous_fuzzers dangerous_scrub dangerous_repair -373 dangerous_fuzzers dangerous_scrub dangerous_online_repair -374 dangerous_fuzzers dangerous_scrub dangerous_repair -375 dangerous_fuzzers dangerous_scrub dangerous_online_repair -376 dangerous_fuzzers dangerous_scrub dangerous_repair -377 dangerous_fuzzers dangerous_scrub dangerous_online_repair -378 dangerous_fuzzers dangerous_scrub dangerous_repair -379 dangerous_fuzzers dangerous_scrub dangerous_online_repair -380 dangerous_fuzzers dangerous_scrub dangerous_repair -381 dangerous_fuzzers dangerous_scrub dangerous_online_repair -382 dangerous_fuzzers dangerous_scrub dangerous_repair -383 dangerous_fuzzers dangerous_scrub dangerous_online_repair -384 dangerous_fuzzers dangerous_scrub dangerous_repair -385 dangerous_fuzzers dangerous_scrub dangerous_online_repair -386 dangerous_fuzzers dangerous_scrub dangerous_repair -387 dangerous_fuzzers dangerous_scrub dangerous_online_repair -388 dangerous_fuzzers dangerous_scrub dangerous_repair -389 dangerous_fuzzers dangerous_scrub dangerous_online_repair -390 dangerous_fuzzers dangerous_scrub dangerous_repair -391 dangerous_fuzzers dangerous_scrub dangerous_online_repair -392 dangerous_fuzzers dangerous_scrub dangerous_repair -393 dangerous_fuzzers dangerous_scrub dangerous_online_repair -394 dangerous_fuzzers dangerous_scrub dangerous_repair -395 dangerous_fuzzers dangerous_scrub dangerous_online_repair -396 dangerous_fuzzers dangerous_scrub dangerous_repair -397 dangerous_fuzzers dangerous_scrub dangerous_online_repair -398 dangerous_fuzzers dangerous_scrub dangerous_repair -399 dangerous_fuzzers dangerous_scrub dangerous_online_repair -400 dangerous_fuzzers dangerous_scrub dangerous_repair -401 dangerous_fuzzers dangerous_scrub dangerous_online_repair -402 dangerous_fuzzers dangerous_scrub dangerous_repair -403 dangerous_fuzzers dangerous_scrub dangerous_online_repair -404 dangerous_fuzzers dangerous_scrub dangerous_repair -405 dangerous_fuzzers dangerous_scrub dangerous_online_repair -406 dangerous_fuzzers dangerous_scrub dangerous_repair realtime -407 dangerous_fuzzers dangerous_scrub dangerous_online_repair realtime -408 dangerous_fuzzers dangerous_scrub dangerous_repair realtime -409 dangerous_fuzzers dangerous_scrub dangerous_online_repair realtime -410 dangerous_fuzzers dangerous_scrub dangerous_repair -411 dangerous_fuzzers dangerous_scrub dangerous_online_repair -412 dangerous_fuzzers dangerous_scrub dangerous_repair -413 dangerous_fuzzers dangerous_scrub dangerous_online_repair -414 dangerous_fuzzers dangerous_scrub dangerous_repair -415 dangerous_fuzzers dangerous_scrub dangerous_online_repair -416 dangerous_fuzzers dangerous_scrub dangerous_repair -417 dangerous_fuzzers dangerous_scrub dangerous_online_repair -418 dangerous_fuzzers dangerous_scrub dangerous_repair -420 auto quick clone punch seek -421 auto quick clone punch seek -422 dangerous_scrub dangerous_online_repair -423 dangerous_scrub -424 auto quick db -425 dangerous_fuzzers dangerous_scrub dangerous_repair -426 dangerous_fuzzers dangerous_scrub dangerous_online_repair -427 dangerous_fuzzers dangerous_scrub dangerous_repair -428 dangerous_fuzzers dangerous_scrub dangerous_online_repair -429 dangerous_fuzzers dangerous_scrub dangerous_repair -430 dangerous_fuzzers dangerous_scrub dangerous_online_repair -431 auto quick -432 auto quick dir metadata -433 auto quick attr -434 auto quick clone fsr -435 auto quick clone -436 auto quick clone fsr -437 auto quick other -438 auto quick quota -439 auto quick fuzzers log -440 auto quick clone quota -441 auto quick clone quota -442 auto stress clone quota -443 auto quick ioctl fsr punch -444 auto quick -445 auto quick filestreams -446 auto quick -447 auto mount -448 auto quick fuzzers -449 auto quick -450 auto quick rmap -451 auto quick metadata repair -452 auto db -453 dangerous_fuzzers dangerous_norepair -454 dangerous_fuzzers dangerous_norepair -455 dangerous_fuzzers dangerous_norepair -456 dangerous_fuzzers dangerous_norepair -457 dangerous_fuzzers dangerous_norepair -458 dangerous_fuzzers dangerous_norepair -459 dangerous_fuzzers dangerous_norepair -460 dangerous_fuzzers dangerous_norepair -461 dangerous_fuzzers dangerous_norepair -462 dangerous_fuzzers dangerous_norepair -463 dangerous_fuzzers dangerous_norepair -464 dangerous_fuzzers dangerous_norepair -465 dangerous_fuzzers dangerous_norepair -466 dangerous_fuzzers dangerous_norepair -467 dangerous_fuzzers dangerous_norepair -468 dangerous_fuzzers dangerous_norepair -469 dangerous_fuzzers dangerous_norepair -470 dangerous_fuzzers dangerous_norepair -471 dangerous_fuzzers dangerous_norepair -472 dangerous_fuzzers dangerous_norepair -473 dangerous_fuzzers dangerous_norepair -474 dangerous_fuzzers dangerous_norepair -475 dangerous_fuzzers dangerous_norepair -476 dangerous_fuzzers dangerous_norepair -477 dangerous_fuzzers dangerous_norepair -478 dangerous_fuzzers dangerous_norepair -479 dangerous_fuzzers dangerous_norepair -480 dangerous_fuzzers dangerous_norepair -481 dangerous_fuzzers dangerous_norepair realtime -482 dangerous_fuzzers dangerous_norepair realtime -483 dangerous_fuzzers dangerous_norepair -484 dangerous_fuzzers dangerous_norepair -485 dangerous_fuzzers dangerous_norepair -486 dangerous_fuzzers dangerous_norepair -487 dangerous_fuzzers dangerous_norepair -488 dangerous_fuzzers dangerous_norepair -489 dangerous_fuzzers dangerous_norepair -490 auto quick -491 auto quick fuzz -492 auto quick fuzz -493 auto quick fuzz -494 auto quick -495 auto quick repair -496 dangerous_fuzzers dangerous_scrub dangerous_repair -497 dangerous_fuzzers dangerous_scrub dangerous_online_repair -498 dangerous_fuzzers dangerous_norepair -499 auto quick -500 auto quick mkfs prealloc mkfs -501 auto quick unlink -502 auto quick unlink -503 auto copy metadump -504 auto quick mkfs label -505 auto quick spaceman -506 auto quick health -507 clone -508 auto quick quota -509 auto ioctl -510 auto ioctl quick -511 auto quick quota -512 auto quick acl attr -513 auto mount -514 auto quick db -515 auto quick quota -516 auto quick -517 auto quick fsmap freeze -518 auto quick quota -519 auto quick reflink -520 auto quick reflink -521 auto quick realtime growfs -522 auto quick mkfs -523 auto quick mkfs -524 auto quick mkfs -525 auto quick mkfs -526 auto quick mkfs -527 auto quick quota -528 auto quick rw realtime -529 auto quick quota -530 auto quick realtime growfs -531 auto quick punch zero insert collapse -532 auto quick attr -533 auto quick dir hardlink symlink -534 auto quick -535 auto quick reflink -536 auto quick reflink -537 auto quick -538 auto stress -539 auto quick mount From patchwork Mon Jun 21 23:11:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 12335965 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.4 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=ham 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 274BCC48BC2 for ; Mon, 21 Jun 2021 23:11:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0979961164 for ; Mon, 21 Jun 2021 23:11:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231303AbhFUXN2 (ORCPT ); Mon, 21 Jun 2021 19:13:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:33170 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229940AbhFUXN1 (ORCPT ); Mon, 21 Jun 2021 19:13:27 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A920361042; Mon, 21 Jun 2021 23:11:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624317072; bh=K3kSO1NIpMG1j7q0MsU7yXYd891ZqW3naWOfnXDI1HA=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=o7milu9RU8rxkcYF5OVjelp6n9Dr/qh0ezSCb0FiLlZykJrvHJ7UNs50m30+Vw8oV kvE7Nmq5Yk5Gsczp31x4GJww61EiYvkjnCkeubU2xOMQgO0KLTFijT07NWCZndRGa5 bqBzzfXQ0VXYIWqWtVTuD4f0gtLagojUfM+xvoD4UBrbDtEJ91qnEgvoTn1YY57prY zTkT0vnq41weXozOc35PbXmlFXvoNtrd9HtXDazV5KYt3YhFim00mNseRTZVTX7XrG 50AWNPH+qBzcIkuoSR36mP2kYcLg1R3kSPdXMPXm0lQ+dNxjlr5r/Mxk58LM+Bvrk1 gzWV3kA7+vUVA== Subject: [PATCH 12/13] fstests: remove test group management code From: "Darrick J. Wong" To: djwong@kernel.org, guaneryu@gmail.com Cc: Chandan Babu R , Allison Henderson , linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me, amir73il@gmail.com, ebiggers@kernel.org Date: Mon, 21 Jun 2021 16:11:12 -0700 Message-ID: <162431707240.4090790.10406198305618855157.stgit@locust> In-Reply-To: <162431700639.4090790.11684371602638166127.stgit@locust> References: <162431700639.4090790.11684371602638166127.stgit@locust> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Darrick J. Wong Remove all the code that manages group files, since we now generate them at build time. Signed-off-by: Darrick J. Wong Reviewed-by: Chandan Babu R Reviewed-by: Allison Henderson --- tools/mvtest | 15 ------- tools/sort-group | 112 ------------------------------------------------------ 2 files changed, 127 deletions(-) delete mode 100755 tools/sort-group diff --git a/tools/mvtest b/tools/mvtest index 572ae14e..5088b45f 100755 --- a/tools/mvtest +++ b/tools/mvtest @@ -29,27 +29,12 @@ test ! -e "tests/${dest}" || die "Test \"${src}\" already exists." sid="$(basename "${src}")" did="$(basename "${dest}")" -sgroup="$(basename "$(dirname "tests/${src}")")" -dgroup="$(basename "$(dirname "tests/${dest}")")" - -sgroupfile="tests/${sgroup}/group" -dgroupfile="tests/${dgroup}/group" - git mv "tests/${src}" "tests/${dest}" git mv "tests/${src}.out" "tests/${dest}.out" sed -e "s/^# FS[[:space:]]*QA.*Test.*[0-9]\+$/# FS QA Test No. ${did}/g" -i "tests/${dest}" sed -e "s/^QA output created by ${sid}$/QA output created by ${did}/g" -i "tests/${dest}.out" sed -e "s/test-${sid}/test-${did}/g" -i "tests/${dest}.out" -grpline="$(grep "^${sid} " "${sgroupfile}")" -newgrpline="$(echo "${grpline}" | sed -e "s/^${sid} /${did} /g")" - -sed -e "/^${sid} .*$/d" -i "${sgroupfile}" -cp "${dgroupfile}" "${dgroupfile}.new" -append "${dgroupfile}.new" "${newgrpline}" -"${dir}/sort-group" "${dgroupfile}.new" -mv "${dgroupfile}.new" "${dgroupfile}" - echo "Moved \"${src}\" to \"${dest}\"." exit 0 diff --git a/tools/sort-group b/tools/sort-group deleted file mode 100755 index 6fcaad77..00000000 --- a/tools/sort-group +++ /dev/null @@ -1,112 +0,0 @@ -#!/usr/bin/env python -import sys - -# Sort a group list, carefully preserving comments. - -def xfstest_key(key): - '''Extract the numeric part of a test name if possible.''' - k = 0 - - assert type(key) == str - - # No test number at all... - if not key[0].isdigit(): - return key - - # ...otherwise extract as much number as we can. - for digit in key: - if digit.isdigit(): - k = k * 10 + int(digit) - else: - return k - return k - -def read_group(fd): - '''Read the group list, carefully attaching comments to the next test.''' - tests = {} - comments = None - - for line in fd: - sline = line.strip() - tokens = sline.split() - if len(tokens) == 0 or tokens[0] == '#': - if comments == None: - comments = [] - comments.append(sline) - else: - tests[tokens[0]] = (comments, tokens[1:]) - comments = None - return tests - -def sort_keys(keys): - '''Separate keys into integer and non-integer tests.''' - int_keys = [] - int_xkeys = [] - str_keys = [] - - # Sort keys into integer(ish) tests and other - for key in keys: - xkey = xfstest_key(key) - if type(xkey) == int: - int_keys.append(key) - int_xkeys.append(xkey) - else: - str_keys.append(key) - return (int_keys, int_xkeys, str_keys) - -def write_sorted(tests, fd): - def dump_xkey(xkey): - (comments, tokens) = tests[key] - if comments: - for c in comments: - fd.write('%s\n' % c) - fd.write('%s %s\n' % (key, ' '.join(tokens))) - '''Print tests (and comments) in number order.''' - - (int_keys, ignored, str_keys) = sort_keys(tests.keys()) - for key in sorted(int_keys, key = xfstest_key): - dump_xkey(key) - for key in sorted(str_keys): - dump_xkey(key) - -def sort_main(): - if '--help' in sys.argv[1:]: - print('Usage: %s groupfiles' % sys.argv[0]) - sys.exit(0) - - for arg in sys.argv[1:]: - with open(arg, 'r+') as fd: - x = read_group(fd) - fd.seek(0, 0) - write_sorted(x, fd) - -def nextid_main(): - if '--help' in sys.argv[1:]: - print('Usage: %s group[/startid] ' % sys.argv[0]) - sys.exit(0) - - if len(sys.argv) != 2: - print('Specify exactly one group name.') - sys.exit(1) - - c = sys.argv[1].split('/') - if len(c) > 1: - startid = int(c[1]) - else: - startid = 1 - group = c[0] - - with open('tests/%s/group' % group, 'r') as fd: - x = read_group(fd) - xkeys = {int(x) for x in sort_keys(x.keys())[1]} - - xid = startid - while xid in xkeys: - xid += 1 - print('%s/%03d' % (group, xid)) - -if __name__ == '__main__': - if 'nextid' in sys.argv[0]: - nextid_main() - else: - sort_main() From patchwork Mon Jun 21 23:11:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 12335967 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.4 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=ham 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 45391C4743C for ; Mon, 21 Jun 2021 23:11:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 29452611BD for ; Mon, 21 Jun 2021 23:11:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230130AbhFUXNd (ORCPT ); Mon, 21 Jun 2021 19:13:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:33238 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229940AbhFUXNd (ORCPT ); Mon, 21 Jun 2021 19:13:33 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2B20560FDB; Mon, 21 Jun 2021 23:11:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624317078; bh=RBgGjR8MqmSWxCz2laOBal2KjAL98OKmL2um+YiU6Sw=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=XBKMy4VXA5KhWMo+RwSUdBkOn0jKi+myWyRIEM6SpEUUE2QfFLzuLNe+jnoF94xeI ikryqWLWDnzSKvwz+nvTDm1Nw1vDPIDnnLPFwI9kB7K7ZOQZtEEUBEZ3cBpeETvAgL ZJSLzFGOhhnj5VMEj6gUj+HvEHGvHEoEpi247nAbSwydNqjEWUqm7P8nlutHjIHau2 NsI/IYlR2gTuvv48PcCMc+lgCLbEOGi7kNxd7FEJBt9FeqYmsYj9+8ylVcKccqYwUK Tz4ho3c10N/VtNOXNo2YbFG/rJwm0QX3mm3ggaLIP1ZsGClMKP/MHjAJ5MU62mktxE nS/iosUrE0nCg== Subject: [PATCH 13/13] misc: update documentation to reflect auto-generated group files From: "Darrick J. Wong" To: djwong@kernel.org, guaneryu@gmail.com Cc: Allison Henderson , Chandan Babu R , linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me, amir73il@gmail.com, ebiggers@kernel.org Date: Mon, 21 Jun 2021 16:11:17 -0700 Message-ID: <162431707787.4090790.4406716516462715301.stgit@locust> In-Reply-To: <162431700639.4090790.11684371602638166127.stgit@locust> References: <162431700639.4090790.11684371602638166127.stgit@locust> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Darrick J. Wong Update the documentation to outline the new requirements for test files so that we can generate group files during build. Signed-off-by: Darrick J. Wong Reviewed-by: Allison Henderson Reviewed-by: Chandan Babu R --- README | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/README b/README index 048491a6..18f7a6bc 100644 --- a/README +++ b/README @@ -140,7 +140,8 @@ Running tests: - ./check '*/001' '*/002' '*/003' - ./check '*/06?' - Groups of tests maybe ran by: ./check -g [group(s)] - See the 'group' file for details on groups + See the tests/*/group.list files after building xfstests to learn about + each test's group memberships. - If you want to run all tests regardless of what group they are in (including dangerous tests), use the "all" group: ./check -g all - To randomize test order: ./check -r [test(s)] @@ -174,8 +175,8 @@ Test script environment: When developing a new test script keep the following things in mind. All of the environment variables and shell procedures are - available to the script once the "common/rc" file has been - sourced. + available to the script once the "common/preamble" file has been + sourced and the "_begin_fstest" function has been called. 1. The tests are run from an arbitrary directory. If you want to do operations on an XFS filesystem (good idea, eh?), then do @@ -249,6 +250,22 @@ Test script environment: in the ./new script. It can contain only alphanumeric characters and dash. Note the "NNN-" part is added automatically. + 6. Test group membership: Each test can be associated with any number + of groups for convenient selection of subsets of tests. Group names + can be any sequence of non-whitespace characters. Test authors + associate a test with groups by passing the names of those groups as + arguments to the _begin_fstest function. For example, the code: + + _begin_fstest auto quick subvol snapshot + + associates the current test with the "auto", "quick", "subvol", and + "snapshot" groups. It is not necessary to specify the "all" group + in the list because that group is computed at run time. + + The build process scans test files for _begin_fstest invocations and + compiles the group list from that information. In other words, test + files must call _begin_fstest or they will not be run. + Verified output: Each test script has a name, e.g. 007, and an associated