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