aboutsummaryrefslogtreecommitdiff
path: root/src/test
AgeCommit message (Collapse)Author
2021-05-25Merge branch 'maint-0.3.5' into maint-0.4.4Alexander Færøy
2021-05-25Remove the function `tor_tls_assert_renegotiation_unblocked`.Nick Mathewson
It was used nowhere outside its own unit tests, and it was causing compilation issues with recent OpenSSL 3.0.0 alphas. Closes ticket 40399.
2021-04-13Fix test naming, and fix tests on windows.Nick Mathewson
This is a bugfix against my fix for #40133, which has not yet appeared in 0.3.5.
2021-02-23Remove mallinfo() from codebaseDavid Goulet
Now deprecated in libc >= 2.33 Closes #40309 Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-02-23Remove mallinfo() from codebaseDavid Goulet
Now deprecated in libc >= 2.33 Closes #40309 Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-02-05Fix Windows build.Alexander Færøy
While trying to resolve our CI issues, the Windows build broke with an unused function error: src/test/test_switch_id.c:37:1: error: ‘unprivileged_port_range_start’ defined but not used [-Werror=unused-function] We solve this by moving the `#if !defined(_WIN32)` test above the `unprivileged_port_range_start()` function defintion such that it is included in its body. This is an unreviewed commit. See: tor#40275
2021-02-05Merge branch 'tor-gitlab/mr/292_squashed' into maint-0.4.4Alexander Færøy
2021-02-05Only check for bindable ports if we are unsure if it will fail.Alexander Færøy
We currently assume that the only way for Tor to listen on ports in the privileged port range (1 to 1023), on Linux, is if we are granted the NET_BIND_SERVICE capability. Today on Linux, it's possible to specify the beginning of the unprivileged port range using a sysctl configuration option. Docker (and thus the CI service Tor uses) recently changed this sysctl value to 0, which causes our tests to fail as they assume that we should NOT be able to bind to a privileged port *without* the NET_BIND_SERVICE capability. In this patch, we read the value of the sysctl value via the /proc/sys/ filesystem iff it's present, otherwise we assume the default unprivileged port range begins at port 1024. See: tor#40275
2021-02-03Merge branch 'maint-0.4.3' into maint-0.4.4David Goulet
2021-02-03Merge branch 'maint-0.3.5' into maint-0.4.3David Goulet
2021-02-03node: Move reentry set to use a digestmap_tDavid Goulet
Any lookup now will be certain and not probabilistic as the bloomfilter. Closes #40269 Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-01-29Merge branch 'tor-gitlab/mr/285' into ticket2667_044_01David Goulet
2021-01-29Merge branch 'tor-gitlab/mr/284' into ticket2667_043_01David Goulet
2021-01-29test: Add test for exits blocking reentry to the networkGeorge Kadianakis
Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-01-28Merge branch 'maint-0.4.3' into maint-0.4.4David Goulet
2021-01-28Merge branch 'maint-0.3.5' into maint-0.4.3David Goulet
2021-01-28Merge branch 'tor-gitlab/mr/50' into maint-0.3.5David Goulet
2021-01-28Merge branch 'tor-gitlab/mr/256' into maint-0.4.4David Goulet
2021-01-28Merge branch 'tor-gitlab/mr/255' into maint-0.4.3David Goulet
2021-01-28Merge branch 'tor-gitlab/mr/254' into maint-0.3.5David Goulet
2021-01-28Merge branch 'maint-0.4.3' into maint-0.4.4David Goulet
2021-01-28Merge branch 'maint-0.3.5' into maint-0.4.3David Goulet
2021-01-28Merge remote-tracking branch 'tor-gitlab/mr/186' into maint-0.3.5David Goulet
2021-01-19Merge remote-tracking branch 'tor-gitlab/mr/163' into maint-0.4.3Nick Mathewson
2021-01-19Merge remote-tracking branch 'tor-gitlab/mr/143' into maint-0.3.5Nick Mathewson
2021-01-12Merge branch 'ticket40237_043_01' into ticket40237_044_01David Goulet
2021-01-12tests: Fix unit tests after merge of #40237David Goulet
2021-01-12Merge branch 'ticket40237_035_01' into ticket40237_043_01David Goulet
2021-01-12hs-v3: Require reasonably live consensusDavid Goulet
Some days before this commit, the network experienced a DDoS on the directory authorities that prevented them to generate a consensus for more than 5 hours straight. That in turn entirely disabled onion service v3, client and service side, due to the subsystem requiring a live consensus to function properly. We know require a reasonably live consensus which means that the HSv3 subsystem will to its job for using the best consensus tor can find. If the entire network is using an old consensus, than this should be alright. If the service happens to use a live consensus while a client is not, it should still work because the client will use the current SRV it sees which might be the previous SRV for the service for which it still publish descriptors for. If the service is using an old one and somehow can't get a new one while clients are on a new one, then reachability issues might arise. However, this is a situation we already have at the moment since the service will simply not work if it doesn't have a live consensus while a client has one. Fixes #40237 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-11-19Merge branch 'maint-0.4.3' into maint-0.4.4Alexander Færøy
2020-11-19Merge remote-tracking branch 'tor-gitlab/mr/196' into maint-0.4.3Alexander Færøy
2020-11-16Merge branch 'maint-0.4.3' into maint-0.4.4Nick Mathewson
2020-11-16Merge branch 'maint-0.3.5' into maint-0.4.3Nick Mathewson
2020-11-05Make config/parse_tcp_proxy_line work in the presence of DNS hijackingNick Mathewson
We can use our existing mocking functionality to do this: We have been in this position before. Fixes part of #40179; bugfix on 0.4.3.1-alpha.
2020-11-05Handle a change in the implementation of hashlib in Python 3.9Nick Mathewson
Previously, hashlib.shake_256 was a class (if present); now it can also be a function. This change invalidated our old compatibility/workaround code, and made one of our tests fail. Fixes bug 40179; bugfix on 0.3.1.6-rc when the workaround code was added.
2020-10-28Merge branch 'maint-0.4.3' into maint-0.4.4Alexander Færøy
2020-10-28Merge branch 'maint-0.3.5' into maint-0.4.3Alexander Færøy
2020-10-28Fix a previously overstrict log message check.Nick Mathewson
OpenSSL doesn't seem to report error locations in the same way as before, which broke one of our tests. Fixes bug 40170; bugfix on 0.2.8.1-alpha.
2020-10-14Implement proposal 318: Limit protovers to 0..63Nick Mathewson
In brief: we go through a lot of gymnastics to handle huge protover numbers, but after years of development we're not even close to 10 for any of our current versions. We also have a convenient workaround available in case we ever run out of protocols: if (for example) we someday need Link=64, we can just add Link2=0 or something. This patch is a minimal patch to change tor's behavior; it doesn't take advantage of the new restrictions. Implements #40133 and proposal 318.
2020-10-07Merge remote-tracking branch 'tor-github/pr/1827/head' into maint-0.3.5Nick Mathewson
2020-10-07Merge branch 'maint-0.3.5' into maint-0.4.3Nick Mathewson
2020-10-07Merge remote-tracking branch 'tor-gitlab/mr/103' into maint-0.3.5Nick Mathewson
2020-10-07Merge branch 'maint-0.3.5' into maint-0.4.3Nick Mathewson
2020-10-07Merge branch 'mr_124_squashed' into maint-0.3.5Nick Mathewson
2020-10-07Parallelize src/test/test into chunks.Nick Mathewson
First, we introduce a flag to teach src/test/test to split its work into chunks. Then we replace our invocation of src/test/test in our "make check" target with a set of 8 scripts that invoke the first 8th of the tests, the second 8th, and so on. This change makes our "make -kj4 check" target in our hardened gitlab build more than twice as fast, since src/test/test was taking the longest to finish. Closes 40098.
2020-10-07Merge remote-tracking branch 'tor-gitlab/mr/163' into maint-0.4.4George Kadianakis
2020-09-28Merge branch 'bug40133_035' into bug40133_043Nick Mathewson
2020-09-28Merge branch 'maint-0.3.5' into bug40133_035Nick Mathewson
2020-09-18Merge branch 'maint-0.3.5' into maint-0.4.3David Goulet
2020-09-18Merge branch 'maint-0.4.3' into maint-0.4.4David Goulet