aboutsummaryrefslogtreecommitdiff
path: root/src/test
AgeCommit message (Collapse)Author
2016-06-11Use autoconf, not gcc version, to decide which warnings we haveNick Mathewson
This gives more accurate results under Clang, which can only help us detect more warnings in more places. Fixes bug 19216; bugfix on 0.2.0.1-alpha
2016-06-11Enable -Woverlength-strings for GCC>=4.6 on MOST of the code.Nick Mathewson
IMO it's fine for us to make exceptions to this rule in the unit tests, but not in the code at large.
2016-06-11Use -Wdouble-promotion in GCC >= 4.6Nick Mathewson
This warning triggers on silently promoting a float to a double. In our code, it's just a sign that somebody used a float by mistake, since we always prefer double.
2016-06-11Add -Wfloat-conversion for GCC >= 4.9Nick Mathewson
This caught quite a few minor issues in our unit tests and elsewhere in our code.
2016-06-11Enable -Wnull-dereference (GCC >=6.1), and fix the easy casesNick Mathewson
This warning, IIUC, means that the compiler doesn't like it when it sees a NULL check _after_ we've already dereferenced the variable. In such cases, it considers itself free to eliminate the NULL check. There are a couple of tricky cases: One was the case related to the fact that tor_addr_to_in6() can return NULL if it gets a non-AF_INET6 address. The fix was to create a variant which asserts on the address type, and never returns NULL.
2016-05-25Merge branch 'maint-0.2.8'Nick Mathewson
2016-05-25Merge branch 'bug18668_028' into maint-0.2.8Nick Mathewson
2016-05-25Merge branch 'maint-0.2.8'Nick Mathewson
2016-05-24Make sure that libscrypt_scrypt actually exists before using it.Nick Mathewson
Previously, if the header was present, we'd proceed even if the function wasn't there. Easy fix for bug 19161. A better fix would involve trying harder to find libscrypt_scrypt.
2016-05-20Prevent ASAN from registering a SIGSEGV handlercypherpunks
AddressSanitizer's (ASAN) SIGSEGV handler overrides the backtrace handler and prevents it from printing its backtrace. The output of ASAN is different from what 'bt_test.py' expects and causes backtrace test failures. The 'allow_user_segv_handler' option allows applications to set their own SIGSEGV handler but is not supported by older GCC versions. These older GCC versions do support the 'handle_segv' which prevents ASAN from setting its SIGSEGV handler.
2016-05-19Remove round_int64_to_next_multiple_of: It is now unused.Nick Mathewson
2016-05-19Merge branch 'maint-0.2.8'Nick Mathewson
2016-05-19Merge remote-tracking branch 'teor/fix18809-warnings' into maint-0.2.8Nick Mathewson
2016-05-19Merge branch 'maint-0.2.8'Nick Mathewson
2016-05-19Merge remote-tracking branch 'public/bug19073' into maint-0.2.8Nick Mathewson
2016-05-19Fix unused-but-set-variable warnings in the connection unit teststeor (Tim Wilson-Brown)
No behaviour change - just remove the variables
2016-05-19Merge branch 'maint-0.2.8'Nick Mathewson
2016-05-19Fix a compilation error in test_dir.cNick Mathewson
2016-05-19Merge branch 'maint-0.2.8'Nick Mathewson
2016-05-19Merge branch 'bug18809_028_squashed' into maint-0.2.8Nick Mathewson
2016-05-19Add unit tests for networkstatus_consensus_is_bootstrappingteor (Tim Wilson-Brown)
2016-05-19Restore and improve download schedule unit teststeor (Tim Wilson-Brown)
2016-05-19Update unit tests for multiple bootstrap connectionsteor (Tim Wilson-Brown)
2016-05-18Fix a bad sizeof() in test_crypto.c. Harmless. Spotted by coverity.Nick Mathewson
2016-05-17Remove duplicate siging_key_cert fields.Nick Mathewson
With the fix for #17150, I added a duplicate certificate here. Here I remove the original location in 0.2.8. (I wouldn't want to do that in 027, due to the amount of authority-voting-related code drift.) Closes 19073.
2016-05-17Merge remote-tracking branch 'teor/bug18963-remember-v2'Nick Mathewson
2016-05-17Merge branch 'maint-0.2.8'Nick Mathewson
2016-05-16Initialize networking _before_ initializing libevent in the testsNick Mathewson
This prevents WSANOTINITIALISED errors and fixes bug 18668. Bugfix on 0.2.8.1-alpha -- 1bac468882fd732460d8a25735131 specifically.
2016-05-16Fix memory leak in test_crypto_aes_ctr_testvecNick Mathewson
2016-05-16Windows lacks truncate(3).Nick Mathewson
Fix the new crypto tests, which used truncate(3).
2016-05-16Merge branch 'crypto_unit_tests_v2_squashed'Nick Mathewson
2016-05-16Cover all our DH code, and/or mark it unreachable.Nick Mathewson
2016-05-16At long last, unit tests for degenerate DH public keys.Nick Mathewson
Apparently, we detect and reject them correctly. Aren't you glad?
2016-05-16Slight improvements to DH coverage.Nick Mathewson
2016-05-16Improve test coverage of our strongest-rng code.Nick Mathewson
2016-05-16Test coverage on ed25519 load/store functions.Nick Mathewson
2016-05-16Mark unreachable lines in crypto_curve25519.cNick Mathewson
Also, resolve a bug in test_ntor_cl.c
2016-05-16HKDF-SHA256 test vectors from RFC5869Nick Mathewson
2016-05-12Run tor_sscanf test in subprocess, in hopes of coaxing more info from jenkinsNick Mathewson
2016-05-12Fix inconsistent tab/space mixing in include.am files.Nick Mathewson
This is a whitespace only, cosmetic fix. There is still some inconsistency between lists, but less inconsistency inside individual lists.
2016-05-12Merge branch 'ftrapv_v3'Nick Mathewson
There were some conflicts here, and some breakage to fix concerning library link order in newer targets.
2016-05-12Document why we build memwipe that way.Nick Mathewson
2016-05-12Do not apply bugtrapping flags to test-memwipe, since testing memwipe ↵Nick Mathewson
requires bugs. Fixes bug 18901.
2016-05-12Refactor out u64_dbl_tNick Mathewson
This type saved a tiny amount of allocation, but not enough to be worth keeping. (This is in preparation for moving choose_array_element_by_weight)
2016-05-12Add -ftrapv to gcc-hardening ... mostly!Nick Mathewson
We know there are overflows in curve25519-donna-c32, so we'll have to have that one be fwrapv. Only apply the asan, ubsan, and trapv options to the code that does not need to run in constant time. Those options introduce branches to the code they instrument. (These introduced branches should never actually be taken, so it might _still_ be constant time after all, but branch predictors are complicated enough that I'm not really confident here. Let's aim for safety.) Closes 17983.
2016-05-11Fetch certificates from the same directory as previous certificatesteor (Tim Wilson-Brown)
Improves the fix to #18963.
2016-05-11Merge branch 'pubsub_squashed'Nick Mathewson
2016-05-11Basic work on a publish/subscribe abstractionNick Mathewson
The goal here is to provide a way to decouple pieces of the code that want to learn "when something happens" from those that realize that it has happened. The implementation here consists of a generic backend, plus a set of macros to define and implement a set of type-safe frontends.
2016-05-09Merge branch 'feature15588_squashed'Nick Mathewson
2016-05-09fix typos/etc before i go nuts on #18809Roger Dingledine