public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Alistair Francis <alistair.francis@wdc.com>
To: libc-alpha@sourceware.org
Cc: alistair23@gmail.com, alistair.francis@wdc.com
Subject: [PATCH] elf/tst-libc_dlvsym: Add a TEST_COMPAT around some symbol tests
Date: Wed, 26 Aug 2020 08:37:23 -0700	[thread overview]
Message-ID: <20200826153723.1649036-1-alistair.francis@wdc.com> (raw)

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 architecutres (such as RV32) that don't have this
symbol defined.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
---
 elf/tst-libc_dlvsym.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/elf/tst-libc_dlvsym.h b/elf/tst-libc_dlvsym.h
index 6b132dd7c3..4601e8869c 100644
--- a/elf/tst-libc_dlvsym.h
+++ b/elf/tst-libc_dlvsym.h
@@ -117,8 +117,12 @@ 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 aren't
+     avaliable on newly linked binaries.  */
+#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);
-- 
2.28.0


             reply	other threads:[~2020-08-26 15:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-26 15:37 Alistair Francis [this message]
2020-08-26 16:19 ` Adhemerval Zanella
2020-08-26 16:23   ` Alistair Francis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200826153723.1649036-1-alistair.francis@wdc.com \
    --to=alistair.francis@wdc.com \
    --cc=alistair23@gmail.com \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).