diff mbox series

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

Message ID ZkTIPlTS4jcQ-rHX@telcontar (mailing list archive)
State New
Headers show
Series t0211-trace2-perf.sh: typo patern -> pattern | expand

Commit Message

Marcel Telka May 15, 2024, 2:35 p.m. UTC
Hi,

There seems to be apparent typo in the t/t0211-trace2-perf.sh file:




Thanks.

Comments

Junio C Hamano May 15, 2024, 4:52 p.m. UTC | #1
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-<.
Jeff Hostetler May 15, 2024, 4:59 p.m. UTC | #2
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.
Jeff
Junio C Hamano May 15, 2024, 5:09 p.m. UTC | #3
Jeff Hostetler <git@jeffhostetler.com> writes:

> 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 ;-)
diff mbox series

Patch

--- 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' '