threads / discuss / 61480

t0211-trace2-perf.sh: typo patern -> pattern

Subject: t0211-trace2-perf.sh: typo patern -> pattern

## tl;dr

4 messages between May 15, 2024 and May 15, 2024.

replies: 3people: 3as markdown or json

Marcel Telka· May 15, 2024, 14:35 UTC · lore
Hi,
There seems to be apparent typo in the t/t0211-trace2-perf.sh file:
--- a/t/t0211-trace2-perf.sh
+++ b/t/t0211-trace2-perf.sh
@@ -233,7 +233,7 @@ have_counter_event () {
 
        pattern="d0|${thread}|${event}||||${category}|name:${name} value:${value}" &&
 
-       grep "${patern}" ${file}
+       grep "${pattern}" ${file}
 }
 
 test_expect_success 'global counter test/test1' '


Thanks.
-- 
+-------------------------------------------+
| Marcel Telka   e-mail:   marcel@telka.sk  |
|                homepage: http://telka.sk/ |
+-------------------------------------------+
Junio C Hamano· May 15, 2024, 16:52 UTC · re: Marcel Telka · lore

Re: t0211-trace2-perf.sh: typo patern -> pattern

Marcel Telka <marcel@telka.sk> writes:
Show 16 quoted lines
> Hi,
>
> There seems to be apparent typo in the t/t0211-trace2-perf.sh file:
>
>
> --- a/t/t0211-trace2-perf.sh
> +++ b/t/t0211-trace2-perf.sh
> @@ -233,7 +233,7 @@ have_counter_event () {
>  
>         pattern="d0|${thread}|${event}||||${category}|name:${name} value:${value}" &&
>  
> -       grep "${patern}" ${file}
> +       grep "${pattern}" ${file}
>  }
>  
>  test_expect_success 'global counter test/test1' '

Ah, indeed, there is no assignment to the variable $patern so this grep matches by looking for all the empty strings in the file X-<.

Jeff Hostetler· May 15, 2024, 16:59 UTC · re: Junio C Hamano · lore

Re: t0211-trace2-perf.sh: typo patern -> pattern

On 5/15/24 12:52 PM, Junio C Hamano wrote:
Show 23 quoted lines
> Marcel Telka <marcel@telka.sk> writes:
> 
>> Hi,
>>
>> There seems to be apparent typo in the t/t0211-trace2-perf.sh file:
>>
>>
>> --- a/t/t0211-trace2-perf.sh
>> +++ b/t/t0211-trace2-perf.sh
>> @@ -233,7 +233,7 @@ have_counter_event () {
>>   
>>          pattern="d0|${thread}|${event}||||${category}|name:${name} value:${value}" &&
>>   
>> -       grep "${patern}" ${file}
>> +       grep "${pattern}" ${file}
>>   }
>>   
>>   test_expect_success 'global counter test/test1' '
> 
> Ah, indeed, there is no assignment to the variable $patern so this
> grep matches by looking for all the empty strings in the file X-<.
> 
> 
OOPS.

Thanks for the fix. Jeff

Junio C Hamano· May 15, 2024, 17:09 UTC · re: Jeff Hostetler · lore

Re: t0211-trace2-perf.sh: typo patern -> pattern

Jeff Hostetler <git@jeffhostetler.com> writes:
Show 24 quoted lines
> On 5/15/24 12:52 PM, Junio C Hamano wrote:
>> Marcel Telka <marcel@telka.sk> writes:
>> 
>>> Hi,
>>>
>>> There seems to be apparent typo in the t/t0211-trace2-perf.sh file:
>>>
>>>
>>> --- a/t/t0211-trace2-perf.sh
>>> +++ b/t/t0211-trace2-perf.sh
>>> @@ -233,7 +233,7 @@ have_counter_event () {
>>>            pattern="d0|${thread}|${event}||||${category}|name:${name}
>>> value:${value}" &&
>>>   -       grep "${patern}" ${file}
>>> +       grep "${pattern}" ${file}
>>>   }
>>>     test_expect_success 'global counter test/test1' '
>> Ah, indeed, there is no assignment to the variable $patern so this
>> grep matches by looking for all the empty strings in the file X-<.
>> 
>
> OOPS.
>
> Thanks for the fix.
Nobody sent an applicable patch yet, though ;-)

← back to recent threads