summaryrefslogtreecommitdiff
path: root/src/test
AgeCommit message (Collapse)Author
2018-10-17Log more info for duplicate ed25519 IDsTaylor Yu
Occasionally, key pinning doesn't catch a relay that shares an ed25519 ID with another relay. Log the identity fingerprints and the shared ed25519 ID when this happens, instead of making a BUG() warning. Fixes bug 27800; bugfix on 0.3.2.1-alpha.
2018-10-16Merge branch 'maint-0.3.4'Nick Mathewson
2018-10-16test: Update approx_time before the test startsDavid Goulet
This way we have the same time source when the IP is created and tested later. Fixes #27810 Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-10-14Merge branch 'bug27772_squashed'Nick Mathewson
2018-10-14Fix various GCC LTO warnings in the unit tests.Nick Mathewson
2018-10-14Use the correct function signatures in test_relaycell.cNick Mathewson
This is now officially an antipattern: please let's never copy a function declaration in two places again. That's what headers are for.
2018-10-12Merge remote-tracking branch 'tor-github/pr/380'Nick Mathewson
2018-10-01Fix segfaults related to sanitizers+jemallocAlex Crichton
It looks to be the case that Rust's standard allocator, jemalloc, is incompatible with sanitizers. The incompatibility, for whatever reason, seems to cause segfaults at runtime when jemalloc is linked with sanitizers. Without actually trying to figure out what's going on here this commit instead takes the hammer of "let's remove jemalloc when testing". The `tor_allocate` crate now by default switches to the system allocator (eventually this will want to be the tor allocator). Most crates then link to `tor_allocate` ot pick this up, but the `smartlist` crate had to manually switch to the system allocator in testing and the `external` crate had to be sure to link to `tor_allocate`. The final gotcha here is that this patch also switches to unconditionally passing `--target` to Cargo. For weird and arcane reasons passing `--target` with the host target of the compiler (which Cargo otherwise uses as the default) is different than not passing `--target` at all. This ensure that our custom `RUSTFLAGS` with sanitizer options doesn't make its way into build scripts, just the final testing artifacts.
2018-10-01Remove the `link_rust.sh.in` scriptAlex Crichton
This is no longer necessary with upstream rust-lang/rust changes as well as some local tweaks. Namely: * The `-fsanitize=address`-style options are now passed via `-C link-args` through `RUSTFLAGS`. This obviates the need for the shell script. * The `-C default-linker-libraries`, disabling `-nodefaultlibs`, is passed through `RUSTFLAGS`, which is necessary to ensure that `-fsanitize=address` links correctly. * The `-C linker` option is passed to ensure we're using the same C compiler as normal C code, although it has a bit of hackery to only get the `gcc` out of `gcc -std=c99`
2018-10-01Merge remote-tracking branch 'public/bug27728'Nick Mathewson
2018-10-01Remove routerparse include from files that dont use itNick Mathewson
2018-10-01Remove versions.h include from routerparse.hNick Mathewson
2018-10-01Extract addr-policy parsing code.Nick Mathewson
2018-10-01extract networkstatus parsing to its own file.Nick Mathewson
2018-10-01Pull detached-signatures code into dirauth.Nick Mathewson
2018-10-01Split microdescriptor parser into its own file.Nick Mathewson
2018-10-01Move v2 hs parsing into feature/rendNick Mathewson
2018-10-01Split the authority-cert and signature/hash code from routerparseNick Mathewson
2018-10-01Extract logic for dumping unparseable junk from routerparse.cNick Mathewson
2018-10-01Move routerparse and parsecommon to their own module.Nick Mathewson
2018-09-27Merge branch 'split_stats'Nick Mathewson
2018-09-27Always initialize the periodic events list.Nick Mathewson
Various places in our code try to activate these events or check their status, so we should make sure they're initialized as early as possible. Fixes bug 27861; bugfix on 0.3.5.1-alpha.
2018-09-27Extract the non-stats part of geoip into a new src/lib/geoip.Nick Mathewson
2018-09-27Remove excess dependencies from geoip.cNick Mathewson
2018-09-27Split geoip from geoip-related stats.Nick Mathewson
This commit just moves the code to two separate files. The geoip code still has a few needless dependencies on core/* and features/*.
2018-09-27Move the predicted ports code out of rephist.cNick Mathewson
It differs from the rest of the rephist code in that it's actually necessary for Tor to operate, so it should probably go somewhere else. I'm not sure where yet, so I'll leave it in the same directory, but give it its own file.
2018-09-25Revise things that had included router.h beforeNick Mathewson
Make them only include the headers that they needed, and sort their headers while we're at it.
2018-09-25Extract all the "am I a server" functions from router.cNick Mathewson
2018-09-25Move key-loading and crosscert-checking out of feature/relayNick Mathewson
This is also used by onion services, so it needs to go in another module.
2018-09-24Merge branch 'ticket26744'Nick Mathewson
2018-09-21Merge remote-tracking branch 'tor-github/pr/365'Nick Mathewson
2018-09-21Split directory.c code into several modulesNick Mathewson
Parts of this C file naturally belong in dircache, dirclient, and dircommon: so, move them there.
2018-09-21Merge remote-tracking branch 'ahf-github/asn/bugs4700_2'Nick Mathewson
2018-09-21Merge branch 'split_mainloop_onion'Nick Mathewson
2018-09-21Merge branch 'maint-0.3.4'Nick Mathewson
2018-09-21Merge branch 'maint-0.3.3' into maint-0.3.4Nick Mathewson
2018-09-21Merge branch 'maint-0.3.2' into maint-0.3.3Nick Mathewson
2018-09-21Merge branch 'maint-0.2.9' into maint-0.3.2maint-0.3.2Nick Mathewson
2018-09-21Split main.c into main.c and mainloop.cNick Mathewson
The main.c code is responsible for initialization and shutdown; the mainloop.c code is responsible for running the main loop of Tor. Splitting the "generic event loop" part of mainloop.c from the event-loop-specific part is not done as part of this patch.
2018-09-21Move the non-crypto parts of onion.c out of src/core/cryptoNick Mathewson
The parts for handling cell formats should be in src/core/or. The parts for handling onionskin queues should be in src/core/or. Only the crypto wrapper belongs in src/core/crypto.
2018-09-21Check Python version in test_rebind.pyrl1987
2018-09-21Remove misleading first line in test_rebind.pyrl1987
test_rebind.py actually does not require Python 3. Bugfix on 5a11670fcaad0a58de48425ba80510effbe35628; bug not in any Tor release.
2018-09-21rust/protover: fix null deref in protover_all_supported()cypherpunks
Fortunately with the current callers it couldn't happen in practice. Fix on d1820c1516a31a149fc51a9e5126bf899e4c4e08.
2018-09-20Merge remote-tracking branch 'dgoulet/ticket27410_035_01'Nick Mathewson
2018-09-20Merge branch 'bug23512-v4-029-fixes'Nick Mathewson
2018-09-20Merge branch 'bug23512-v4-029-fixes'Nick Mathewson
2018-09-20Fix a pair of errors in bug23512Nick Mathewson
2018-09-20Merge branch 'split_routerlist_dirserv_v2'Nick Mathewson
2018-09-20Split most of dirserv.c into several new modulesNick Mathewson
In dirauth: * bwauth.c reads and uses bandwidth files * guardfraction.c reads and uses the guardfraction file * reachability.c tests relay reachability * recommend_pkg.c handles the recommended-packages lines. * recv_descs.c handles fingerprint files and processing incoming routerinfos that relays upload to us * voteflag.c computes flag thresholds and sets those thresholds on routerstatuses when computing votes In control: * fmt_serverstatus.c generates the ancient "v1 server status" format that controllers expect. In nodelist: * routerstatus_fmt.c formats routerstatus entries for a consensus, a vote, or for the controller.
2018-09-20Merge branch 'maint-0.3.4'Nick Mathewson