summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-07-18Extract ARGS from SMETHOD line and attach them to transport.George Kadianakis
2013-07-16A python script to combin gcov output with git blameNick Mathewson
2013-07-16Merge remote-tracking branch 'origin/maint-0.2.4'Nick Mathewson
2013-07-16Re-do a cast in order to make old buggy freebsd gcc happyNick Mathewson
Fix for #9254. Bugfix on 0.2.4.14-alpha. This is not actually a bug in the Tor code.
2013-07-16Merge remote-tracking branch 'asn/bug9265'Nick Mathewson
2013-07-16Remove an unused variable in test_replaycache_scrubNick Mathewson
2013-07-16Make contrib/coverage smarter about check file-existence edge casesAndrea Shepard
2013-07-16Add more replaycache.c unit tests, bringing coverage to 100% for that fileAndrea Shepard
2013-07-16Eliminate an impossible case in replaycache_scrub_if_needed_internal()Andrea Shepard
2013-07-16Test deeper in test_pt_parsing().George Kadianakis
We used to test parse_{c,s}method_line() without actually testing that the resulting transport_t was well formed.
2013-07-15Add optional target directory parameter to coverage script and add ↵Andrea Shepard
reset-gcov target to Makefile.am
2013-07-15Appease "make check-spaces"Nick Mathewson
2013-07-15Use format_hex_number_sigsafe to format syscalls in sandbox.cNick Mathewson
This way, we don't have to use snprintf, which is not guaranteed to be signal-safe. (Technically speaking, strlen() and strlcpy() are not guaranteed to be signal-safe by the POSIX standard. But I claim that they are on every platform that supports libseccomp2, which is what matters here.)
2013-07-15Lightly refactor and test format_hex_number_sigsafeNick Mathewson
Better tests for upper bounds, and for failing cases. Also, change the function's interface to take a buffer length rather than a maximum length, and then NUL-terminate: functions that don't NUL-terminate are trouble waiting to happen.
2013-07-15HEX_ERRNO_SIZE is no longer the correct upper limit for ↵Nick Mathewson
format_hex_number_sigsafe
2013-07-15Expose format_hex_number_..., and rename it to ..._sigsafe().Nick Mathewson
There are some other places in the code that will want a signal-safe way to format numbers, so it shouldn't be static to util.c.
2013-07-15Don't build format_helper_exit_status on win32Nick Mathewson
The only thing that used format_helper_exit_status on win32 was the unit tests. This caused an error when we tried to leave a static format_helper_exit_status lying around in a production object file. The easiest solution is to admit that this way of dealing with process exit status is Unix-only.
2013-07-15Merge remote-tracking branch 'linus/unused_param'Nick Mathewson
2013-07-15Merge remote-tracking branch 'linus/binshify'Nick Mathewson
2013-07-15Merge remote-tracking branch 'public/fancy_test_tricks'Nick Mathewson
Conflicts: src/common/include.am Conflict was from adding testsupport.h near where sandbox.h had already been added.
2013-07-15Traditional /bin/sh is unhappy about {a,b} globbing.Linus Nordberg
2013-07-15Avoid compiler warning 'unused param'.Linus Nordberg
Fixes #9261.
2013-07-15Fix two pre-coffee typosPeter Palfrader
2013-07-15And a changes file for #9258Peter Palfrader
2013-07-15Reject relative control socket paths and emit a warning.Peter Palfrader
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.
2013-07-15Document get_parent_directory morePeter Palfrader
2013-07-14cosmetic cleanupsRoger Dingledine
2013-07-13put sandbox.h in the tarball, so the tarball buildsRoger Dingledine
2013-07-12Merge remote-tracking branch 'public/gsoc-ctoader-cap-phase1-squashed'Nick Mathewson
2013-07-11Remove a bogus semicolon spotted by Gisle VanemNick Mathewson
2013-07-11Add a basic seccomp2 syscall filter on LinuxCristian Toader
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.
2013-07-10Add some basic unit tests for the circuit map data structure.Nick Mathewson
These show off the new mocking code by mocking the circuitmux code so that we can test the circuit map code in isolation.
2013-07-10Add rudimentary test mocking support.Nick Mathewson
This is not the most beautiful possible implementation (it requires decorating mockable functions with ugly macros), but it actually works, and is portable across multiple compilers and architectures.
2013-07-10Add a script to compare directories full of gcov outputNick Mathewson
We can't just use "diff", since we don't care about changes in line numbers, or changes in the exact number of times a line was called. We just care about changes that make lines covered or non-coverd. So pre-process the files before calling diff.
2013-07-10Coverage support: build with --enable-coverage to have tests run with gcovNick Mathewson
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.
2013-07-10Completely refactor how FILENAME_PRIVATE worksNick Mathewson
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.
2013-07-10Start work on fancy compiler tricks to expose extra stuff to our testsNick Mathewson
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.
2013-07-08Merge remote-tracking branch 'origin/maint-0.2.4'Nick Mathewson
2013-07-08Merge branch 'bug9200' into maint-0.2.4Nick Mathewson
2013-07-08Add a comment and a check for why flag indices will be <= 63Nick Mathewson
2013-07-08Merge remote-tracking branch 'karsten/geoip-manual-update-jul2013'Nick Mathewson
2013-07-08Merge remote-tracking branch 'origin/maint-0.2.4'Nick Mathewson
2013-07-08Merge remote-tracking branch 'origin/maint-0.2.3' into maint-0.2.4Nick Mathewson
2013-07-08Merge remote-tracking branch 'origin/maint-0.2.2' into maint-0.2.3Nick Mathewson
2013-07-08Update to the July 2013 GeoIP database.Karsten Loesing
2013-07-08Add 2 new manual A1 substitutions.Karsten Loesing
2013-07-03FIx undefined behavior in dirvote.cNick Mathewson
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.
2013-06-29Merge remote-tracking branch 'linus/bug8530'Nick Mathewson
2013-06-29Merge remote-tracking branch 'origin/maint-0.2.4'Nick Mathewson
2013-06-29Merge branch 'bug9147' into maint-0.2.4Nick Mathewson