coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH 1/2] tee: exit early if no more writable outputs


From: Pádraig Brady
Subject: Re: [PATCH 1/2] tee: exit early if no more writable outputs
Date: Tue, 17 Feb 2015 10:52:26 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

On 17/02/15 10:42, Bernhard Voelker wrote:
> On 02/17/2015 11:27 AM, Pádraig Brady wrote:
>> The following patch wrt --write-error, tests the continue
>> with working outputs functionality.  Though that's with pipes
>> and only with the new option.  I've amended the test in this patch
>> to check continuation with standard files and no options, like:
> 
> Thanks. I didn't have a look at the other patch yet.
> 
>> +  # Ensure we continue with outputs that are OK
>> +  seq 10000 > multi_read || framework_failure_
>> +
>> +  returns_ 1 tee /dev/full 2>err >multi_write <multi_read || fail=1
>> +  cmp multi_read multi_write || fail=1
> 
> Specifying 2 or more output files for tee(1) is probably such an
> unusual case - yet mandated by POSIX - that it's likely that we forget
> this when making changes in future.
> Therefore, I recommend adding this to the test case:
> 
> +  returns_ 1 tee out1 /dev/full out2 2>err >multi_write <multi_read || fail=1
> +  cmp multi_read out1 || fail=1
> +  cmp multi_read out2 || fail=1
> +  cmp multi_read multi_write || fail=1
> 
> WDYT?

I can't see how the implementation would vary when going from 2 to 3 outputs,
hence the above is probably overkill.

cheers,
Pádraig.




reply via email to

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