]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Linux: misc/tst-ofdlocks-compat can be a regular test
authorFlorian Weimer <fweimer@redhat.com>
Tue, 9 Mar 2021 20:07:24 +0000 (21:07 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Tue, 9 Mar 2021 20:07:24 +0000 (21:07 +0100)
Now that compat_symbol_reference works in non-internal tests.
Also do not build and run the test at all on architectures which
do not have the pre-2.28 symbol version of fcntl.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
sysdeps/unix/sysv/linux/Makefile
sysdeps/unix/sysv/linux/tst-ofdlocks-compat.c

index 1d209516e3eb3d1eb95d843e7e344764248d8e7f..e42bc7f13b64317246681d100fa533f26ddf6641 100644 (file)
@@ -109,7 +109,13 @@ tests += tst-clone tst-clone2 tst-clone3 tst-fanotify tst-personality \
         tst-tgkill tst-sysvsem-linux tst-sysvmsg-linux tst-sysvshm-linux \
         tst-timerfd tst-ppoll tst-futimens tst-utime tst-utimes \
         tst-clock_adjtime tst-adjtimex tst-ntp_adjtime
-tests-internal += tst-ofdlocks-compat tst-sigcontext-get_pc
+
+# Test for the symbol version of fcntl that was replaced in glibc 2.28.
+ifeq ($(have-GLIBC_2.27)$(build-shared),yesyes)
+tests += tst-ofdlocks-compat
+endif
+
+tests-internal += tst-sigcontext-get_pc
 
 CFLAGS-tst-sigcontext-get_pc.c = -fasynchronous-unwind-tables
 
index 9169e3baf8b280c5dd08b651e757b3861600081a..4af8da123f694e07904e2d65965213d76bf52d47 100644 (file)
@@ -25,7 +25,6 @@
 #include <support/check.h>
 
 #include <shlib-compat.h>
-#if TEST_COMPAT (libc, GLIBC_2_0, GLIBC_2_28)
 compat_symbol_reference (libc, fcntl, fcntl, GLIBC_2_0);
 
 static char *temp_filename;
@@ -86,12 +85,5 @@ do_test (void)
 
   return 0;
 }
-#else
-static int
-do_test (void)
-{
-  return 77;
-}
-#endif
 
 #include <support/test-driver.c>