coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH] df: port the new df test to POSIX sed, larger file systems


From: Bernhard Voelker
Subject: Re: [PATCH] df: port the new df test to POSIX sed, larger file systems
Date: Thu, 22 Nov 2012 13:36:19 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121025 Thunderbird/16.0.2

On 11/22/2012 01:25 PM, Stefano Lattarini wrote:
> Hi Pádraig, Bernhard.
> 
> On 11/22/2012 12:52 PM, Pádraig Brady wrote:
>>
>>>   df --help > out || fail=1
>>> -grep ' --output' out | sed 's/^.*\(--output\).*$/\1/;q' > out2
>>> -compare exp out2 || fail=1
>>> +grep ' --output' out >/dev/null || fail=1
>>
> Why this extra redirection to /dev/null?  I think the output from
> the tests should be as verbose as possible, to simplify debugging
> and analysis.  Granted, not a big deal here, but IMHO it's better
> to be consistent and avoid gratuitous null redirections.

I was first thinking about 'grep -q', but there's only one use in
cfg.mk (nowhere else). Is that disliked?

Therefore, I thought that the redirection to /dev/null
would be best ... as there are many others in tests:

  git grep 'grep .*/dev/null' | grep ^tests | wc -l
  45

And I see your point: test logs should contain as must info
as possible. That's even better.

Before sending, I even thought about 'cat out' in case of failures,
something like:

  compare exp out2 || { fail=1 ; cat out; }

But I didn't include that.

Have a nice day,
Berny



reply via email to

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