[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] sleep: support subtraction of sleep amounts
From: |
Pádraig Brady |
Subject: |
Re: [PATCH] sleep: support subtraction of sleep amounts |
Date: |
Wed, 30 Jul 2014 10:20:56 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 |
On 07/30/2014 08:36 AM, Bernhard Voelker wrote:
> On 07/30/2014 01:01 AM, Eric Blake wrote:
>> You may want to improve this usage:
>>
>> $ src/sleep -- -inf inf
>> src/sleep: cannot read realtime clock: Invalid argument
>>
>> to give a nicer message.
>
> Here comes v2.
>
> $ src/sleep -- -inf inf
> src/sleep: invalid total sleep time -nan
> Try 'src/sleep --help' for more information.
>
> I added some more test cases for invalid combinations
> with nan, -nan and -inf, and avoided multiple diagnostic
> messages in the case a single argument already was
> considered !ok like in 'sleep -- abc -inf'.
>
> Finally, there was a stray "Conflicts: NEWS" in the commit
> message of v1, sorry for that.
>
> Any comments about the possible timeout races?
> (I didn't get failures here, even with high load and
> 'make check -j'.)
>
> Thanks & have a nice day,
> Berny
Is this useful enough that newer scripts are incompat
with older systems without this functionality?
I'm 50:50 TBH
Re the tests.
timeout only has subsecond resolutions with HAVE_TIMER_SETTIME
s/inv_sleep/invalid_sleep/
There should be a test case for -0
We really should use retry_delay_ to speed up the test and avoid races
thanks,
Pádraig.