coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH] sleep,timeout: support overflowing floating point values


From: Bernhard Voelker
Subject: Re: [PATCH] sleep,timeout: support overflowing floating point values
Date: Thu, 21 Apr 2016 00:57:04 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0

On 04/20/2016 07:31 PM, Pádraig Brady wrote:
> * src/sleep.c (main): Allow ERANGE since we allow "inf" values.
> * src/timeout.c (parse_duration): Likewise.
> * tests/misc/sleep.sh: New file. Tests for sleep(1).

Nice!
For completeness, you could add the following cases:

  * sleep nan      # invalid time interval
  * sleep -- -1    # invalid time interval
  * sleep          # missing operand
  * sleep "0x2"    # hexadecimal value allowed
  * sleep "0x1p2"  # hexadecimal value with suffix allowed

> * tests/misc/timeout-parameters.sh: Add case for newly allowed
> $LDBL_MAX.  Also use returns_ throughout the file.  Also avoid
> small timeout values which might give false failures under load.

LGTM.

Have a nice day,
Berny



reply via email to

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