I am trying to execute tor's tests from git (63a90f2) on tails but the socketpair_ersatz test keeps failing
util/socketpair: [forking] OK util/socketpair_ersatz: [forking]
FAIL src/test/test_util.c:4212: assert(0 OP_EQ tor_socketpair_fn(family, SOCK_STREAM, 0, fds)): 0 vs -111 [socketpair_ersatz FAILED] util/max_mem: OK
The failure seems to be in connect(): https://gitweb.torproject.org/tor.git/tree/src/common/compat.c#n1492
armadev said on IRC that he/she could make the tests pass, so I wonder if there might be some specific behavior on tails that prevents the test from passing successfully.
Is there a suggested workaround? Or perhaps is it possible to easily ignore this one test?
On Mon, 27 Apr 2015 05:49:37 +0000 warms0x warms0x@riseup.net wrote:
I am trying to execute tor's tests from git (63a90f2) on tails but the socketpair_ersatz test keeps failing
util/socketpair: [forking] OK util/socketpair_ersatz: [forking]
FAIL src/test/test_util.c:4212: assert(0 OP_EQ tor_socketpair_fn(family, SOCK_STREAM, 0, fds)): 0 vs -111 [socketpair_ersatz FAILED] util/max_mem: OK
The failure seems to be in connect(): https://gitweb.torproject.org/tor.git/tree/src/common/compat.c#n1492
Considering that the error returned is -ECONNREFUSED, this is a reasonable assumption, yes.
armadev said on IRC that he/she could make the tests pass, so I wonder if there might be some specific behavior on tails that prevents the test from passing successfully.
On a normal system, the tests pass fine, and it would be a bug if they didn't.
Did you look at the `tor_ersatz_socketpair()` code at all? It should be obvious why this is failing on Tails.
Is there a suggested workaround? Or perhaps is it possible to easily ignore this one test?
Suggested workaround(s):
* Don't use Tails, the tests are written under the assumption that they are running on a normal system that doesn't have a facist firewall preventing connections to things listening on the loop back interface.
* Patch the test code to disable that test.
* Maybe use torsocks with "AllowOutboundLocalhost", if the version included in Tails supports the option (I'd hope so, I added support for that feature to torsocks specifically for them). Other tests may or may not fail if you chose to go down this path.
Regards,
Yawning Angel wrote (27 Apr 2015 10:03:48 GMT) :
- Maybe use torsocks with "AllowOutboundLocalhost", if the version included in Tails supports the option (I'd hope so, I added support for that feature to torsocks specifically for them).
Tails will use this option once it's part of a torsocks release (and then makes its way into wheezy-backports-sloppy).
Thanks for adding it, by the way :)
Cheers, -- intrigeri