[Bug time/26232] New: FAIL: support/tst-timespec for 32-bit targets

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug time/26232] New: FAIL: support/tst-timespec for 32-bit targets

Sourceware - glibc-bugs mailing list
https://sourceware.org/bugzilla/show_bug.cgi?id=26232

            Bug ID: 26232
           Summary: FAIL: support/tst-timespec for 32-bit targets
           Product: glibc
           Version: 2.32
            Status: NEW
          Severity: normal
          Priority: P2
         Component: time
          Assignee: unassigned at sourceware dot org
          Reporter: hjl.tools at gmail dot com
                CC: lamm at linux dot ibm.com
  Target Milestone: ---

For 32-bit targets,

commit 04deeaa9ea74b0679dfc9d9155a37b6425f19a9f
Author: Lucas A. M. Magalhaes <[hidden email]>
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

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug time/26232] FAIL: support/tst-timespec for 32-bit targets

Sourceware - glibc-bugs mailing list
https://sourceware.org/bugzilla/show_bug.cgi?id=26232

--- Comment #1 from Andreas Schwab <[hidden email]> ---
No failure on arm or ppc.

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug time/26232] FAIL: support/tst-timespec for 32-bit targets

Sourceware - glibc-bugs mailing list
In reply to this post by Sourceware - glibc-bugs mailing list
https://sourceware.org/bugzilla/show_bug.cgi?id=26232

--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> ---
It fails for i686 and x32 under x86-64 5.7.8 kernel.

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug time/26232] FAIL: support/tst-timespec for 32-bit targets

Sourceware - glibc-bugs mailing list
In reply to this post by Sourceware - glibc-bugs mailing list
https://sourceware.org/bugzilla/show_bug.cgi?id=26232

Tulio Magno Quites Machado Filho <tuliom at ascii dot art.br> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tuliom at ascii dot art.br

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug time/26232] FAIL: support/tst-timespec for 32-bit targets

Sourceware - glibc-bugs mailing list
In reply to this post by Sourceware - glibc-bugs mailing list
https://sourceware.org/bugzilla/show_bug.cgi?id=26232

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
   Target Milestone|---                         |2.32
             Status|NEW                         |RESOLVED

--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> ---
Fixed by

commit f896fc0f2bfc9f3f8df0563a7c99dcbf24bab655
Author: H.J. Lu <[hidden email]>
Date:   Mon Jul 13 16:15:56 2020 -0700

    Correct timespec implementation [BZ #26232]

    commit 04deeaa9ea74b0679dfc9d9155a37b6425f19a9f
    Author: Lucas A. M. Magalhaes <[hidden email]>
    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).

--
You are receiving this mail because:
You are on the CC list for the bug.