about summary refs log tree commit diff
path: root/support/tst-timespec.c
Commit message (Collapse)AuthorAgeFilesLines
* Correct timespec implementation [BZ #26232]H.J. Lu2020-07-141-42/+56
| | | | | | | | | | | | | | | | | | | | | | | | commit 04deeaa9ea74b0679dfc9d9155a37b6425f19a9f Author: Lucas A. M. Magalhaes <lamm@linux.ibm.com> Date: Fri Jul 10 19:41:06 2020 -0300 Fix time/tst-cpuclock1 intermitent failures has 2 issues: 1. It assumes time_t == long which is false on x32. 2. tst-timespec.c is compiled without -fexcess-precision=standard which generates incorrect results on i686 in support_timespec_check_in_range: double ratio = (double)observed_norm / expected_norm; return (lower_bound <= ratio && ratio <= upper_bound); This patch does 1. Compile tst-timespec.c with -fexcess-precision=standard. 2. Replace long with time_t. 3. Replace LONG_MIN and LONG_MAX with TYPE_MINIMUM (time_t) and TYPE_MAXIMUM (time_t).
* Fix time/tst-cpuclock1 intermitent failuresLucas A. M. Magalhaes2020-07-101-0/+320
This test fails intermittently in systems with heavy load as CLOCK_PROCESS_CPUTIME_ID is subject to scheduler pressure. Thus the test boundaries were relaxed to keep it from failing on such systems. A refactor of the spent time checking was made with some support functions. With the advantage to representing time jitter in percent of the target. The values used by the test boundaries are all empirical. Reviewed-by: Carlos O'Donell <carlos@redhat.com>