Message ID | 162199362461.3744214.7536635976092405399.stgit@locust (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | fstests: move test group lists into test files | expand |
On Tue, May 25, 2021 at 06:47:04PM -0700, Darrick J. Wong wrote: > diff --git a/tests/btrfs/001 b/tests/btrfs/001 > index fb051e8a..2248b6f6 100755 > --- a/tests/btrfs/001 > +++ b/tests/btrfs/001 > @@ -6,13 +6,9 @@ > # > # Test btrfs's subvolume and snapshot support > # > -seq=`basename $0` > -seqres=$RESULT_DIR/$seq > -echo "QA output created by $seq" > +. ./common/test_names > +_set_seq_and_groups auto quick subvol snapshot The naming is a little weird here. This feels more like a common preamble, especially given that it also sets $here, $tmp, and $status -- not just the test groups. Maybe it should look like: . ./common/preamble _begin_fstest quick subvol snapshot
On Wed, Jun 02, 2021 at 09:58:03PM -0700, Eric Biggers wrote: > On Tue, May 25, 2021 at 06:47:04PM -0700, Darrick J. Wong wrote: > > diff --git a/tests/btrfs/001 b/tests/btrfs/001 > > index fb051e8a..2248b6f6 100755 > > --- a/tests/btrfs/001 > > +++ b/tests/btrfs/001 > > @@ -6,13 +6,9 @@ > > # > > # Test btrfs's subvolume and snapshot support > > # > > -seq=`basename $0` > > -seqres=$RESULT_DIR/$seq > > -echo "QA output created by $seq" > > +. ./common/test_names > > +_set_seq_and_groups auto quick subvol snapshot > > The naming is a little weird here. This feels more like a common preamble, > especially given that it also sets $here, $tmp, and $status -- not just the test > groups. Maybe it should look like: > > . ./common/preamble > _begin_fstest quick subvol snapshot I like that much better than my current names! Will fix for v2. --D
diff --git a/tests/btrfs/001 b/tests/btrfs/001 index fb051e8a..2248b6f6 100755 --- a/tests/btrfs/001 +++ b/tests/btrfs/001 @@ -6,13 +6,9 @@ # # Test btrfs's subvolume and snapshot support # -seq=`basename $0` -seqres=$RESULT_DIR/$seq -echo "QA output created by $seq" +. ./common/test_names +_set_seq_and_groups auto quick subvol snapshot -here=`pwd` -tmp=/tmp/$$ -status=1 # failure is the default! _cleanup() { diff --git a/tests/btrfs/002 b/tests/btrfs/002 index 66775562..4de0a3d7 100755 --- a/tests/btrfs/002 +++ b/tests/btrfs/002 @@ -6,13 +6,9 @@ # # Extented btrfs snapshot test cases # -seq=`basename $0` -seqres=$RESULT_DIR/$seq -echo "QA output created by $seq" +. ./common/test_names +_set_seq_and_groups auto snapshot -here=`pwd` -tmp=/tmp/$$ -status=1 # failure is the default! _cleanup() { diff --git a/tests/btrfs/003 b/tests/btrfs/003 index fbb313fb..f1e06af5 100755 --- a/tests/btrfs/003 +++ b/tests/btrfs/003 @@ -6,13 +6,9 @@ # # btrfs vol tests # -seq=`basename $0` -seqres=$RESULT_DIR/$seq -echo "QA output created by $seq" +. ./common/test_names +_set_seq_and_groups 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 diff --git a/tests/btrfs/004 b/tests/btrfs/004 index 0458d2b6..d7071d80 100755 --- a/tests/btrfs/004 +++ b/tests/btrfs/004 @@ -9,13 +9,9 @@ # 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/test_names +_set_seq_and_groups auto rw metadata -here=`pwd` -tmp=/tmp/$$ -status=1 noise_pid=0 _cleanup()