tests-internal := bug-regex5 bug-regex20 bug-regex33 \
tst-rfc3484 tst-rfc3484-2 tst-rfc3484-3 \
tst-glob_lstat_compat tst-spawn4-compat
-xtests := bug-ga2 tst-getaddrinfo4 tst-getaddrinfo5
+tests-container := bug-ga2
+xtests := tst-getaddrinfo4 tst-getaddrinfo5
ifeq (yes,$(build-shared))
test-srcs := globtest
tests += wordexp-test tst-exec tst-spawn tst-spawn2 tst-spawn3
$(objpfx)tst-boost-mem.out $(objpfx)tst-getconf.out \
$(objpfx)bug-glob2-mem.out $(objpfx)tst-vfork3-mem.out \
$(objpfx)tst-fnmatch-mem.out $(objpfx)bug-regex36-mem.out \
- $(objpfx)tst-glob-tilde-mem.out
-xtests-special += $(objpfx)bug-ga2-mem.out
+ $(objpfx)tst-glob-tilde-mem.out $(objpfx)bug-ga2-mem.out
endif
include ../Rules
#include <netdb.h>
#include <stdio.h>
#include <string.h>
+#include <support/check.h>
-int
-main (void)
+static int
+do_test (void)
{
struct addrinfo hints, *res;
int i, ret;
ret = getaddrinfo ("www.gnu.org", "http", &hints, &res);
if (ret)
- {
- printf ("%s\n", gai_strerror (ret));
- return 1;
- }
+ FAIL_EXIT1 ("%s\n", gai_strerror (ret));
+
freeaddrinfo (res);
}
return 0;
}
+
+#include <support/test-driver.c>
--- /dev/null
+192.0.2.1 www.gnu.org
--- /dev/null
+services: files
+hosts: files
--- /dev/null
+http 80/tcp
resolv_context resolv_conf
tests = tst-aton tst-leaks tst-inet_ntop
-xtests = tst-leaks2
+tests-container = tst-leaks2
tests-internal += tst-inet_aton_exact
ifeq ($(run-built-tests),yes)
ifneq (no,$(PERL))
-tests-special += $(objpfx)mtrace-tst-leaks.out
-xtests-special += $(objpfx)mtrace-tst-leaks2.out
-tests-special += $(objpfx)mtrace-tst-resolv-res_ninit.out
+tests-special += $(objpfx)mtrace-tst-leaks.out $(objpfx)mtrace-tst-leaks2.out \
+ $(objpfx)mtrace-tst-resolv-res_ninit.out
endif
endif
#include <mcheck.h>
#include <netdb.h>
#include <resolv.h>
+#include <support/check.h>
static int
do_test (void)
mtrace ();
for (int i = 0; i < 20; ++i)
{
- res_init ();
- gethostbyname ("www.gnu.org");
+ TEST_VERIFY_EXIT (res_init () == 0);
+ if (gethostbyname ("www.gnu.org") == NULL)
+ FAIL_EXIT1 ("%s\n", hstrerror (h_errno));
}
return 0;
}
--- /dev/null
+192.0.2.1 www.gnu.org
--- /dev/null
+hosts: files