From 159a783fdf69a853d8998d1fd6209c3e1aded2da Mon Sep 17 00:00:00 2001 From: Enji Cooper Date: Wed, 23 Dec 2015 18:48:32 +0000 Subject: [PATCH] Increase the timeout for resolv_test from the default (300 seconds) to 450 seconds This is required on slower network connections, and on older releases (stable/10 seems to be slower as far as name resolution goes.. not sure why yet). Remove an outdated comment in the Makefile from when I was working on this code over a year ago on github MFC after: 1 week Sponsored by: EMC / Isilon Storage Division --- lib/libc/tests/resolv/Makefile | 1 - lib/libc/tests/resolv/resolv_test.c | 16 +++++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/lib/libc/tests/resolv/Makefile b/lib/libc/tests/resolv/Makefile index 4e4e62be36c..4fb43d8955e 100644 --- a/lib/libc/tests/resolv/Makefile +++ b/lib/libc/tests/resolv/Makefile @@ -6,7 +6,6 @@ BINDIR= ${TESTSDIR} FILES+= mach ATF_TESTS_C+= resolv_test -#TEST_METADATA.resolv_test= timeout="1800" # Note: this test relies on being dynamically linked. You will get a # spurious PASS for a statically linked test. diff --git a/lib/libc/tests/resolv/resolv_test.c b/lib/libc/tests/resolv/resolv_test.c index 5c53569f7e7..74e89b13b80 100644 --- a/lib/libc/tests/resolv/resolv_test.c +++ b/lib/libc/tests/resolv/resolv_test.c @@ -289,21 +289,31 @@ do { \ ATF_REQUIRE(run_tests(_hostlist_file, method) == 0); \ } while(0) -ATF_TC_WITHOUT_HEAD(getaddrinfo_test); +ATF_TC(getaddrinfo_test); +ATF_TC_HEAD(getaddrinfo_test, tc) { + atf_tc_set_md_var(tc, "timeout", "450"); +} ATF_TC_BODY(getaddrinfo_test, tc) { RUN_TESTS(tc, METHOD_GETADDRINFO); } -ATF_TC_WITHOUT_HEAD(gethostby_test); +ATF_TC(gethostby_test); +ATF_TC_HEAD(gethostby_test, tc) { + atf_tc_set_md_var(tc, "timeout", "450"); +} ATF_TC_BODY(gethostby_test, tc) { RUN_TESTS(tc, METHOD_GETHOSTBY); } -ATF_TC_WITHOUT_HEAD(getipnodeby_test); +ATF_TC(getipnodeby_test); +ATF_TC_HEAD(getipnodeby_test, tc) { + + atf_tc_set_md_var(tc, "timeout", "450"); +} ATF_TC_BODY(getipnodeby_test, tc) {