Nick Mathewson
ee9ed9d817
Fix memory leaks in test_status.c
2014-04-29 12:48:02 -04:00
Nick Mathewson
212e982d9b
Fix leaks in dir voting tests
2014-04-29 12:48:02 -04:00
Nick Mathewson
504e2000ed
Fix leaks in test_oom.c
2014-04-26 12:17:10 -04:00
Nick Mathewson
97664cfd2a
Fix leaks in test_dir_formats
2014-04-26 12:16:12 -04:00
Nick Mathewson
b60782b6d6
Fix numerous leaks in test_pt.c
...
I didn't find a managed_proxy_free() function any place; shouldn't
there be one?
2014-04-26 11:28:39 -04:00
Nick Mathewson
b11ab0d91d
test_cntev_append_cell_stats now no longer leaks
2014-04-26 00:40:22 -04:00
Nick Mathewson
b4b07c17e3
Fix leaks in test_exit_policy_dump_to_string
2014-04-26 00:36:09 -04:00
Nick Mathewson
558becad8c
Memory leaks in test_config_addressmap
2014-04-26 00:27:21 -04:00
Nick Mathewson
ffffd860c9
Fix a leak in test_buffer_allocation_tracking
2014-04-26 00:18:15 -04:00
Nick Mathewson
1117889f4a
Fix memory leak in unittest helper function.
2014-04-26 00:13:49 -04:00
Nick Mathewson
9fbb5a44b8
Fix memory leak in test_util_asprintf
2014-04-26 00:13:27 -04:00
Nick Mathewson
dc0fcbd812
Fix memory leaks in test_cntev_append_cell_stats
2014-04-26 00:12:39 -04:00
Nick Mathewson
3fa296ce28
fix uninitialized memory reads from test_geoip_with_pt. Found with valgrind
2014-04-26 00:12:16 -04:00
Nick Mathewson
fa202c4127
Fix memory leak in test_geoip
2014-04-26 00:11:46 -04:00
Nick Mathewson
1cf02605d4
Fix memory leak in test_onion_queues
2014-04-26 00:11:17 -04:00
Nick Mathewson
c7951731ed
Fix memory leaks in test_circuit_timeout
...
Found with valgrind.
2014-04-26 00:10:04 -04:00
Nick Mathewson
167536a112
fix memory leak in dump_exit_policy_to_string tests
2014-04-25 01:59:20 -04:00
Nick Mathewson
d3c05a79f0
Merge branch 'scanbuild_fixes'
2014-04-25 01:24:39 -04:00
Nick Mathewson
67aa3685e7
Merge branch 'bug11396_v2_squashed'
...
Conflicts:
src/or/main.c
2014-04-24 10:31:38 -04:00
Nick Mathewson
aca05fc5c0
get_total_system_memory(): see how much RAM we have
2014-04-24 10:26:14 -04:00
Nick Mathewson
685d450ab3
scan-build: avoid undef behaior in tor_inet_pton
...
If we had an address of the form "1.2.3.4" and we tried to pass it to
tor_inet_pton with AF_INET6, it was possible for our 'eow' pointer to
briefly move backwards to the point before the start of the string,
before we moved it right back to the start of the string. C doesn't
allow that, and though we haven't yet hit a compiler that decided to
nuke us in response, it's best to fix.
So, be more explicit about requiring there to be a : before any IPv4
address part of the IPv6 address. We would have rejected addresses
without a : for not being IPv6 later on anyway.
2014-04-19 13:14:33 -04:00
Nick Mathewson
1800e79ca5
scan-build: Fix harmless sizeof(ptr) in test_oom.c
...
We meant to using random bytes to fill a buffer, up to 3000 at a
time. Instead we were taking them sizeof(void*) at a time.
2014-04-19 12:52:00 -04:00
Nick Mathewson
69ea4450ca
scan-build: fix a crash-on-fail possibility in test_policy.c
2014-04-18 20:33:21 -04:00
Nick Mathewson
0175fcaf7c
Fix uninitialized-ram free in unit tests
...
Fix on fb595922; bug not in any released Tor. Found with
--enable-expensive-hardening.
2014-04-17 01:03:10 -04:00
Nick Mathewson
1126ce1d86
Fix compiler warning on test_status.c
2014-04-15 15:19:41 -04:00
dana koch
3ce3984772
Uplift status.c unit test coverage with new test cases and macros.
...
A new set of unit test cases are provided, as well as introducing
an alternative paradigm and macros to support it. Primarily, each test
case is given its own namespace, in order to isolate tests from each
other. We do this by in the usual fashion, by appending module and
submodule names to our symbols. New macros assist by reducing friction
for this and other tasks, like overriding a function in the global
namespace with one in the current namespace, or declaring integer
variables to assist tracking how many times a mock has been called.
A set of tests for a small-scale module has been included in this
commit, in order to highlight how the paradigm can be used. This
suite gives 100% coverage to status.c in test execution.
2014-04-15 15:00:34 -04:00
Nick Mathewson
0820031419
Merge remote-tracking branch 'asn/bug11486'
2014-04-12 21:42:45 -04:00
George Kadianakis
1ec4d52e59
Add another unit test for parse_bridge_line().
2014-04-11 21:06:53 +03:00
Nick Mathewson
2f73525883
Fix a dumb C bug in the unit tests for 9841
...
Fixes bug 11460; bug only affects unit tests and is not in any
released version of Tor.
2014-04-09 09:20:25 -04:00
Nick Mathewson
fa6b80d6e5
Merge remote-tracking branch 'public/bug10431'
2014-04-09 08:29:21 -04:00
Nick Mathewson
b933fdcc11
Move existing policy tests from test.c to new test_policy.c
2014-04-08 14:14:12 -04:00
Nick Mathewson
d0af665758
Remove unused extern decl for a nonexistent test suite
2014-04-08 14:10:59 -04:00
Nick Mathewson
245f273aaf
Merge branch 'bug7952_final'
...
Conflicts:
src/test/include.am
src/test/test.c
2014-04-08 13:55:02 -04:00
rl1987
51e13cd1ad
Making entire exit policy available to Tor controller.
2014-04-08 13:50:02 -04:00
Nick Mathewson
fffc59b0e9
Merge remote-tracking branch 'public/bug9841_025'
2014-04-08 12:06:03 -04:00
Nick Mathewson
f0bce2dc35
Fix some harmless/untriggerable memory leaks found by coverity
2014-04-07 23:20:13 -04:00
Nick Mathewson
595303fd1e
Merge remote-tracking branch 'public/bug10363_024_squashed'
2014-04-07 23:03:04 -04:00
Nick Mathewson
9dd115d6b5
Another 10363 instance: this one in tor_memmem fallback code
2014-04-07 22:56:42 -04:00
Nick Mathewson
2ff664ee20
Merge remote-tracking branch 'public/bug10801_024'
...
Conflicts:
src/common/address.c
src/or/config.c
2014-04-05 14:50:57 -04:00
Nick Mathewson
b3469e4207
Make tor_addr_port_parse handle portless IPv6 addresses correctly.
...
(Not a bugfix on any Tor release; before 10801_024, it didn't handle
portless addresses at all.)
2014-04-05 14:41:37 -04:00
Nick Mathewson
eefa3ebc78
Add a test for default/port conflicts in tor_addr_port_parse
2014-04-05 14:18:39 -04:00
Nick Mathewson
d22ce149c8
Test for circuit_set_rend_token(.,.,NULL)
2014-04-04 12:06:54 -04:00
Nick Mathewson
da908a593f
Unit tests for connection_edge_process_resolved_cell
...
Also rename a function to be more accurate (resolve->resolved)
2014-04-02 15:38:00 -04:00
Nick Mathewson
4215c801ff
Tests for resolved_cell_parse
2014-04-02 15:38:00 -04:00
Nick Mathewson
fc9e84062b
Merge remote-tracking branch 'public/bug4645'
...
Conflicts:
src/or/dirserv.c
2014-04-01 21:49:01 -04:00
Nick Mathewson
6bef082d0a
Merge remote-tracking branch 'public/bug11232'
2014-04-01 09:39:48 -04:00
Nick Mathewson
8e94d5f22e
Check return values for tor_munmap_file() in unit tests
2014-03-31 11:40:00 -04:00
Nick Mathewson
b0bbe6b2f1
Report only the first bootstrap failure from an orconn
...
Otherwise, when we report "identity mismatch", we then later report
DONE when the connection gets closed.
Fixes bug 10431; bugfix on 0.2.1.1-alpha.
2014-03-27 15:58:43 -04:00
Nick Mathewson
9c0a1adfa2
Don't do a DNS lookup on a bridge line address
...
Fixes bug 10801; bugfix on 07bf274d
in 0.2.0.1-alpha.
2014-03-27 15:31:29 -04:00
Nick Mathewson
a83abcf5ee
Fix unittest compilation with --disable-curve25519
...
This is a fix for 9700, which we already fixed in 0.2.5.x, but which
got left in 0.2.4.x.
This is a partial backport of a0a855d586
2014-03-20 13:53:32 -04:00