FS/XFS testing framework
 help / color / mirror / Atom feed
From: Jan Tulak <jtulak@redhat.com>
To: dsterba@suse.cz
Cc: eguan@redhat.com, fstests@vger.kernel.org, lczerner@redhat.com
Subject: Re: [PATCH] fstests: Tests can use any name now, not 3 digits only.
Date: Thu, 26 Mar 2015 11:16:02 -0400 (EDT)	[thread overview]
Message-ID: <1912769466.3218422.1427382962269.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <20150326144109.GP20767@suse.cz>



----- Original Message -----
> From: "David Sterba" <dsterba@suse.cz>
> To: "Jan Ťulák" <jtulak@redhat.com>
> Cc: eguan@redhat.com, fstests@vger.kernel.org, lczerner@redhat.com
> Sent: Thursday, 26 March, 2015 3:41:09 PM
> Subject: Re: [PATCH] fstests: Tests can use any name now, not 3 digits only.
> 
> Please put a revision number in the subject so we know what's the latest
> one, eg:
> 
> [PATCH v5] fstests: Tests can use any name now, not 3 digits only
> 
> On Thu, Mar 26, 2015 at 02:35:33PM +0100, Jan Ťulák wrote:
> > Tests can use any name now, not 3 digits only.
> > (e.g. a test can be named "tests/generic/001-some-name")
> > 
> > Names are limited to alphanumeric characters and dash and are always
> > prefixed
> > with an unique id for easier identification of a specific patch.
> 
> patch or test?

Fixed.


> 
> > --- a/README
> > +++ b/README
> > @@ -205,7 +205,7 @@ Test script environment:
> >  
> >  Verified output:
> >  
> > -    Each test script has a numerical name, e.g. 007, and an associated
> > +    Each test script has a name, e.g. 007, and an associated
> >      verified output, e.g. 007.out.
> 
> I think the naming scheme could be described in the README, probably in
> the "Creating new tests scripts:" section.

True, added into the readme.


> 
> > +if [[ "$REPLY" =~ ^[Yy]$ ]]; then
> 
> You don't need to quote variables in the [[ ]] block as it's a builtin,
> unlike [ (in general). Also, [[ $variable = glob ]] does really match
> globs, so it's simple [[ $REPLY = [yY] ]] if you insist on using [[ .
> 
Thank you for this info, I didn't knew this. :-)

> > +	for found in `tail -n +$line $tdir/group | $AWK_PROG '{ print $1 }'`; do
> > +		foundId=$(echo "$found" | tr - ' ' | $AWK_PROG '{ print $1 }')
> > +		line=$((line+1))
> > +		if [ -z "$found" ] || [ "$found" == "#" ]; then
> > +			continue
> > +		elif [[ "$found" > "$name" ]] || [ "$foundId" -gt "$id" ]; then
> 
> Bash guide advices not to use [[ ]] for arithmetic expressions, in favor
> of (( )). Besides, I find mixing [[ ]] and [ ] inconsistent, choose one.

The [[ "$found" > "$name" ]] is a string expression, for lexicographic ordering. :-)
The second [ ] is for arithmetic - so I used the mix of [[]] and [] deliberately to distinguish it. Though if it is a bad practise, I will stick to not mixing it in one condition.

Jan

  reply	other threads:[~2015-03-26 15:16 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
2015-03-26 13:35           ` Jan Ťulák
2015-03-26 14:41             ` David Sterba
2015-03-26 15:16               ` Jan Tulak [this message]
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=1912769466.3218422.1427382962269.JavaMail.zimbra@redhat.com \
    --to=jtulak@redhat.com \
    --cc=dsterba@suse.cz \
    --cc=eguan@redhat.com \
    --cc=fstests@vger.kernel.org \
    --cc=lczerner@redhat.com \
    /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