summaryrefslogtreecommitdiff
path: root/source3/lib/replace/test
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-16 02:49:52 +0100
committerMichael Adam <obnox@samba.org>2008-02-19 21:56:41 +0100
commitd0d4fc5f5412bcf2977afc01edee92107e995c80 (patch)
tree37f69aa5ab21e799134fe8e51e0429b595d954dc /source3/lib/replace/test
parent2235ffe2f754da543b796446377b1419bf046204 (diff)
downloadsamba-d0d4fc5f5412bcf2977afc01edee92107e995c80.tar.gz
samba-d0d4fc5f5412bcf2977afc01edee92107e995c80.tar.bz2
samba-d0d4fc5f5412bcf2977afc01edee92107e995c80.zip
r26468: Match getifaddrs more closely, add trivial test.
(cherry picked from commit 92898c043b5a2649a2e423d02bcdaea78ae55737) (This used to be commit 3f9c0c210022905c7811b2e07b3b655929daf930)
Diffstat (limited to 'source3/lib/replace/test')
-rw-r--r--source3/lib/replace/test/testsuite.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/source3/lib/replace/test/testsuite.c b/source3/lib/replace/test/testsuite.c
index 5b95ae395c..c9f3301005 100644
--- a/source3/lib/replace/test/testsuite.c
+++ b/source3/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;
}