sleep,timeout: support overflowing floating point values
commit2ef621251992bc0b9fbc9ada98606996047ed8a3
authorPádraig Brady <P@draigBrady.com>
Wed, 20 Apr 2016 17:26:58 +0000 (20 18:26 +0100)
committerPádraig Brady <P@draigBrady.com>
Thu, 21 Apr 2016 18:41:58 +0000 (21 19:41 +0100)
tree7f69527bb8493d73b82ec785e8822f598ec5732c
parentff6cc22d062c493c9fee27cfe1d2e6328d502a43
sleep,timeout: support overflowing floating point values

* 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).
* 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.
src/sleep.c
src/timeout.c
tests/local.mk
tests/misc/sleep.sh [new file with mode: 0755]
tests/misc/timeout-parameters.sh