From: Zbigniew Jędrzejewski-Szmek Date: Thu, 22 Feb 2024 10:35:07 +0000 (+0100) Subject: test-nss-hosts: treat negative host lookup as slow X-Git-Tag: v256-rc1~771^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=37eba4b3028da9de7e6fb42557019f98bbda91b1;p=thirdparty%2Fsystemd.git test-nss-hosts: treat negative host lookup as slow The negative lookup can be quite slow. On my local network, skipping this test saves about half of the runtime of test-nss-hosts. --- diff --git a/src/test/test-nss-hosts.c b/src/test/test-nss-hosts.c index 7758f0adc98..72a9c6454c6 100644 --- a/src/test/test-nss-hosts.c +++ b/src/test/test-nss-hosts.c @@ -451,7 +451,11 @@ static int parse_argv(int argc, char **argv, } else { _cleanup_free_ char *hostname = NULL; assert_se(hostname = gethostname_malloc()); - assert_se(names = strv_new("localhost", "_gateway", "_outbound", "foo_no_such_host", hostname)); + assert_se(names = strv_new("localhost", + "_gateway", + "_outbound", + hostname, + slow_tests_enabled() ? "foo_no_such_host" : NULL)); n = make_addresses(&addrs); assert_se(n >= 0);