diff mbox

[4/4] xfstests: filename handling - fix early wildcard expansion

Message ID 1468229169-24045-5-git-send-email-jtulak@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jan Tulak July 11, 2016, 9:26 a.m. UTC
Add quotation marks around the wildcarded name.

Signed-off-by: Jan Tulak <jtulak@redhat.com>
---
 check | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Eryu Guan July 13, 2016, 12:28 p.m. UTC | #1
On Mon, Jul 11, 2016 at 11:26:09AM +0200, Jan Tulak wrote:
> Add quotation marks around the wildcarded name.

This makes no difference for me, the original code is working well. Did
I miss anything?

[root@dhcp-66-86-11 xfstests]# bname=999
[root@dhcp-66-86-11 xfstests]# find tests/xfs -name "$bname*"
tests/xfs/999-test-case
tests/xfs/999-test-case.out
[root@dhcp-66-86-11 xfstests]# find tests/xfs -name $bname*
tests/xfs/999-test-case
tests/xfs/999-test-case.out

Thanks,
Eryu

> 
> Signed-off-by: Jan Tulak <jtulak@redhat.com>
> ---
>  check | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/check b/check
> index 58d8869..5ff897b 100755
> --- a/check
> +++ b/check
> @@ -548,7 +548,7 @@ for section in $HOST_OPTIONS_SECTIONS; do
>  	        # 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 |
> +	        full_seq=$(find $(dirname $seq) -name "$bname*" -executable |
>  	            awk '(NR == 1 || length < length(shortest)) { shortest = $0 }\
>  	            	END { print shortest }')
>  	        if [ -f $full_seq ] \
> -- 
> 2.5.5
> 
--
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
Jan Tulak July 14, 2016, 8:56 a.m. UTC | #2
On Wed, Jul 13, 2016 at 2:28 PM, Eryu Guan <eguan@redhat.com> wrote:
> On Mon, Jul 11, 2016 at 11:26:09AM +0200, Jan Tulak wrote:
>> Add quotation marks around the wildcarded name.
>
> This makes no difference for me, the original code is working well. Did
> I miss anything?
>
> [root@dhcp-66-86-11 xfstests]# bname=999
> [root@dhcp-66-86-11 xfstests]# find tests/xfs -name "$bname*"
> tests/xfs/999-test-case
> tests/xfs/999-test-case.out
> [root@dhcp-66-86-11 xfstests]# find tests/xfs -name $bname*
> tests/xfs/999-test-case
> tests/xfs/999-test-case.out
>

Hmmm. The move of the code alone was not enough to fix an issue I had,
but now I can't remember when it happened, no matter what. :( I'm
beginning to think I might forget to save the file after moving the
code. In which case...

So either drop it and if it appears again, then I will resubmit, or
keep it there "just to be sure". I'm OK with both these options, so
whatever is more in line with your idea of a clean repo. :-)

Thanks,
Jan

> Thanks,
> Eryu
>
>>
>> Signed-off-by: Jan Tulak <jtulak@redhat.com>
>> ---
>>  check | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/check b/check
>> index 58d8869..5ff897b 100755
>> --- a/check
>> +++ b/check
>> @@ -548,7 +548,7 @@ for section in $HOST_OPTIONS_SECTIONS; do
>>               # 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 |
>> +             full_seq=$(find $(dirname $seq) -name "$bname*" -executable |
>>                   awk '(NR == 1 || length < length(shortest)) { shortest = $0 }\
>>                       END { print shortest }')
>>               if [ -f $full_seq ] \
>> --
>> 2.5.5
>>
Eryu Guan July 14, 2016, 12:13 p.m. UTC | #3
On Thu, Jul 14, 2016 at 10:56:51AM +0200, Jan Tulak wrote:
> On Wed, Jul 13, 2016 at 2:28 PM, Eryu Guan <eguan@redhat.com> wrote:
> > On Mon, Jul 11, 2016 at 11:26:09AM +0200, Jan Tulak wrote:
> >> Add quotation marks around the wildcarded name.
> >
> > This makes no difference for me, the original code is working well. Did
> > I miss anything?
> >
> > [root@dhcp-66-86-11 xfstests]# bname=999
> > [root@dhcp-66-86-11 xfstests]# find tests/xfs -name "$bname*"
> > tests/xfs/999-test-case
> > tests/xfs/999-test-case.out
> > [root@dhcp-66-86-11 xfstests]# find tests/xfs -name $bname*
> > tests/xfs/999-test-case
> > tests/xfs/999-test-case.out
> >
> 
> Hmmm. The move of the code alone was not enough to fix an issue I had,
> but now I can't remember when it happened, no matter what. :( I'm
> beginning to think I might forget to save the file after moving the
> code. In which case...
> 
> So either drop it and if it appears again, then I will resubmit, or
> keep it there "just to be sure". I'm OK with both these options, so
> whatever is more in line with your idea of a clean repo. :-)

I'd prefer to drop it for now, and fix it when we know what the exact
issue is :)

Thanks,
Eryu
--
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
diff mbox

Patch

diff --git a/check b/check
index 58d8869..5ff897b 100755
--- a/check
+++ b/check
@@ -548,7 +548,7 @@  for section in $HOST_OPTIONS_SECTIONS; do
 	        # 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 |
+	        full_seq=$(find $(dirname $seq) -name "$bname*" -executable |
 	            awk '(NR == 1 || length < length(shortest)) { shortest = $0 }\
 	            	END { print shortest }')
 	        if [ -f $full_seq ] \