#3837 closed defect (fixed)

integration/test_tor.py is failing

Reported by: exarkun Owned by: exarkun
Priority: normal Milestone: undecided
Component: unknown Version: n/a
Keywords: Cc:
Launchpad Bug:

Description

There was a new release of tor today. The integration tests now fail like:

Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/tmp/tahoeUsgTe1/chutney/lib/chutney/TorNet.py", line 2737, in <module>
    sys.exit(main())
  File "/tmp/tahoeUsgTe1/chutney/lib/chutney/TorNet.py", line 2731, in main
    result = runConfigFile(args['action'], f.read())
  File "/tmp/tahoeUsgTe1/chutney/lib/chutney/TorNet.py", line 2711, in runConfigFile
    return getattr(network, verb)()
  File "/tmp/tahoeUsgTe1/chutney/lib/chutney/TorNet.py", line 2325, in configure
    b.config(network)
  File "/tmp/tahoeUsgTe1/chutney/lib/chutney/TorNet.py", line 693, in config
    self._createTorrcFile()
  File "/tmp/tahoeUsgTe1/chutney/lib/chutney/TorNet.py", line 630, in _createTorrcFile
    tor_version = get_tor_version(tor)
  File "/tmp/tahoeUsgTe1/chutney/lib/chutney/Util.py", line 14, in memoized_fn
    result = memory[key] = fn(*args, **kwargs)
  File "/tmp/tahoeUsgTe1/chutney/lib/chutney/TorNet.py", line 355, in get_tor_version
    assert re.match(r'^[-+.() A-Za-z0-9]+$', tor_version)
AssertionError

Change History (2)

comment:1 Changed at 2021-11-03T14:19:37Z by exarkun

Older versions of Tor had this behavior:

$ tor --version
Tor version 0.3.5.7.

The version released yesterday has this behavior:

$ tor --version
Tor 0.4.6.8.
Tor is running on Linux with Lib...Glibc 2.24 as libc.
Tor compiled with GCC 6.3.0

Thanks for the extra info ... though I didn't ask for it.

Chutney's regexp gets angry about this extra information and explodes. Since we're using an ancient revision of Chutney - the last before they dropped Python 2 supported - it's not straightforward to get this fixed in Chutney (Chutney doesn't do releases, it's just a git repo you can clone; there is no "last Py2 supporting release" we could contribute fixes to).

Since we don't anticipate supporting Python 2 for very much longer I'm not inclined to spend a lot more time trying to find a way to keep the Tor integration tests running on Python 2.

We're running them on Python 3 now, maybe that will be enough to keep things generally working on Python 2 for the short period of time we continue to support it.

Thus, I'm putting up a PR that skips the Tor integration tests on Python 2.

comment:2 Changed at 2021-11-03T16:24:31Z by GitHub <noreply@…>

  • Resolution set to fixed
  • Status changed from new to closed

In f5fcbeb3/trunk:

Merge pull request #1157 from tahoe-lafs/3837.tor-integration-tests

Disable the Tor integration tests on Python 2

Fixes: ticket:3837

Note: See TracTickets for help on using tickets.