summaryrefslogtreecommitdiff
path: root/source4/lib/replace/test/testsuite.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-16 02:49:52 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:50:31 +0100
commit41e45d690ff5074d861b486c8711bf03cffa2efc (patch)
treed622451abcb606dee94e8e25c75b8ae3d8316933 /source4/lib/replace/test/testsuite.c
parentbe4decb2b73e3431155663c2dae3a8452ecde28a (diff)
downloadsamba-41e45d690ff5074d861b486c8711bf03cffa2efc.tar.gz
samba-41e45d690ff5074d861b486c8711bf03cffa2efc.tar.bz2
samba-41e45d690ff5074d861b486c8711bf03cffa2efc.zip
r26468: Match getifaddrs more closely, add trivial test.
(This used to be commit 92898c043b5a2649a2e423d02bcdaea78ae55737)
Diffstat (limited to 'source4/lib/replace/test/testsuite.c')
-rw-r--r--source4/lib/replace/test/testsuite.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/source4/lib/replace/test/testsuite.c b/source4/lib/replace/test/testsuite.c
index 5b95ae395c..c9f3301005 100644
--- a/source4/lib/replace/test/testsuite.c
+++ b/source4/lib/replace/test/testsuite.c
@@ -856,6 +856,25 @@ static int test_strptime(void)
return libreplace_test_strptime();
}
+static int test_getifaddrs(void)
+{
+ struct ifaddrs *ifa;
+ int ret;
+
+ printf("test: getifaddrs\n");
+
+ ret = getifaddrs(&ifa);
+ if (ret != 0) {
+ printf("failure: getifaddrs\n");
+ return false;
+ }
+
+ freeifaddrs(ifa);
+
+ printf("success: getifaddrs\n");
+ return true;
+}
+
struct torture_context;
bool torture_local_replace(struct torture_context *ctx)
{
@@ -903,6 +922,7 @@ bool torture_local_replace(struct torture_context *ctx)
ret &= test_MAX();
ret &= test_socketpair();
ret &= test_strptime();
+ ret &= test_getifaddrs();
return ret;
}