coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] tests: provide an option to relax the need for gdb


From: Bernhard Voelker
Subject: Re: [PATCH] tests: provide an option to relax the need for gdb
Date: Fri, 22 Jun 2018 00:32:13 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0

On 06/21/2018 06:07 PM, Pádraig Brady wrote:
> On 20/06/18 23:18, Bernhard Voelker wrote:
>> BTW: setting USE_GDB=0 unveils:
>>
>>   ./tests/rm/r-root.sh: line 222: test: =: unary operator expected
>>
>> The variable 'fail' should be initialized:
>>
>>   test $fail = 1 && { cat out; cat err; Exit $fail; }
>>
>> ... *BUT* it seems that we have more cases like that:
>>
>>   $ grep -F 'unary operator expected' tests/*/*.log | sort -u | wc -l
>>   15
>>
>> Maybe we should initialize 'fail' in a central place?
> 
> Hrm maybe. We should at least s/\$fail/"$fail"/.

Currently, the use of `test $fail ...` vs. `test "$fail" ...` is 50:50.
IMO it's easier and safer to initialize fail=0 - the attached does it.

Have a nice day,
Berny

Attachment: 0001-tests-initialize-fail-0-to-avoid-unary-operator-expe.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]