Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dnsdist test_dnsdisttcp_cc/test_IncomingConnection* not as protocol neutral as maybe expected #10403

Closed
zeha opened this issue May 13, 2021 · 2 comments · Fixed by #10775
Closed

Comments

@zeha
Copy link
Collaborator

zeha commented May 13, 2021

  • Program: dnsdist
  • Issue type: Bug report/Feature request?

Short description

The tests seem to require a working IPv4 setup, although they seem to mock all (relevant) network connectivity.

Environment

  • Operating system: Debian bullseye (testing)
  • Software version: 1.6.0
  • Software source: source tarball

Longer description

Debian builds dnsdist on (some) IPv6-only buildds. Unfortunately the exact setup is not documented properly.

Build log for 1.6.0: https://buildd.debian.org/status/fetch.php?pkg=dnsdist&arch=amd64&ver=1.6.0-1&stamp=1620902648&raw=0

Relevant test log output:

test-dnsdisttcp_cc.cc(213): �[4;31;49mfatal error: in "test_dnsdisttcp_cc/test_IncomingConnection_BackendNoOOOR": critical check step.request == !d_client ? ExpectedStep::ExpectedRequest::closeClient : ExpectedStep::ExpectedRequest::closeBackend has failed [connect to the backend != close connection to backend]�[0;39;49m
terminate called after throwing an instance of 'boost::execution_aborted'
unknown location(0): �[4;31;49mfatal error: in "test_dnsdisttcp_cc/test_IncomingConnection_BackendNoOOOR": signal: SIGABRT (application abort requested)�[0;39;49m
test-dnsdisttcp_cc.cc(213): �[1;36;49mlast checkpoint�[0;39;49m
test-dnsdisttcp_cc.cc(213): �[4;31;49mfatal error: in "test_dnsdisttcp_cc/test_IncomingConnectionOOOR_BackendOOOR": critical check step.request == !d_client ? ExpectedStep::ExpectedRequest::closeClient : ExpectedStep::ExpectedRequest::closeBackend has failed [connect to the backend != close connection to backend]�[0;39;49m
terminate called recursively
unknown location(0): �[4;31;49mfatal error: in "test_dnsdisttcp_cc/test_IncomingConnectionOOOR_BackendOOOR": signal: SIGABRT (application abort requested)�[0;39;49m
test-dnsdisttcp_cc.cc(213): �[1;36;49mlast checkpoint�[0;39;49m
test-dnsdisttcp_cc.cc(213): �[4;31;49mfatal error: in "test_dnsdisttcp_cc/test_IncomingConnectionOOOR_BackendNotOOOR": critical check step.request == !d_client ? ExpectedStep::ExpectedRequest::closeClient : ExpectedStep::ExpectedRequest::closeBackend has failed [connect to the backend != close connection to backend]�[0;39;49m
terminate called recursively
unknown location(0): �[4;31;49mfatal error: in "test_dnsdisttcp_cc/test_IncomingConnectionOOOR_BackendNotOOOR": signal: SIGABRT (application abort requested)�[0;39;49m
test-dnsdisttcp_cc.cc(213): �[1;36;49mlast checkpoint�[0;39;49m

This is preceded by lots of these:

Error connecting to new server with address 192.0.2.1:53: connecting socket to 192.0.2.1:53: Network is unreachable

After having a quick look at the test code, it would appear (almost?) all network communication is mocked anyway. What is probably left is the routing lookup for 192.0.2.x, which would fail on a machine with no IPv4 connectivity.

It would be great if these bits could also be mocked away somehow.

Many thanks!

@zeha zeha added the dnsdist label May 13, 2021
@rgacogne
Copy link
Member

The Error connecting to new server with address 192.0.2. lines seem to come from test-dnsdistlbpolicies_cc.cc, perhaps we could get rid of them by setting connect=false in the ctor (untested). I'm not sure yet why the test-dnsdisttcp_cc.cc test fail, though.

@rgacogne rgacogne added this to the dnsdist-1.6.x milestone May 17, 2021
@rgacogne
Copy link
Member

Right, that fails because connect() is called by TCPIOHandler::tryConnect directly, and the mocked part is only called after that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants