]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
elf/tst-libc_dlvsym: Add a TEST_COMPAT around some symbol tests
authorAlistair Francis <alistair.francis@wdc.com>
Mon, 24 Aug 2020 22:35:44 +0000 (15:35 -0700)
committerAlistair Francis <alistair.francis@wdc.com>
Thu, 27 Aug 2020 15:17:13 +0000 (08:17 -0700)
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>
elf/tst-libc_dlvsym.h

index 6b132dd7c3e4d6521e6d242a543ceda45d228c39..99ef8a3ea3bd275853456aa1685945df71bb4306 100644 (file)
@@ -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);