summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2024-02-22 11:35:07 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2024-02-22 11:37:17 +0100
commit37eba4b3028da9de7e6fb42557019f98bbda91b1 (patch)
treea063bde50f7364ad5bdce8aa233f67464279b5bc
parenttest-ukify: skip signing in tests when slow tests are disabled (diff)
downloadsystemd-37eba4b3028da9de7e6fb42557019f98bbda91b1.tar.xz
systemd-37eba4b3028da9de7e6fb42557019f98bbda91b1.zip
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.
-rw-r--r--src/test/test-nss-hosts.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/test/test-nss-hosts.c b/src/test/test-nss-hosts.c
index 7758f0adc9..72a9c6454c 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);