summaryrefslogtreecommitdiffstats
path: root/src/testdir/shared.vim
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2023-11-02 20:05:38 +0100
committerChristian Brabandt <cb@256bit.org>2023-11-02 20:05:38 +0100
commit43cb8e1c3b60f6fcd30a9a0f9b01b86d640b2165 (patch)
treeed3bc59e58b2ebc0deac3e1d5544425ebf79af3b /src/testdir/shared.vim
parent1bf1bf569b96d2f9b28e0cce0968ffbf2fb80aac (diff)
patch 9.0.2082: test_channel may fail because of IPv6 config issuev9.0.2082
Problem: test_channel may fail because of IPv6 config issues Solution: Catch and skip the test, if getaddrinfo() fails with 'Address family not supported' Mark tests as skipped when ch_open encounters E901 On some of the Debian build systems, the IPv6 channel tests fail because `ch_open('[::1]:<port>', ...)` raises the error "E901: getaddrinfo() in channel_open(): Address family for hostname not supported". This appears to happen because getaddrinfo() can't perform the reverse lookup for the ::1, which is a config issue on that system. Therefore, instead of reporting a test failure, mark the test as skipped due to the bad network config closes: #13473 Signed-off-by: James McCoy <jamessan@jamessan.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'src/testdir/shared.vim')
-rw-r--r--src/testdir/shared.vim2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/testdir/shared.vim b/src/testdir/shared.vim
index d373a6e740..4d008a0bfc 100644
--- a/src/testdir/shared.vim
+++ b/src/testdir/shared.vim
@@ -113,6 +113,8 @@ func RunServer(cmd, testfunc, args)
endif
call call(function(a:testfunc), [port])
+ catch /E901.*Address family for hostname not supported/
+ throw 'Skipped: Invalid network setup ("' .. v:exception .. '" in ' .. v:throwpoint .. ')'
catch
call assert_report('Caught exception: "' . v:exception . '" in ' . v:throwpoint)
finally