I found a minor bug in
/test/integ/control/controller.py
def test_enable_feature
If networking is enabled but not online, then data
like this can be in orconn_output
orconn_output == '$590A7A707B0FAFEF93F57FF061303D4415A13045 LAUNCHED'
This causes the regular expression to fail on line 346
When properly offline the test is skipped as orconn_output is a blank string
and when fully online the string is '$C4C7BF6724E2AA980E4664C04BC264C4AC7D0627~Anonymous CONNECTED\n ...'
which matches the regular expression
One way to fix this would be to only apply the regular expression if the 2nd part of the orconn_output is CONNECTED.
And add a separate regular expression for the LAUNCHED status, and possibly for any other possible strings?
I encountered this when running in a virtual machine without an internet connection.
Trac: Username: eoinof
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items 0
Show closed items
No child items are currently assigned. Use child items to break down this issue into smaller parts.
Linked items 0
Link issues together to show that they're related.
Learn more.
Great catch, Eoin! This looks like it may be a tor bug. Could you please start tor in your VM with an open control port and try the following?
atagar@morrigan:~/Desktop/stem$ telnet localhost 9051Trying 127.0.0.1...Connected to localhost.Escape character is '^]'.AUTHENTICATE250 OKUSEFEATURE VERBOSE_NAMES250 OKGETINFO version250-version=0.2.1.30250 OKGETINFO orconn-status250+orconn-status=$FF70FEE26E41E0CD582C4348E78F7CACE393B299=Zwiebelschale CONNECTED$7610BBD3F5BB67284EEE8476721AE6109DC29BEA=chaoscomputerclub3 CONNECTED$9E4F56839C06738DA4B806068854C06780EFBD18=Amunet5 CONNECTED$071C2D9D0E03D75FF30DCCA850BB29CA4A4BB383=CzechMix CONNECTED$5D0034A368E0ABAF663D21847E1C9B6CFA09752A~Karlstad CONNECTED$4A0CCD2DDC7995083D73F5D667100C8A5831F16D=Tonga LAUNCHED.250 OK
If you're running Tor verion 0.1.2.2 or later and get something like "$590A7A707B0FAFEF93F57FF061303D4415A13045 LAUNCHED" then that's a tor bug since it should provide a 'LongName' rather than 'ServerID'.
I managed to reproduce the problem, though it's a pretty unusual
situation so maybe it's not a bug?
I remembered that I had been deleting some files so I checked what ones
had been recently replaced.
I deleted the contents of /stem/test/data and then ran the integ tests while not
connected to the internet
This was how the test failed.
FAIL: test_enable_feature----------------------------------------------------------------------Traceback: File "/home/eoin/stem/test/integ/control/controller.py", line 346, in test_enable_feature self.assertTrue(re.match("\$[0-9a-fA-F]{40}[~=].*", controller.get_info('orconn-status').split()[0]))AssertionError: None is not true
I then started tor using the newly created config file /stem/test/data/torrc
This is what I see in telnet
eoin@eoin-VirtualBox:~/stem$ telnet localhost 1111Trying 127.0.0.1...Connected to localhost.Escape character is '^]'.AUTHENTICATE250 OKUSEFEATURE VERBOSE_NAMES250 OKGETINFO version250-version=0.2.2.35 (git-73ff13ab3cc9570d)250 OKGETINFO orconn-status250-orconn-status=$F397038ADC51336135E7B80BD99CA3844360292B LAUNCHED250 OKGETINFO orconn-status250-orconn-status=250 OK
Nick: when you're done with this ticket please reassign it back to the stem component, since I'll probably want to add an assertion in the tests for this
Trac: Summary: Minor bug in control test to 'GETINFO orconn-status' unexpectedly providing ServerID rather than LongName