From: Jan Tulak <jtulak@redhat.com>
To: Eryu Guan <eguan@redhat.com>
Cc: fstests@vger.kernel.org
Subject: Re: [PATCH] fstests: Tests can use any name now, not 3 digits only.
Date: Wed, 25 Mar 2015 13:39:35 -0400 (EDT) [thread overview]
Message-ID: <404034522.2735970.1427305175014.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <20150325170938.GX4810@dhcp-13-216.nay.redhat.com>
----- Original Message -----
> From: "Eryu Guan" <eguan@redhat.com>
> Sent: Wednesday, 25 March, 2015 6:09:38 PM
>
>
> seems basic regular expression of grep doesn't support \s, I entered
> "some-test-001" as test name and it always tells me it's containing
> whitespace/dot.
> [...]
>
In another thread under the patch, Lukáš proposed a stricter naming. I changed the regex to "^[a-zA-Z0-9-]\+$", so this is already fixed. There is a small debate of mandatory appending a unique number to the test, so all tests could be referred by it.
This also caused your second issue, with not finding/truncating the tests. You can notice that it truncated them on the place of "s" in the name.
Thanks. :-)
Jan
>
> I found tests are not properly found by group. e.g. I added three new
> tests called "001-hello-test" "a-first-test" "some-test-001", and added
> them to "testgroup", but ./check -n -g testgroup listed wrong test names
> (the names are truncated and didn't find some-test-001)
>
> [root@hp-dl388eg8-01 xfstests]# ./check -n -g testgroup
> FSTYP -- xfs (non-debug)
> PLATFORM -- Linux/x86_64 hp-dl388eg8-01 4.0.0-rc4+
> MKFS_OPTIONS -- -f -bsize=4096 /dev/mapper/rhel_hp--dl388eg8--01-testlv2
> MOUNT_OPTIONS -- -o context=system_u:object_r:nfs_t:s0
> /dev/mapper/rhel_hp--dl388eg8--01-testlv2 /mnt/testarea/scratch
>
> generic/001-hello-te
> generic/a-fir
>
> This is the diff of my generic/group file
>
> diff --git a/tests/generic/group b/tests/generic/group
> index b2f0680..49a8eed 100644
> --- a/tests/generic/group
> +++ b/tests/generic/group
> @@ -4,6 +4,7 @@
> # - comment line before each group is "new" description
> #
> 001 rw dir udf auto quick
> +001-hello-test other testgroup
> 002 metadata udf auto quick
> 003 atime auto quick
> 004 auto quick
> @@ -74,6 +75,8 @@
> 069 rw udf auto quick
> 070 attr udf auto quick stress
> 071 auto quick prealloc
> +072 other
> +073 other
> 074 rw udf auto
> 075 rw udf auto quick
> 076 metadata rw udf auto quick stress
> @@ -184,3 +187,6 @@
> 323 auto aio stress
> 324 auto fsr quick
> 325 auto quick data log
> +a-first-test other testgroup
> +hello-world-002 other
> +some-test-001 other testgroup
>
> > + else
> > + echo "Filename must not contain whitespaces and dots!"
> > + echo
>
> trailing whitespace in above line
>
> > + fi
> > + done
> > +
> > + # now find where to insert this name
> > + eof=1
> > + line=0
> > + for found in `cat $tdir/group | $AWK_PROG '{ print $1 }'`
> > + do
>
> this for loop has different code style, use
>
> for xxx; do
> done
>
> too, as other places you write
>
> > + line=$((line+1))
> > + if [ -z "$found" ] || [ "$found" == "#" ]; then
> > + continue
> > + elif [[ "$found" > "$id" ]]; then
> > + eof=0
> > + break
> > + fi
> > + done
> > + if [ $eof -eq 1 ]; then
> > + # If place wasn't found, let $line be the end of the file
> > + line=$((line+1))
> > + fi
> > +
> > +fi
>
> As above is a new code block(about reading in test name and finding the
> right place to insert the new test), you can use tab to indent, not 4
> spaces.
>
> Thanks for your work!
>
> Eryu
> > +echo "Using '$id'."
> > +
> > if [ -f $tdir/$id ]
> > then
> > echo "Error: test $id already exists!"
> > @@ -115,7 +159,7 @@ year=`date +%Y`
> >
> > cat <<End-of-File >$tdir/$id
> > #! /bin/bash
> > -# FS QA Test No. $id
> > +# FS QA Test $id
> > #
> > # what am I here for?
> > #
> > --
> > 2.1.0
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe fstests" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe fstests" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
next prev parent reply other threads:[~2015-03-25 17:39 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-04 15:55 [PATCH] Tests can use any name now, not 3 digits only Jan Ťulák
2015-03-18 18:01 ` Jan Tulak
2015-03-20 11:13 ` Eryu Guan
2015-03-20 15:03 ` [PATCH] fstests: tests " Jan Ťulák
2015-03-21 4:49 ` Eryu Guan
2015-03-21 12:02 ` Jan Tulak
2015-03-21 13:11 ` Eryu Guan
2015-03-25 13:27 ` [PATCH] fstests: Tests " Jan Ťulák
2015-03-25 13:32 ` Jan Tulak
2015-03-25 14:44 ` David Sterba
2015-03-25 15:20 ` Lukáš Czerner
2015-03-25 15:27 ` Jan Tulak
2015-03-25 15:43 ` Lukáš Czerner
2015-03-26 13:32 ` Jan Tulak
2015-03-25 17:09 ` Eryu Guan
2015-03-25 17:39 ` Jan Tulak [this message]
2015-03-26 13:35 ` Jan Ťulák
2015-03-26 14:41 ` David Sterba
2015-03-26 15:16 ` Jan Tulak
2015-03-26 15:44 ` David Sterba
2015-03-26 15:33 ` [PATCH v6] " Jan Ťulák
2015-03-27 7:25 ` Eryu Guan
2015-03-27 9:15 ` Jan Tulak
2015-03-27 9:19 ` Eryu Guan
2015-03-27 9:15 ` [PATCH v7] " Jan Ťulák
2015-03-27 9:39 ` Eryu Guan
2015-03-27 9:48 ` Jan Tulak
2015-03-27 11:15 ` Eryu Guan
2015-03-27 11:30 ` Jan Tulak
2015-03-27 11:29 ` [PATCH v8] " Jan Ťulák
2015-03-27 11:49 ` [PATCH v9] " Jan Ťulák
2015-03-27 14:33 ` Eryu Guan
2015-03-30 13:44 ` David Sterba
2015-04-01 4:35 ` Dave Chinner
2015-04-01 12:09 ` Jan Tulak
2015-04-01 12:15 ` Lukáš Czerner
2015-04-01 13:17 ` [PATCH v10] " Jan Ťulák
2015-03-20 15:04 ` [PATCH] " Jan Tulak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=404034522.2735970.1427305175014.JavaMail.zimbra@redhat.com \
--to=jtulak@redhat.com \
--cc=eguan@redhat.com \
--cc=fstests@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox