]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
New test - gdb.base/tls-dlobj.exp
authorKevin Buettner <kevinb@redhat.com>
Thu, 24 Apr 2025 04:39:29 +0000 (21:39 -0700)
committerKevin Buettner <kevinb@redhat.com>
Thu, 24 Apr 2025 16:54:43 +0000 (09:54 -0700)
commite4a5126ec025fc3a2e05e8535ccd65d6990001d0
tree493828bc410711bca97bdbd981f7aa8f95183b4d
parentb0789fb6c2f95c56890c2858d7360771cdf153e7
New test - gdb.base/tls-dlobj.exp

This test exercises musl_link_map_to_tls_module_id() and
glibc_link_map_to_tls_module_id(), both of which are in solib-svr4.c.

Prior to writing this test, I had only written what is now named
'musl_link_map_to_tls_module_id' and it worked for both GLIBC and
MUSL.  Once I wrote this new test, tls-dlobj.exp, there were a number
of tests which didn't work with GLIBC.  This led me to write a
GLIBC-specific link map to module id function, i.e,
'glibc_link_map_to_tls_module_id'.

It only has one compilation scenario, in which the pthread(s) library
is used - as noted in a comment, it became too much of a hassle to try
to KFAIL things, though it certainly could have been done in much the
same was as was done in gdb.base/multiobj.exp.  It didn't seem that
important to do so, however, since I believe that the other tests
have adequate coverage for different compilation scenarios.

Tested-By: Luis Machado <luis.machado@arm.com>
Approved-By: Luis Machado <luis.machado@arm.com>
gdb/testsuite/gdb.base/tls-dlobj-lib.c [new file with mode: 0644]
gdb/testsuite/gdb.base/tls-dlobj.c [new file with mode: 0644]
gdb/testsuite/gdb.base/tls-dlobj.exp [new file with mode: 0644]