]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
resolv: tst-p_secstodate 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 for non-internal tests, too.
Also do not build and run the tests on architectures which lack the
__p_secstodate compatibility symbol.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
resolv/Makefile
resolv/tst-p_secstodate.c

index 1047bb6ae5bc7f50f48ae696d5b5f5bea17e6b9c..fb19c9302612158f6edba7d87fb951971c19c0f3 100644 (file)
@@ -94,7 +94,9 @@ endif # $(build-shared)
 tests-internal += tst-inet_pton
 
 # This test accesses the __p_secstodate compat symbol.
-tests-internal += tst-p_secstodate
+ifeq ($(have-GLIBC_2.26)$(build-shared),yesyes)
+tests += tst-p_secstodate
+endif
 
 # This test sends millions of packets and is rather slow.
 xtests += tst-resolv-qtypes
index 78b3aa1d6f27aba9374988d9d71b05781cdd8850..f45c90802541b9f112534ad2dd503ae7741b9b18 100644 (file)
@@ -25,8 +25,6 @@
 
 #include <shlib-compat.h>
 
-#if TEST_COMPAT (libresolv, GLIBC_2_0, GLIBC_2_27)
-
 char *__p_secstodate (unsigned long int);
 compat_symbol_reference (libresolv, __p_secstodate, __p_secstodate, GLIBC_2_0);
 
@@ -71,14 +69,4 @@ do_test (void)
   return ret;
 }
 
-#else
-
-static int
-do_test (void)
-{
-  return 77;
-}
-
-#endif
-
 #include <support/test-driver.c>