Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Stone <michael@laptop.org>2009-12-19 22:52:45 (GMT)
committer Michael Stone <michael@laptop.org>2009-12-19 22:52:45 (GMT)
commitfa5a0ebb2e71b4ca7959481094318f5a62d15f9d (patch)
tree4f9e2a91cc196267e5f8a9c42bb3361bce4b9ee4
parent9babd2f652bd5b06206f8fc43e2403cd09cc7038 (diff)
Add test_endgrent script.
-rw-r--r--rainbow/nss/Makefile6
-rw-r--r--rainbow/nss/test_endgrent.c9
2 files changed, 14 insertions, 1 deletions
diff --git a/rainbow/nss/Makefile b/rainbow/nss/Makefile
index 6fe8dcf..d2bf756 100644
--- a/rainbow/nss/Makefile
+++ b/rainbow/nss/Makefile
@@ -18,9 +18,10 @@ RAINBOW_OBJS = nss-rainbow.o buf.o nat.o slist.o
UIDS_OBJS = uids.o
GIDS_OBJS = gids.o
TEST_SLIST_OBJS = test_slist.o slist.o
+TEST_ENDGRENT_OBJS = test_endgrent.o
TEST_NAT_OBJS = test_nat.o nat.o
ALL_OBJS = $(RAINBOW_OBJS) $(UIDS_OBJS) $(GIDS_OBJS) $(TEST_SLIST_OBJS) $(TEST_NAT_OBJS)
-BINARIES = libnss_rainbow.so.2 uids gids test_slist test_nat
+BINARIES = libnss_rainbow.so.2 uids gids test_slist test_nat test_endgrent
# targets
@@ -40,6 +41,9 @@ install:
# linked binaries
+test_endgrent: $(TEST_ENDGRENT_OBJS)
+ $(CC) $(ALLCFLAGS) -o $@ $^
+
test_slist: $(TEST_SLIST_OBJS)
$(CC) $(ALLCFLAGS) -o $@ $^
diff --git a/rainbow/nss/test_endgrent.c b/rainbow/nss/test_endgrent.c
new file mode 100644
index 0000000..d5e82bc
--- /dev/null
+++ b/rainbow/nss/test_endgrent.c
@@ -0,0 +1,9 @@
+#define _GNU_SOURCE
+#include <grp.h>
+
+int main() {
+ setgrent();
+ endgrent();
+ return 0;
+}
+