From ae5c498d93d049d9574d3f8f18e62cac64cbdf5c Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Mon, 17 Jul 2017 15:50:43 -0400 Subject: Extend NSS test suite * nss/nss_test.h: New. * nss/nss_test1.h: Rewrite to use test-provided data. Add group tests. Parameterize to allow multiple instances. * nss/nss_test2.h: New. Second instance. * nss/nss_test.ver: New. * nss/nss_test1.c: Update to use new framework. * nss/nss_test2.c: New. * nss/nss_test3.c: New. * nss/nss_test4.c: New. * nss/nss_test5.c: New. * nss/Makefile: Build new tests. * shlib-versions: Add libnss_test2. --- nss/Makefile | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) (limited to 'nss/Makefile') diff --git a/nss/Makefile b/nss/Makefile index 430be8726f..d9f6d41181 100644 --- a/nss/Makefile +++ b/nss/Makefile @@ -50,8 +50,12 @@ extra-objs += $(makedb-modules:=.o) tests-static = tst-field tests-internal = tst-field -tests = test-netdb tst-nss-test1 test-digits-dots \ - tst-nss-getpwent bug17079 +tests = test-netdb test-digits-dots tst-nss-getpwent bug17079 \ + tst-nss-test1 \ + tst-nss-test2 \ + tst-nss-test3 \ + tst-nss-test4 \ + tst-nss-test5 xtests = bug-erange # If we have a thread library then we can test cancellation against @@ -94,7 +98,7 @@ routines += $(libnss_files-routines) static-only-routines += $(libnss_files-routines) tests-static += tst-nss-static endif -extra-test-objs += nss_test1.os +extra-test-objs += nss_test1.os nss_test2.os include ../Rules @@ -123,14 +127,29 @@ $(objpfx)makedb: $(makedb-modules:%=$(objpfx)%.o) $(inst_vardbdir)/Makefile: db-Makefile $(+force) $(do-install) +libnss_test1.so-no-z-defs = 1 +libnss_test2.so-no-z-defs = 1 + +rtld-tests-LDFLAGS += -Wl,--dynamic-list=nss_test.ver + libof-nss_test1 = extramodules +libof-nss_test2 = extramodules $(objpfx)/libnss_test1.so: $(objpfx)nss_test1.os $(link-libc-deps) $(build-module) +$(objpfx)/libnss_test2.so: $(objpfx)nss_test2.os $(link-libc-deps) + $(build-module) +$(objpfx)nss_test2.os : nss_test1.c ifdef libnss_test1.so-version $(objpfx)/libnss_test1.so$(libnss_test1.so-version): $(objpfx)/libnss_test1.so $(make-link) endif -$(objpfx)tst-nss-test1.out: $(objpfx)/libnss_test1.so$(libnss_test1.so-version) +ifdef libnss_test2.so-version +$(objpfx)/libnss_test2.so$(libnss_test2.so-version): $(objpfx)/libnss_test2.so + $(make-link) +endif +$(patsubst %,$(objpfx)%.out,$(tests)) : \ + $(objpfx)/libnss_test1.so$(libnss_test1.so-version) \ + $(objpfx)/libnss_test2.so$(libnss_test2.so-version) ifeq (yes,$(have-thread-library)) $(objpfx)tst-cancel-getpwuid_r: $(shared-thread-library) -- cgit 1.4.1