summary refs log tree commit diff
path: root/nss/tst-nss-static.c
diff options
context:
space:
mode:
authorPaul Pluzhnikov <ppluzhnikov@google.com>2012-04-06 13:49:35 -0700
committerPaul Pluzhnikov <ppluzhnikov@google.com>2012-04-06 13:49:35 -0700
commit62470f605ed931f88fb1993f4440d5bb02afa2b1 (patch)
tree5a52238f0bbc400ec5d72ebc2f0493cd9dbbc549 /nss/tst-nss-static.c
parentf23a86baf73e610843ac723fbdd59e7234e6d31d (diff)
downloadglibc-62470f605ed931f88fb1993f4440d5bb02afa2b1.tar.gz
glibc-62470f605ed931f88fb1993f4440d5bb02afa2b1.tar.xz
glibc-62470f605ed931f88fb1993f4440d5bb02afa2b1.zip
2012-04-06 Paul Pluzhnikov <ppluzhnikov@google.com>
	[BZ #13895]
	* nss/nsswitch.c (nss_load_library, __nss_lookup_function): Avoid
	extra indirection.
	* nss/Makefile (tests-static, tests): Add tst-nss-static.
	* nss/tst-nss-static.c: New.
Diffstat (limited to 'nss/tst-nss-static.c')
-rw-r--r--nss/tst-nss-static.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/nss/tst-nss-static.c b/nss/tst-nss-static.c
new file mode 100644
index 0000000000..98cf073deb
--- /dev/null
+++ b/nss/tst-nss-static.c
@@ -0,0 +1,15 @@
+/* glibc test for static NSS.  */
+#include <stdio.h>
+
+#define TEST_FUNCTION do_test ()
+static int
+do_test (void)
+{
+  struct passwd *pw;
+
+  pw = getpwuid(0);
+  return pw == NULL;
+}
+
+
+#include "../test-skeleton.c"