Bug 244732 - 2 tests failed after llvm10 import
Summary: 2 tests failed after llvm10 import
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: tests (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-testing (Nobody)
URL:
Keywords:
: 244823 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-03-11 08:12 UTC by Li-Wen Hsu
Modified: 2021-02-12 21:01 UTC (History)
4 users (show)

See Also:
dim: mfc-stable13+
dim: mfc-stable12+
dim: mfc-stable11+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Comment 1 Li-Wen Hsu freebsd_committer 2020-03-11 08:15:30 UTC
dim: can you help checking these?
Comment 2 commit-hook freebsd_committer 2020-03-11 12:44:31 UTC
A commit references this bug:

Author: lwhsu
Date: Wed Mar 11 12:43:55 UTC 2020
New revision: 358887
URL: https://svnweb.freebsd.org/changeset/base/358887

Log:
  Temporarily skip 2 failing tests after llvm10 import

  PR:		244732
  Sponsored by:	The FreeBSD Foundation

Changes:
  head/lib/libproc/tests/proc_test.c
  head/lib/msun/tests/ctrig_test.c
Comment 3 Enji Cooper freebsd_committer 2020-03-12 21:56:54 UTC
I don't know how the symbols don't match, but they obviously don't in gdb:

$ gdb /usr/tests/lib/libproc/proc_test 
GNU gdb (GDB) 9.1 [GDB v9.1 for FreeBSD]
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-portbld-freebsd13.0".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from proc_test...
Reading symbols from /usr/lib/debug//usr/tests/lib/libproc/proc_test.debug...
(gdb) set args symbol_lookup
(gdb) b 143
(gdb) p *sym
$4 = {st_name = 3876, st_info = 18 '\022', st_other = 0 '\000', st_shndx = 11, st_value = 34361885776, st_size = 6}
(gdb) p tsym
$5 = {st_name = 2377, st_info = 2 '\002', st_other = 2 '\002', st_shndx = 11, st_value = 34361879648, st_size = 8427}
(gdb) p symname
$6 = 0x2011d2 "r_debug_state"

CCing @markj, since this looks like it's broken.
Comment 4 Enji Cooper freebsd_committer 2020-03-12 21:58:39 UTC
The ctrig_test issue looks more concerning. I think the new code isn't properly raising floating point exceptions with ctrig(3) and llvm10.
Comment 5 Dimitry Andric freebsd_committer 2020-03-12 23:07:30 UTC
(In reply to Enji Cooper from comment #4)
I have been diving into the ctrig issue, and it appears to be a side-effect of https://reviews.llvm.org/rL372009.

It seems that now ctanh() and ctanhf() can have FE_INVALID set after calling them with {inf,inf}.  But this code and the way it works is very obtuse.

I'm still analyzing it.
Comment 6 commit-hook freebsd_committer 2020-05-07 20:27:57 UTC
A commit references this bug:

Author: lwhsu
Date: Thu May  7 20:27:32 UTC 2020
New revision: 360797
URL: https://svnweb.freebsd.org/changeset/base/360797

Log:
  MFC r358887:

  Temporarily skip 2 failing tests after llvm10 import

  PR:		244732
  Sponsored by:	The FreeBSD Foundation

Changes:
_U  stable/12/
  stable/12/lib/libproc/tests/proc_test.c
  stable/12/lib/msun/tests/ctrig_test.c
Comment 7 Mark Johnston freebsd_committer 2020-05-08 15:32:27 UTC
I'm looking at the libproc test failure now.
Comment 8 commit-hook freebsd_committer 2020-05-11 22:17:47 UTC
A commit references this bug:

Author: lwhsu
Date: Mon May 11 22:17:25 UTC 2020
New revision: 360938
URL: https://svnweb.freebsd.org/changeset/base/360938

Log:
  MFC r358887 (partially):

  Temporarily skip 2 failing tests after llvm10 import

  The DDifference of the original revision to -head is only
  lib.msun.ctrig_test.test_inf_inputs skipped.

  PR:		244732
  Sponsored by:	The FreeBSD Foundation

Changes:
_U  stable/11/
  stable/11/lib/msun/tests/ctrig_test.c
Comment 9 commit-hook freebsd_committer 2020-05-12 17:01:15 UTC
A commit references this bug:

Author: markj
Date: Tue May 12 17:00:47 UTC 2020
New revision: 360979
URL: https://svnweb.freebsd.org/changeset/base/360979

Log:
  librtld_db: Fix shlib mapping offsets.

  kve_offset gives the offset into the backing file, which is not what we
  want since different segments may map the same page.  Use the base of
  the mapping to determine the offset exported by librtld_db instead.

  PR:		244732
  Reported by:	Jenkins, Nicol? Mazzucato <nicomazz97@gmail.com>
  MFC after:	2 weeks
  Sponsored by:	The FreeBSD Foundation

Changes:
  head/lib/librtld_db/rtld_db.c
Comment 10 commit-hook freebsd_committer 2020-05-12 17:06:17 UTC
A commit references this bug:

Author: markj
Date: Tue May 12 17:05:56 UTC 2020
New revision: 360980
URL: https://svnweb.freebsd.org/changeset/base/360980

Log:
  Re-enable proc_test:symbol_lookup after r360979.

  PR:		244732
  MFC after:	2 weeks
  Sponsored by:	The FreeBSD Foundation

Changes:
  head/lib/libproc/tests/proc_test.c
Comment 11 commit-hook freebsd_committer 2020-05-26 14:05:54 UTC
A commit references this bug:

Author: markj
Date: Tue May 26 14:05:38 UTC 2020
New revision: 361504
URL: https://svnweb.freebsd.org/changeset/base/361504

Log:
  MFC r360979:
  librtld_db: Fix shlib mapping offsets.

  PR:	244732

Changes:
_U  stable/12/
  stable/12/lib/librtld_db/rtld_db.c
Comment 12 commit-hook freebsd_committer 2020-05-26 14:06:56 UTC
A commit references this bug:

Author: markj
Date: Tue May 26 14:06:07 UTC 2020
New revision: 361505
URL: https://svnweb.freebsd.org/changeset/base/361505

Log:
  MFC r360980:
  Re-enable proc_test:symbol_lookup after r360979.

  PR:	244732

Changes:
_U  stable/12/
  stable/12/lib/libproc/tests/proc_test.c
Comment 13 Mark Johnston freebsd_committer 2020-07-11 17:26:53 UTC
*** Bug 244823 has been marked as a duplicate of this bug. ***
Comment 14 commit-hook freebsd_committer 2021-02-09 21:08:09 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=ac76bc1145dd7f4476e5d982ce8f355f71015713

commit ac76bc1145dd7f4476e5d982ce8f355f71015713
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2021-02-09 21:06:51 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2021-02-09 21:07:05 +0000

    Fix lib/msun's ctrig_test/test_inf_inputs test case with clang >= 10

    This sprinkles a few strategic volatiles in an attempt to defeat clang's
    optimization interfering with the expected floating-point exception
    flags.

    Reported by:    lwhsu
    PR:             244732
    MFC after:      3 days

 lib/msun/src/s_ccoshf.c     | 2 +-
 lib/msun/src/s_ctanh.c      | 2 +-
 lib/msun/src/s_ctanhf.c     | 2 +-
 lib/msun/tests/ctrig_test.c | 3 ---
 4 files changed, 3 insertions(+), 6 deletions(-)
Comment 15 commit-hook freebsd_committer 2021-02-12 20:56:27 UTC
A commit in branch stable/13 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=5bc11b95b87c931d45dee0e3f27ce1455f59a460

commit 5bc11b95b87c931d45dee0e3f27ce1455f59a460
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2021-02-12 20:45:33 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2021-02-12 20:48:03 +0000

    test_inf_inputs: Use atf_tc_expect_fail() instead of atf_tc_skip()

    Reviewed By:    lwhsu
    Differential Revision: https://reviews.freebsd.org/D28396

    (cherry picked from commit 4d2edf3af1dbd8a3e7cf1b22343a1ecfc2dd41ba)

    Fix lib/msun's ctrig_test/test_inf_inputs test case with clang >= 10

    This sprinkles a few strategic volatiles in an attempt to defeat clang's
    optimization interfering with the expected floating-point exception
    flags.

    Reported by:    lwhsu
    PR:             244732

    (cherry picked from commit ac76bc1145dd7f4476e5d982ce8f355f71015713)

 lib/msun/src/s_ccoshf.c     | 2 +-
 lib/msun/src/s_ctanh.c      | 2 +-
 lib/msun/src/s_ctanhf.c     | 2 +-
 lib/msun/tests/ctrig_test.c | 3 ---
 4 files changed, 3 insertions(+), 6 deletions(-)
Comment 16 commit-hook freebsd_committer 2021-02-12 20:56:28 UTC
A commit in branch stable/12 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=f2a88e744701de1b37d7463828f2147f96e39d58

commit f2a88e744701de1b37d7463828f2147f96e39d58
Author:     Alex Richardson <arichardson@FreeBSD.org>
AuthorDate: 2021-01-29 09:28:40 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2021-02-12 20:50:28 +0000

    test_inf_inputs: Use atf_tc_expect_fail() instead of atf_tc_skip()

    Reviewed By:    lwhsu
    Differential Revision: https://reviews.freebsd.org/D28396

    (cherry picked from commit 4d2edf3af1dbd8a3e7cf1b22343a1ecfc2dd41ba)

    Fix lib/msun's ctrig_test/test_inf_inputs test case with clang >= 10

    This sprinkles a few strategic volatiles in an attempt to defeat clang's
    optimization interfering with the expected floating-point exception
    flags.

    Reported by:    lwhsu
    PR:             244732

    (cherry picked from commit ac76bc1145dd7f4476e5d982ce8f355f71015713)

 lib/msun/src/s_ccoshf.c     | 2 +-
 lib/msun/src/s_ctanh.c      | 2 +-
 lib/msun/src/s_ctanhf.c     | 2 +-
 lib/msun/tests/ctrig_test.c | 3 ---
 4 files changed, 3 insertions(+), 6 deletions(-)
Comment 17 commit-hook freebsd_committer 2021-02-12 20:57:31 UTC
A commit in branch stable/11 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=ca9df934a5520f9692eb6808b1d02c0d3f1b927a

commit ca9df934a5520f9692eb6808b1d02c0d3f1b927a
Author:     Alex Richardson <arichardson@FreeBSD.org>
AuthorDate: 2021-01-29 09:28:40 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2021-02-12 20:53:02 +0000

    test_inf_inputs: Use atf_tc_expect_fail() instead of atf_tc_skip()

    Reviewed By:    lwhsu
    Differential Revision: https://reviews.freebsd.org/D28396

    (cherry picked from commit 4d2edf3af1dbd8a3e7cf1b22343a1ecfc2dd41ba)

    Fix lib/msun's ctrig_test/test_inf_inputs test case with clang >= 10

    This sprinkles a few strategic volatiles in an attempt to defeat clang's
    optimization interfering with the expected floating-point exception
    flags.

    Reported by:    lwhsu
    PR:             244732

    (cherry picked from commit ac76bc1145dd7f4476e5d982ce8f355f71015713)

 lib/msun/src/s_ccoshf.c     | 2 +-
 lib/msun/src/s_ctanh.c      | 2 +-
 lib/msun/src/s_ctanhf.c     | 2 +-
 lib/msun/tests/ctrig_test.c | 3 ---
 4 files changed, 3 insertions(+), 6 deletions(-)