For 32-bit targets, 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 caused: FAIL: support/tst-timespec $ cat support/tst-timespec.out Testing support_timespec_ns Testing support_timespec_normalize tst-timespec.c:301: numeric comparison failure left: 2147483647 (0x7fffffff); from: norm_cases[i].norm.tv_sec right: 2147483648 (0x80000000); from: result.tv_sec tst-timespec.c:302: numeric comparison failure left: 999999999 (0x3b9ac9ff); from: norm_cases[i].norm.tv_nsec right: 0 (0x0); from: result.tv_nsec tst-timespec.c:301: numeric comparison failure left: -2147483648 (0xffffffff80000000); from: norm_cases[i].norm.tv_sec right: -2147483649 (0xffffffff7fffffff); from: result.tv_sec tst-timespec.c:302: numeric comparison failure left: -999999999 (0xffffffffc4653601); from: norm_cases[i].norm.tv_nsec right: 0 (0x0); from: result.tv_nsec Testing support_timespec_check_in_range Test case 0 Test case 1 Test case 2 Test case 3 Test case 4 Test case 5 Test case 6 Test case 7 Test case 8 Test case 9 Test case 10 Test case 11 Test case 12 Test case 13 Test case 14 Test case 15 Test case 16 Test case 17 Test case 18 Test case 19 Test case 20 error: 4 test failures
No failure on arm or ppc.
It fails for i686 and x32 under x86-64 5.7.8 kernel.
Fixed by commit f896fc0f2bfc9f3f8df0563a7c99dcbf24bab655 Author: H.J. Lu <hjl.tools@gmail.com> Date: Mon Jul 13 16:15:56 2020 -0700 Correct timespec implementation [BZ #26232] 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).