From b0a679f4fd5363809a972b697e8a0b1fc66fcbb1 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Fri, 23 Dec 2016 13:39:23 -0500 Subject: Add deferred cancellation regression test for getpwuid_r. The fix in commit 312be3f9f5eab1643d7dcc7728c76d413d4f2640 resolved several cancellation issues in several APIs. This regression test is designed to double check that at least getpwuid_r remainds correctly implemented and does not provide additional unintended cancellation points that may leave locks in an inconsistent state. --- nss/Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'nss/Makefile') diff --git a/nss/Makefile b/nss/Makefile index 1f016d9..9132e17 100644 --- a/nss/Makefile +++ b/nss/Makefile @@ -54,6 +54,12 @@ tests = test-netdb tst-nss-test1 test-digits-dots \ $(tests-static) xtests = bug-erange +# If we have a thread library then we can test cancellation against +# some routines like getpwuid_r. +ifeq (yes,$(have-thread-library)) +tests += tst-cancel-getpwuid_r +endif + # Specify rules for the nss_* modules. We have some services. services := files db @@ -125,3 +131,7 @@ $(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) + +ifeq (yes,$(have-thread-library)) +$(objpfx)tst-cancel-getpwuid_r: $(shared-thread-library) +endif -- cgit v1.1