Failing DNS test(s) in OTP:s own test suite

Good morning. I’m trying to add basic support for the DNSSEC RR types to OTP’s built-in DNS code, to enable things like writing a validating resolver without having to re-implement all of basic DNS. That part is going pretty well.

The part that’s not going well is that one if the existing tests in inet_res_SUITE keeps failing for me, even when if I check out a pristine copy of the OTP-28.0.1 tag and run the tests there. The specific test that fails is tsig_client, and it fails because it generates a signature that the name server started by the test suite thinks is invalid:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
inet_res_SUITE:'-tsig_client/1-fun-1-' failed on line 1517
Reason: {badmatch,{error,{notauth,badsig}}}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

I’m at a bit of a loss for how to proceed here. I assume that this test passed when Erlang was released. So maybe there is something wrong with my setup? I’m running the tests on macOS, having installed the name server (knotd) from Homebrew (and then made sure the test code could find it). But I get the same failure in Github Actions (for my own branch, not the tagged release), which should be running the exact environment specified by the OTP team.

Any suggestions?

1 Like

After looking closer, it turns out the test code uses a different TSIG key name than the corresponding name server configuration does. Which explains the failure just fine, the client is essentially trying to use a key that the server doesn’t have. Fixing this tiny issue makes the whole test suite pass just fine. So that’s good.

What’s still confusing me is that it looks in git like this problem has been there for two years, and several Erlang releases. How is that possible?

We also just found this issue and are working on it.

The reason it hasn’t been noticed is that when accepting this feature, we didn’t notice that the test case does not verify that the requested operation (a zone transfer) succeeds, only that it has a correct TSIG signature. And up to now the test case DNS server that is used (Knot) has replied with an error reply that has a correct TSIG signature, which satisfied the test case. But it seems new (now emerging) versions of Knot doesn’t TSIG sign that error reply, and thus the test case has started to fail. But it has probably never tested the right thing; that all segments of the zone transfer are correctly TSIG signed.

That makes sense. I’ll wait with creating my own PR until this has been fixed. Thanks for the reply!

1 Like

The TSIG test case PR has now been merged to ‘maint’ and ‘master’