diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2024-02-22 11:35:07 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2024-02-22 11:37:17 +0100 |
commit | 37eba4b3028da9de7e6fb42557019f98bbda91b1 (patch) | |
tree | a063bde50f7364ad5bdce8aa233f67464279b5bc | |
parent | test-ukify: skip signing in tests when slow tests are disabled (diff) | |
download | systemd-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.c | 6 |
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); |