aboutsummaryrefslogtreecommitdiff
path: root/src/test
Commit message (Collapse)AuthorAge
...
* | | Improve tor_split_lines unit testsEsteban Manchado Velázquez2012-03-08
| | | | | | | | | | | | | | | * Add some more test cases * Switch to test_assert et al
* | | Use test_streq in join_win_cmdline unit testsEsteban Manchado Velázquez2012-03-08
| | |
* | | Use test_eq et al in spawn_background unit testsEsteban Manchado Velázquez2012-03-08
| | |
* | | Use test_streq in format_helper_exit_status testsEsteban Manchado Velázquez2012-03-08
| | |
* | | Improve get_parent_directory unit testsEsteban Manchado Velázquez2012-03-08
| | | | | | | | | | | | | | | * Add more test cases to the get_parent_directory tests * Switch the parameter order so that the expected value is the first one
* | | Improve listdir unit testsEsteban Manchado Velázquez2012-03-08
| | |
* | | Improve a bit asprintf unit testsEsteban Manchado Velázquez2012-03-08
| | |
* | | Rewrite the find_str_at_start_of_line unit testsEsteban Manchado Velázquez2012-03-08
| | |
* | | Improve/extend strtok_r unit testsEsteban Manchado Velázquez2012-03-08
| | | | | | | | | | | | | | | | | | | | | * Add several failing tests (embedded in an "#if 0" block) for behaviour that doesn't match strtok_r * Add another, passing, more interesting test * Use test_eq_ptr(NULL, ...) instead of test_assert(NULL == ...)
* | | Improve tor_sscanf testsEsteban Manchado Velázquez2012-03-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Add many new test cases, tweak/improve existing ones, reorganize them a bit * Switch the parameters in all test_eq calls so the expected value is the first * Change all the "r = tor_sscanf(...);\ntest_eq(1, r)" to the more compact "test_eq(1, tor_sscanf(...))". It may be a tiny bit harder to find the tor_sscanf calls (it's the long lines anyway), but it saves a lot of lines, which should help readability.
* | | Improve test case for read_escaped_data unit testEsteban Manchado Velázquez2012-03-08
| | |
* | | Trivial readability changes in mmap unit testsEsteban Manchado Velázquez2012-03-08
| | |
* | | Clean up and improve gzip unit testsEsteban Manchado Velázquez2012-03-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Switch some test_eq parameters so the expected is always the first parameter * Drop some manual checks of compressed format magic numbers (they're pointless and they make the unit tests less readable and more fragile, considering we're already indirectly checking those magic numbers via the detect_compression_method function) * Add a couple of extra assertions
* | | Add/improve the rest of the strmisc testsEsteban Manchado Velázquez2012-03-08
| | |
* | | Improve tor_snprintf testsEsteban Manchado Velázquez2012-03-08
| | |
* | | Add/improve tests for str{,case}cmp{start,end}Esteban Manchado Velázquez2012-03-08
| | |
* | | Add more/better tests in test_util_strmiscEsteban Manchado Velázquez2012-03-08
| | |
* | | Trivial cosmetic fix in test commentsEsteban Manchado Velázquez2012-03-08
| | |
* | | Organize test_util_time in blocksEsteban Manchado Velázquez2012-03-08
| | | | | | | | | | | | | | | | | | * Separate the tests for different functions with a comment * Move some test init code further down, closer to where it was actually being used
* | | Add test for comments in the config parserEsteban Manchado Velázquez2012-03-08
| | |
* | | Remove duplicated macro definitionEsteban Manchado Velázquez2012-03-08
| | |
* | | Add test for broken hex parsingEsteban Manchado Velázquez2012-03-08
| | | | | | | | | | | | | | | | | | * The test currently fails, but it's commented out (with an "#if 0") * As a broken octal actually gives a parse error, it seems fair that this fails, too
* | | Improve config parser escaped content testsEsteban Manchado Velázquez2012-03-08
| | |
* | | Add tests for escaped content in configEsteban Manchado Velázquez2012-03-08
| | |
* | | Add quoted content tests for the config parserEsteban Manchado Velázquez2012-03-08
| | |
* | | Fix off-by-one error in test_util_make_environmentPatrick Mézard2012-02-20
| | |
* | | Merge branch 'bug5105-v2-squashed'Nick Mathewson2012-02-17
|\ \ \ | | | | | | | | | | | | | | | | Conflicts: src/or/transports.c
| * | | Add unit tests for easily tested, non-trivial utility functionsRobert Ransom2012-02-17
| |/ /
* | | Oops; there were a couple of typos in the upstream tinytestNick Mathewson2012-02-13
| | |
* | | Synchronize with upstream tinytest again: remove _identifiersNick Mathewson2012-02-13
| | |
* | | Synchronize with upstream tinytest.Nick Mathewson2012-02-13
|/ / | | | | | | | | | | The big change here is a patch (first added to Libevent by Ed Day) to make sure that the CreateProcess forked-test trick works even when the main test program is invoked without its .exe suffix.
* | Use the standard _WIN32, not the Torism MS_WINDOWS or deprecated WIN32Nick Mathewson2012-01-31
| | | | | | | | | | | | | | | | | | | | | | This commit is completely mechanical; I used this perl script to make it: #!/usr/bin/perl -w -i.bak -p if (/^\s*\#/) { s/MS_WINDOWS/_WIN32/g; s/\bWIN32\b/_WIN32/g; }
* | Rename nonconformant identifiers.Nick Mathewson2012-01-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes bug 4893. These changes are pure mechanical, and were generated with this perl script: /usr/bin/perl -w -i.bak -p s/crypto_pk_env_t/crypto_pk_t/g; s/crypto_dh_env_t/crypto_dh_t/g; s/crypto_cipher_env_t/crypto_cipher_t/g; s/crypto_digest_env_t/crypto_digest_t/g; s/aes_free_cipher/aes_cipher_free/g; s/crypto_free_cipher_env/crypto_cipher_free/g; s/crypto_free_digest_env/crypto_digest_free/g; s/crypto_free_pk_env/crypto_pk_free/g; s/_crypto_dh_env_get_dh/_crypto_dh_get_dh/g; s/_crypto_new_pk_env_rsa/_crypto_new_pk_from_rsa/g; s/_crypto_pk_env_get_evp_pkey/_crypto_pk_get_evp_pkey/g; s/_crypto_pk_env_get_rsa/_crypto_pk_get_rsa/g; s/crypto_new_cipher_env/crypto_cipher_new/g; s/crypto_new_digest_env/crypto_digest_new/g; s/crypto_new_digest256_env/crypto_digest256_new/g; s/crypto_new_pk_env/crypto_pk_new/g; s/crypto_create_crypto_env/crypto_cipher_new/g; s/connection_create_listener/connection_listener_new/g; s/smartlist_create/smartlist_new/g; s/transport_create/transport_new/g;
* | Merge branch 'feature3457-v4-nm-squashed'Nick Mathewson2012-01-11
|\ \ | | | | | | | | | | | | Conflicts: src/or/rendclient.c
| * | Use spaceless ISO8601 time format, not sec,usec.Nick Mathewson2012-01-11
| | |
* | | Test for broken counter-mode at runtimeNick Mathewson2012-01-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To solve bug 4779, we want to avoid OpenSSL 1.0.0's counter mode. But Fedora (and maybe others) lie about the actual OpenSSL version, so we can't trust the header to tell us if it's safe. Instead, let's do a run-time test to see whether it's safe, and if not, use our built-in version. fermenthor contributed a pretty essential fixup to this patch. Thanks!
* | | Merge branch 'maint-0.2.2'Roger Dingledine2012-01-08
|\ \ \ | | |/ | |/|
| * | tell me who votes are actually for, not just where they're fromRoger Dingledine2012-01-08
| | |
* | | Use getifaddrs, not connect+getsockname, to find our addressNick Mathewson2011-12-28
| | | | | | | | | | | | | | | This resolves bug1827, and lets us avoid freaking people out. Later, we can use it to get a complete list of our interfaces.
* | | Tweak the haiku-support patchesNick Mathewson2011-12-19
| | |
* | | -lm should not be hardcoded.Martin Hebnes Pedersen2011-12-19
| | | | | | | | | | | | | | | | | | On some platforms (Haiku/BeOS) libm lives in libcore. Also added 'network' to the list of libraries to search for connect().
* | | test_util_spawn_background_ok: fix expectationPeter Palfrader2011-12-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | test_util_spawn_background_ok() hardcoded the expected value for ENOENT to 2. This isn't portable as error numbers are platform specific, and particularly the hurd has ENOENT at 0x40000002. Construct expected string at runtime, using the correct value for ENOENT (closes: #4733).
* | | Appease check-spacesSebastian Hahn2011-12-02
| | |
* | | Add an initializer to appease older gccNick Mathewson2011-11-30
| | |
* | | Merge branch 'bug933_nm_rebased_v2'Nick Mathewson2011-11-30
|\ \ \ | | | | | | | | | | | | | | | | Conflicts: src/test/test.c
| * | | No new "LEGACY" tests allowed.Nick Mathewson2011-11-30
| | | |
| * | | Fix compilation: get_options() now returns constNick Mathewson2011-11-30
| | | |
| * | | Address nickm's comments at ↵Robert Hogan2011-11-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://trac.torproject.org/projects/tor/ticket/933#comment:8 1. Only allow '*.' in MapAddress expressions. Ignore '*ample.com' and '.example.com'. This has resulted in a slight refactoring of config_register_addressmaps. 2. Add some more detail to the man page entry for AddressMap. 3. Fix initialization of a pointer to NULL rather than 0. 4. Update the unit tests to cater for the changes in 1 and test more explicitly for recursive mapping.
| * | | Address nickm's comments at ↵Robert Hogan2011-11-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://trac.torproject.org/projects/tor/ticket/933#comment:4 1. Implement the following mapping rules: MapAddress a.b.c d.e.f # This is what we have now MapAddress .a.b.c d.e.f # Replaces any address ending with .a.b.c with d.e.f MapAddress .a.b.c .d.e.f # Replaces the .a.b.c at the end of any addr with .d.e.f (Note that 'a.b.c .d.e.f' is invalid, and will be rejected.) 2. Add tests for the new rules. 3. Allow proper wildcard annotation, i.e. '*.d.e' '.d.e' will still work. 4. Update addressmap_entry_t with an is_wildcard member.
| * | | bug933 - Match against super-domains in MapAddressRobert Hogan2011-11-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow MapAddress to handle directives such as: MapAddress .torproject.org .torserver.exit MapAddress .org 1.1.1.1 Add tests for addressmap_rewrite.