public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc] elf/tst-libc_dlvsym: Add a TEST_COMPAT around some symbol tests
@ 2020-08-27 15:27 Alistair Francis
  0 siblings, 0 replies; only message in thread
From: Alistair Francis @ 2020-08-27 15:27 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=9bd8e3f99d00fc578b8db0a9d61e59e84bbb6b0a

commit 9bd8e3f99d00fc578b8db0a9d61e59e84bbb6b0a
Author: Alistair Francis <alistair.francis@wdc.com>
Date:   Mon Aug 24 15:35:44 2020 -0700

    elf/tst-libc_dlvsym: Add a TEST_COMPAT around some symbol tests
    
    The _sys_errlist and _sys_siglist symbols are deprecated since 2.32.
    This patch adds a TEST_COMPAT check around the tests. This fixes test
    failures on new architectures (such as RV32) that don't have this
    symbol defined.
    
    Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>

Diff:
---
 elf/tst-libc_dlvsym.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/elf/tst-libc_dlvsym.h b/elf/tst-libc_dlvsym.h
index 6b132dd7c3..99ef8a3ea3 100644
--- a/elf/tst-libc_dlvsym.h
+++ b/elf/tst-libc_dlvsym.h
@@ -117,8 +117,13 @@ compare_vsyms (void)
      obtain an explicit handle for libc.so.  */
   void *libc_handle = xdlopen (LIBC_SO, RTLD_LAZY | RTLD_NOLOAD);
 
+
+  /* sys_errlist and sys_siglist were deprecated in glibc 2.32 and they are
+     not available on architectures with base ABI newer than 2.32.  */
+#if TEST_COMPAT (libc, GLIBC_2_0, GLIBC_2_32)
   compare_vsyms_1 (libc_handle, "_sys_errlist");
   compare_vsyms_1 (libc_handle, "_sys_siglist");
+#endif
   compare_vsyms_1 (libc_handle, "quick_exit");
 
   xdlclose (libc_handle);


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-08-27 15:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-27 15:27 [glibc] elf/tst-libc_dlvsym: Add a TEST_COMPAT around some symbol tests Alistair Francis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).