summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Speed up event receipt testscontroller_eventSebastian Hahn2015-03-21
| | | | | | | Use CONF_CHANGED instead of BW events, they arrive much quicker and don't require us to wait so long. Execution time for the controller tests go from 1m25.348s to 0m6.053s when selecting all connection configurations.
* Print the stacktraces when running tests failedSebastian Hahn2015-03-21
|
* Add Bulb to list of other controllersDamian Johnson2015-03-20
| | | | Library Yawning is working on for controllers in Go.
* Extrainfo hidden service fields can be negativeDamian Johnson2015-03-16
| | | | Checked with Karsten on #15276.
* Support for extrainfo descriptor hidden service statsDamian Johnson2015-03-15
| | | | | | Adding support for the new extrainfo descriptor stats for hidden services... https://gitweb.torproject.org/torspec.git/commit/?id=ddb630d
* Adding HS_DESC_CONTENT to EventTypeDamian Johnson2015-03-15
| | | | Issue caught by DonnchaC.
* Closed controller could potentially leave lingering notification threadsDamian Johnson2015-03-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Despite having a notion of a 'daemon thread', python's behavior around it is remarkably poor. The point of a daemon is that it can be safely reaped during interpreter shutdown, but if one *actually* exists python screams like you're kicking it on the balls. *sigh* So anyway, it's important to be sure all threads are joined on before shutting down. Generally Stem is good about this but forgot that state change notifications spawn their own untracked daemons. As a result if you've registered any state listeners you'll have a good chance of a stacktrace. What happens is as follows... * You call close() on the controller. * Closing sends a notification in a new thread to your listener to say that it's closing. * Before that thread finishes the interpreter shuts down and wails like a baby. As such, we now track these daemons and close() joins on them before returning. This was caught thanks to frequent arm stacktraces like... Exception in thread Closed notification (most likely raised during interpreter shutdown): Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner File "/usr/lib/python2.7/threading.py", line 504, in run File "/home/atagar/Desktop/seth/seth/header_panel.py", line 372, in reset_listener File "/home/atagar/Desktop/seth/seth/header_panel.py", line 376, in _update File "/home/atagar/Desktop/seth/seth/header_panel.py", line 403, in get_sampling File "/home/atagar/Desktop/seth/stem/control.py", line 392, in wrapped File "/home/atagar/Desktop/seth/stem/control.py", line 1445, in get_pid File "/home/atagar/Desktop/seth/stem/util/system.py", line 328, in pid_by_name File "/home/atagar/Desktop/seth/stem/util/system.py", line 930, in call File "/usr/lib/python2.7/subprocess.py", line 754, in communicate File "/usr/lib/python2.7/subprocess.py", line 1312, in _communicate File "/usr/lib/python2.7/subprocess.py", line 1373, in _communicate_with_poll <type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'POLLOUT'
* Support for HS_DESC_CONTENT eventsDamian Johnson2015-03-14
| | | | | | Usually I don't had support before an event is in tor, but HS_DESC_CONTENT is tantalizingly close and I want to help #14847 along. This helped highlight a couple issues we should address.
* Tor's --quiet argument no longer combines with --verify-configDamian Johnson2015-03-14
| | | | | As per #14994 tor's handling of '--quiet' changed, breaking an integ test. Also it now provides content on stderr so suppressing that.
* Error during hs descriptor decryption failures with python3Damian Johnson2015-03-11
| | | | | | | Oops, another spot where we need to do slice rather than indexing (since the later provides an int in python3). Caught by cyberpunks on... https://trac.torproject.org/projects/tor/ticket/15004#comment:18
* Python3 support for hidden service descriptor decryptionDamian Johnson2015-03-10
| | | | | | | | | | | Didn't have pycrypto for python3 so this test was being skipped for me. There were two issues... * we need to normalize the cookie to be bytes * indexing into bytes provides an int in python3, so we need to use an equivalent slice instead Caught by toralf (on irc) and cypherpunks (on #15004).
* Move run_tests.py argument handling to its own fileDamian Johnson2015-03-09
| | | | | | This is a pattern I like that we used for our interpreter. Our run_tests.py was getting a bit long, and this is funtionality that really does belong in its own file.
* AttributeError exception for catching non existing methodsCristóbal2015-03-07
|
* Support for encrypted hidden service descriptor introduction-pointsDamian Johnson2015-03-07
| | | | | Supporting basic and stealth auth for hidden service descriptor introduction-points. Based on donncha's example script on #15004.
* Mention Nathan Willis' LWN articleDamian Johnson2015-03-06
| | | | | | | | Nathan Willis wrote a very nice description of Stem's 1.3 release. Lets point visitors their way! This also includes release dates with the version number. Looks a tad batter this way.
* Support for consensus' new package attributeDamian Johnson2015-03-05
| | | | | | | | | | | | Support for the newly added pacakge field... https://gitweb.torproject.org/torspec.git/commit/?id=ab6453476066fd1bf5c8cb577863c0cdd5079e0f These don't appear to be in the actual consensus yet, but likely will soon. I still have some questions about this field but this parsing apprach should work for now. https://trac.torproject.org/projects/tor/ticket/15157
* Allow just a single test to be runDamian Johnson2015-03-03
|\ | | | | | | | | | | | | | | | | | | | | | | Our run_tests.py's '--test' argument can now be giving a single test to just run that. For example... ./run_tests.py --unit --test test.unit.util.conf.test_parse_enum_csv -v The 'test.unit.' or 'test.integ.' prefix is optional. Initial patch thanks to civ! https://trac.torproject.org/projects/tor/ticket/14944
| * State if the test doesn't existDamian Johnson2015-03-03
| | | | | | | | | | | | | | | | | | Initially I planned for _get_tests() to detect if the test exists, but on reflection it's better if we surface it in our output... util.conf.test_parse_enum_csvv... no such test This way the user will be informed of the error.
| * Didn't account for test modules citing the classDamian Johnson2015-03-03
| | | | | | | | | | | | | | | | | | Oops! Didn't catch that the test modules include the class. For example... test.unit.util.conf.TestConf.test_parse_enum_csv civ's original patch did, though he surfaced it in our output which caused our test names to be a lot longer. Changing us back so we hide it.
| * No need for a 'if suite' checkDamian Johnson2015-03-03
| | | | | | | | | | We can just return prematurely. No need to hide everything else behind a conditional.
| * Simplifying _get_tests()Damian Johnson2015-03-03
| | | | | | | | | | | | | | | | | | | | | | | | Our module_prefixes fall into two camps... * It's... well, a module prefix. It'll be a prefix of our import name. * It's an exact match for a test. Our import name will be a prefix of it. No need to strip off the last component and try again. We can do this in one pass. One thing I noticed though is that we don't check to see if tests exist. We rely on a try/catch for that. Might be able to wrap it into this helper - we'll see.
| * Rename module_substring to module_prefixDamian Johnson2015-03-03
| | | | | | | | | | | | With the new behavior it's effectively doing a prefix check rather than substring (since it adds 'test.unit.' or 'test.integ.'). This is fine. Just renaming things to be accurate.
| * Addings support for testing single methodsCristóbal2015-03-03
|/
* Clear orphaned pyc files for python3Damian Johnson2015-03-02
| | | | | | | Task to ensure we don't test against bytecode for deleted or renamed files. Initial patch thanks to dumindux. https://trac.torproject.org/projects/tor/ticket/14628
* Include release dates on the changelogDamian Johnson2015-03-01
|
* Drop ATTRIBUTES and PARSER_FOR_LINE from api docsDamian Johnson2015-02-28
| | | | | These are internal constants for parsing. They're big blobs in our generated api docs and unhelpful.
* Missing API doc resourceDamian Johnson2015-02-28
| | | | Oops, forgot to add this new file.
* Hidden service descriptor supportDamian Johnson2015-02-28
|\ | | | | | | | | | | | | | | | | | | | | Support for parsing hidden service descriptors, as defined in the rend-spec... https://trac.torproject.org/projects/tor/ticket/15004 https://gitweb.torproject.org/torspec.git/tree/rend-spec.txt#n222 This doesn't yet support encrypted introduction-points, but otherwise is a complete parser. Like server descriptors, this validates our signature's integrity if pycrypto is available.
| * Include hidden service descriptors in our API docsDamian Johnson2015-02-28
| | | | | | | | | | Adding our new hidden service desriptors to the generated API docs, in addition to a changelog entry and few other improvements.
| * Verifying hidden service descriptor signaturesDamian Johnson2015-02-28
| | | | | | | | | | This is identical to how server descriptors are validated, so taking this opportunity to tidy that up a bit in the process.
| * Encrypted introduction-points test dataDamian Johnson2015-02-28
| | | | | | | | | | | | | | Including examples of hidden service descriptors with encrypted introduction-points fields from #15004. We don't yet have support for decrypting the fields, but at least we can assert that we raise the expected exception when it's encrypted.
| * Unit tests for hidden service descriptor edge casesDamian Johnson2015-02-28
| | | | | | | | Expanding its unit test coverage and few fixes for isssues it surfaced.
| * get_hidden_service_descriptor() helper for testing themDamian Johnson2015-02-26
| | | | | | | | | | | | Adding a helper for generating hidden service descriptors. This is done for all of our descriptor types, and helps us test individual fields. Presently just checking that the minimal descriptor it generates is valid.
| * Use integer hidden service versionsDamian Johnson2015-02-26
| | | | | | | | Clarification courtesy of #15010.
| * Check that hidden service introductory points are IPv4Damian Johnson2015-02-26
| | | | | | | | Got clarification from Nick on #15010.
| * Support hidden service introduction-pointsDamian Johnson2015-02-26
| | | | | | | | | | | | | | | | | | This is a very unusual attribute in that it's a base64 encoded blob of two subdocuments: the first optional authentication data, followed by a list of subdocuments. Parsing the authentication data when reading the field, but leaving the second pass to a method since it may optionally be encrypted.
| * Initial hidden service descriptor parserDamian Johnson2015-02-26
|/ | | | | | | | | | | | | Quick initial parser for hidden service descriptors... https://trac.torproject.org/projects/tor/ticket/15004 Things left to do are... * Issue tickets for some of these 'TODO' notes. * Support the introduction-points field. It's a bit special. * Unit tests for malformed content. * Validate that the signature matches the descriptor content.
* Ignore four space indentation errors in comments.cypherpunks2015-02-26
|
* Show correct line numbers in the output of static checks.cypherpunks2015-02-26
|
* Support CIRC event's new SOCKS_USERNAME and SOCKS_PASSWORD attributesDamian Johnson2015-02-23
| | | | Adding support for the new controller attributes discussed in #14555.
* When launching tor avoid writing a torrc to disk if ableDamian Johnson2015-02-22
| | | | | | | Tor now supports providing the torrc via stdin, so taking advantage of that when we can... https://trac.torproject.org/projects/tor/ticket/13865
* Check version when testing ability to pass a config in via the stdinDamian Johnson2015-02-22
| | | | | | | The feature this test exercises was added in 0.2.6.3-alpha... https://trac.torproject.org/projects/tor/ticket/14961 https://trac.torproject.org/projects/tor/ticket/13865
* Unrecognized arguments didn't suggest using --helpDamian Johnson2015-02-21
| | | | | Oops, didn't mean to bypass the catch here. Switching to getopt.GetoptError so we'll include that in the message.
* Use PROXYTYPE_SOCKS5_HOSTNAME for tutorial exampleDamian Johnson2015-02-21
| | | | | | | | Michael points out that we leaked our DNS requests in this example. By using PROXYTYPE_SOCKS5_HOSTNAME which was added to pycurl v7.19.5.1 on 2015-01-06 uses the socks proxy for them... https://github.com/pycurl/pycurl/issues/206
* Decorators for skipping testsDamian Johnson2015-02-21
|\ | | | | | | | | | | | | | | Using decorators like @require_controller for skipping our tests rather than helper functions. This is a perfect use case for decorators, as it lets the test content just be focused on what it should do. https://trac.torproject.org/projects/tor/ticket/14945
| * @only_run_once decoratorDamian Johnson2015-02-21
| |
| * @require_online decoratorDamian Johnson2015-02-21
| |
| * @require_version decoratorDamian Johnson2015-02-21
| |
| * @require_controller decoratorDamian Johnson2015-02-21
|/ | | | Replacing our require_control() function with a decorator. Yay, nicer code!
* Updating Faravahar's addressDamian Johnson2015-02-21
| | | | | | | | | | | | | | | | Updating Faravahar's address. It's presently still listening on the old address but ready for us to move. On a side note test I added to detect things like this worked like a charm... ====================================================================== FAIL: test_authorities_are_up_to_date ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/atagar/Desktop/stem/test/integ/descriptor/remote.py", line 43, in test_authorities_are_up_to_date self.fail("%s has %s %s, but we expected %s" % (auth.nickname, attr, getattr(auth, attr), getattr(stem_auth, attr))) AssertionError: Faravahar has address 154.35.175.225, but we expected 154.35.32.5 ----------------------------------------------------------------------