From: Eryu Guan <eguan@redhat.com>
To: Jan Tulak <jtulak@redhat.com>
Cc: fstests@vger.kernel.org, david@fromorbit.com
Subject: Re: [PATCH 2/4] fstests: filename handling for extended names in ./check was on a wrong place
Date: Wed, 13 Jul 2016 20:34:54 +0800 [thread overview]
Message-ID: <20160713123454.GW2432@eguan.usersys.redhat.com> (raw)
In-Reply-To: <1468229169-24045-3-git-send-email-jtulak@redhat.com>
On Mon, Jul 11, 2016 at 11:26:07AM +0200, Jan Tulak wrote:
> The code handling "./check foo/123", when the real test is "foo/123-bar-baz"
> was moved at the earliest position, so everything working with the test name or
> path will know the full name. Thus, no "123" and "123-bar-baz" mix is possible.
>
> Signed-off-by: Jan Tulak <jtulak@redhat.com>
Can you please include more details in the description? It seems not so
clear to me what the problem is from the description.
If I understand it correctly (after playing around), prior to the patch:
[root@dhcp-66-86-11 xfstests]# ./check xfs/999
...
xfs/999 0s ... 0s
Ran: xfs/999-test-case
Passed all 1 tests
After applying the patch:
[root@dhcp-66-86-11 xfstests]# ./check xfs/999
...
xfs/999-test-case 0s ... 0s
Ran: xfs/999-test-case
Passed all 1 tests
So the test name is always correct, right?
Thanks,
Eryu
> ---
> check | 27 ++++++++++++++-------------
> 1 file changed, 14 insertions(+), 13 deletions(-)
>
> diff --git a/check b/check
> index 5be183f..ef6bd47 100755
> --- a/check
> +++ b/check
> @@ -543,6 +543,20 @@ for section in $HOST_OPTIONS_SECTIONS; do
> for seq in $list
> do
> err=false
> + if [ ! -f $seq ]; then
> + # Try to get full name in case the user supplied only seq id
> + # and the test has a name. A bit of hassle to find really
> + # the test and not its sample output or helping files.
> + bname=$(basename $seq)
> + full_seq=$(find $(dirname $seq) -name $bname* -executable |
> + awk '(NR == 1 || length < length(shortest)) { shortest = $0 }\
> + END { print shortest }')
> + if [ -f $full_seq ] \
> + && [ x$(echo $bname | grep -o "^$VALID_TEST_ID") != x ]; then
> + seq=$full_seq
> + seqnum=${full_seq#*/}
> + fi
> + fi
>
> # the filename for the test and the name output are different.
> # we don't include the tests/ directory in the name output.
> @@ -566,19 +580,6 @@ for section in $HOST_OPTIONS_SECTIONS; do
> if $showme; then
> echo
> continue
> - elif [ ! -f $seq ]; then
> - # Try to get full name in case the user supplied only seq id
> - # and the test has a name. A bit of hassle to find really
> - # the test and not its sample output or helping files.
> - bname=$(basename $seq)
> - full_seq=$(find $(dirname $seq) -name $bname* -executable |
> - awk '(NR == 1 || length < length(shortest)) { shortest = $0 }\
> - END { print shortest }')
> - if [ -f $full_seq ] \
> - && [ x$(echo $bname | grep -o "^$VALID_TEST_ID") != x ]; then
> - seq=$full_seq
> - seqnum=${full_seq#*/}
> - fi
> fi
>
> if [ ! -f $seq ]; then
> --
> 2.5.5
>
next prev parent reply other threads:[~2016-07-13 12:35 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-11 9:26 [PATCH 0/4 v2] xfstests: extended names fixes Jan Tulak
2016-07-11 9:26 ` [PATCH 1/4] xfstests: Fix installation for extended names Jan Tulak
2016-07-15 10:05 ` Eryu Guan
2016-07-11 9:26 ` [PATCH 2/4] fstests: filename handling for extended names in ./check was on a wrong place Jan Tulak
2016-07-13 12:34 ` Eryu Guan [this message]
2016-07-14 9:11 ` Jan Tulak
2016-07-14 12:18 ` Eryu Guan
2016-07-14 12:47 ` Jan Tulak
2016-07-11 9:26 ` [PATCH 3/4] xfstests: remove unused variable Jan Tulak
2016-07-11 9:26 ` [PATCH 4/4] xfstests: filename handling - fix early wildcard expansion Jan Tulak
2016-07-13 12:28 ` Eryu Guan
2016-07-14 8:56 ` Jan Tulak
2016-07-14 12:13 ` Eryu Guan
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=20160713123454.GW2432@eguan.usersys.redhat.com \
--to=eguan@redhat.com \
--cc=david@fromorbit.com \
--cc=fstests@vger.kernel.org \
--cc=jtulak@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