Tests and TCP ports
ludo at gnu.org
Tue Feb 7 00:43:12 CET 2012
Sorry for the late reply.
Nikos Mavrogiannopoulos <nmav at gnutls.org> skribis:
> On 01/31/2012 05:27 PM, Ludovic Courtès wrote:
>> Some of the tests work by connecting to localhost on some TCP port,
>> and then exchanging over that connection. These tests typically fail
>> when the port cannot be listened, like: make: Entering directory
>> Checking various DSA key sizes Checking DSA-1024 with TLS 1.0 ***
>> Fatal error: A TLS fatal alert has been received. *** Handshake has
>> failed GnuTLS error: A TLS fatal alert has been received. Failure:
>> Failed connection to a server with DSA 1024 key and TLS 1.0! FAIL:
>> testdsa This is particularly a problem on Hydra where several builds
>> may be running in parallel, and trying to access the same TCP port.
>> Possible solutions include:
>> - Using Unix domain sockets, though the path name limitation doesn’t
>> play well with the long $builddir that Nix uses (as above.)
> The sockets could be made relative to the directory, thus such a
> limitation might not be a problem.
Yes. Actually, it’s even easier to use socket pairs, as currently done
> I've thought of moving the tests in a higher level language quite few
> times. Guile(with scheme) could have been a candidate but I have given
> up any attempt learning scheme or lisp.
Oh well. I can only encourage you to look at (say)
guile/tests/openpgp-auth.scm. Hopefully it’s fairly easy to understand,
as it’s essentially a direct translation of the C code.
I could rewrite ‘testdsa’ in Scheme but I guess it’d be pointless to do
> Btw. If guile adds support for lua, would the binding for gnutls work,
> or it would be a totally different story?
Yes, but don’t hold your breath.
More information about the Gnutls-devel