Age | Commit message (Collapse) | Author |
|
On platforms with the backtrace/backtrace_symbols_fd interface, Tor
can now dump stack traces on assertion failure. By default, I log
them to DataDir/stack_dump and to stderr.
|
|
Likely fix for the crash bug of #9296, which was introduced through a
combination of #7912 and #8586. Bugfix not in any released Tor.
|
|
|
|
|
|
|
|
I added this so I could write a unit test for ServerTransportOptions,
but it incidentally exercises the succeed-on-defaults case of
options_validate too.
|
|
|
|
This removes some INLINE markers from functions that probably didn't
need them.
|
|
|
|
|
|
Conflicts:
src/test/test_pt.c
|
|
|
|
|
|
|
|
|
|
Since we are going to be using that function to also escape parameters
passed to transport proxies using environment variables.
|
|
This is in preparation for using tor_escape_str_for_socks_arg() to
escape server-side pluggable transport parameters.
|
|
And use it to validate them.
|
|
|
|
|
|
|
|
|
|
Fix for #9254. Bugfix on 0.2.4.14-alpha.
This is not actually a bug in the Tor code.
|
|
|
|
|
|
Conflicts:
src/common/include.am
Conflict was from adding testsupport.h near where sandbox.h had
already been added.
|
|
|
|
Previously we would accept relative paths, but only if they contained a
slash somewhere (not at the end).
Otherwise we would silently not work. Closes: #9258. Bugfix on
0.2.3.16-alpha.
|
|
|
|
|
|
|
|
It's controlled by the new Sandbox argument. Right now, it's rather
coarse-grained, it's Linux-only, and it may break some features.
|
|
These show off the new mocking code by mocking the circuitmux code
so that we can test the circuit map code in isolation.
|
|
If you pass the --enable-coverage flag on the command line, we build
our testing binaries with appropriate options eo enable coverage
testing. We also build a "tor-cov" binary that has coverage enabled,
for integration tests.
On recent OSX versions, test coverage only works with clang, not gcc.
So we warn about that.
Also add a contrib/coverage script to actually run gcov with the
appropriate options to generate useful .gcov files. (Thanks to
automake, the .o files will not have the names that gcov expects to
find.)
Also, remove generated gcda and gcno files on clean.
|
|
We previously used FILENAME_PRIVATE identifiers mostly for
identifiers exposed only to the unit tests... but also for
identifiers exposed to the benchmarker, and sometimes for
identifiers exposed to a similar module, and occasionally for no
really good reason at all.
Now, we use FILENAME_PRIVATE identifiers for identifiers shared by
Tor and the unit tests. They should be defined static when we
aren't building the unit test, and globally visible otherwise. (The
STATIC macro will keep us honest here.)
For identifiers used only by the unit tests and never by Tor at all,
on the other hand, we wrap them in #ifdef TOR_UNIT_TESTS.
This is not the motivating use case for the split test/non-test
build system; it's just a test example to see how it works, and to
take a chance to clean up the code a little.
|
|
This is mainly a matter of automake trickery: we build each static
library in two versions now: one with the TOR_UNIT_TESTS macro
defined, and one without. When TOR_UNIT_TESTS is defined, we can
enable mocking and expose more functions. When it's not defined, we
can lock the binary down more.
The alternatives would be to have alternate build modes: a "testing
configuration" for building the libraries with test support, and a
"production configuration" for building them without. I don't favor
that approach, since I think it would mean more people runnning
binaries build for testing, or more people not running unit tests.
|
|
|
|
|
|
Fix a bug in the voting algorithm that could yield incorrect results
when a non-naming authority declared too many flags. Fixes bug 9200;
bugfix on 0.2.0.3-alpha.
Found by coverity scan.
|
|
|
|
Ticket 9147.
|
|
|
|
(This caused a crash that was reported as bug 9122, but the underlying
behavior has been wrong for a while.)
Fix on 0.2.3.9-alpha.
|
|
config options
|
|
|
|
|
|
Fixes bug 9090; bug not in any released Tor.
|
|
|
|
|
|
Conflicts:
src/or/config.c
src/or/relay.c
|