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.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2024-02-22 11:35:07 +01:00
parent a181901ab2
commit 37eba4b302

View File

@@ -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);