summaryrefslogtreecommitdiff
path: root/src/test/test_util.c
AgeCommit message (Collapse)Author
2019-10-22test: Hide some test-declaration macro definitions to COCCI.Nick Mathewson
(These ones cause parsing failures.)
2019-10-03util/map_anon_nofork: Add a cast to avoid passing -48 to memsetNick Mathewson
This fixes coverity CID 1454593, and bug 31948. Bug not in any released version of Tor.
2019-10-02Merge remote-tracking branch 'tor-github/pr/1374'Nick Mathewson
2019-09-30Re-run "make autostyle" with improved annotate_ifdef_directivesNick Mathewson
2019-09-30test: Avoid a map_anon_nofork test failure on SunOSteor
This test failure happened due to a signed/unsigned integer comparison. This bug occurred on SunOS, it may also occur on other systems that use signed char as the default. (And cast 1-byte integer constants to an unsigned integer.) Fixes bug 31897; bugfix on 0.4.1.1-alpha.
2019-09-16Run "make autostyle" and fix wide lines.Nick Mathewson
2019-08-06test_util: Do not check for ENETUNREACH unless it exists.Nick Mathewson
Fixes bug 31352; bug not in any released Tor.
2019-06-07Tolerate net-unreachable failures in util/socketpair_ersatzNick Mathewson
This can happen when we have no network stack configured. Fixes bug 30804; bugfix on 0.2.5.1-alpha.
2019-06-05Run "make autostyle."Nick Mathewson
2019-05-07Merge branch 'tor-github/pr/994'David Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-04-30Replace all remaining tor_mem_is_zero() with fast_mem_is_zero()Nick Mathewson
2019-04-30Split reply formatting out of control_fmt.cTaylor Yu
Split the core reply formatting code out of control_fmt.c into control_proto.c. The remaining code in control_format.c deals with specific subsystems and will eventually move to join those subsystems.
2019-04-09Merge branch 'maint-0.4.0'Nick Mathewson
2019-04-09Merge branch 'bug29922_035' into maint-0.4.0Nick Mathewson
2019-04-09Actually I believe this should be an EINVAL.Nick Mathewson
2019-04-09Merge branch 'maint-0.4.0'George Kadianakis
2019-04-09Merge branch 'tor-github/pr/915' into maint-0.4.0George Kadianakis
2019-04-08Detect and suppress an additional gmtime() warning in test_util.cNick Mathewson
Fixes bug 29922; bugfix on 0.2.9.3-alpha when we tried to capture all these warnings. No need to backport any farther than 0.3.5, though -- these warnings don't cause test failures before then. This one was tricky to find because apparently it only happened on _some_ windows builds.
2019-04-05Merge branch 'tor-github/pr/761'George Kadianakis
2019-04-04Syntax fix in test.Nick Mathewson
2019-04-04rename inherit values to avoid conflict with system definesNick Mathewson
2019-04-04map_anon: define a macro if it is possible for noinherit to fail.Nick Mathewson
2019-04-04Make map_anon expose the result of a noinherit attemptNick Mathewson
Previously we did this for tests only, but it's valuable for getting proper fork behavior in rand_fast.
2019-03-25Split command-handling and authentication from control.cNick Mathewson
2019-03-25Split all controller events code into a new control_events.cNick Mathewson
Also, split the formatting code shared by control.c and control_events.c into controller_fmt.c.
2019-02-25Re-enable and fix unit test for nofork mappingsNick Mathewson
This test was previously written to use the contents of the system headers to decide whether INHERIT_NONE or INHERIT_ZERO was going to work. But that won't work across different environments, such as (for example) when the kernel doesn't match the headers. Instead, we add a testing-only feature to the code to track which of these options actually worked, and verify that it behaved as we expected. Closes ticket 29541; bugfix not on any released version of Tor.
2019-02-19Mark map_anon_nofork test as skipped in 0.4.0Nick Mathewson
This test fails in some environments; since the code isn't used in 0.4.0, let's disable it for now. Band-aid solution for #29534; bug not in any released Tor.
2019-02-14Merge branch 'tor-github/pr/702'David Goulet
2019-02-06Code for anonymous mappings via mmap() or CreateFileMapping().Nick Mathewson
Using an anonymous mmap() is a good way to get pages that we can set kernel-level flags on, like minherit() or madvise() or mlock(). We're going to use that so that we can make uninheritable locked pages to store PRNG data.
2019-01-23Merge branch 'ticket28668_035' into ticket28668_040Nick Mathewson
2019-01-23Another case of possible gmtime angst.Nick Mathewson
2019-01-23Merge branch 'ticket28668_035' into ticket28668_040Nick Mathewson
2019-01-23Capture more BUG warnings in util/time testNick Mathewson
These are ones that happen on windows only. Fixes bug 29161.
2019-01-16Bump copyright date to 2019Nick Mathewson
2019-01-16Bump copyright date to 2019.Nick Mathewson
2019-01-14Merge remote-tracking branch 'asn-github/adaptive_padding-final'Nick Mathewson
2019-01-10Unittest for tor_isinf().George Kadianakis
2019-01-09Merge branch 'ticket28856_v2'Nick Mathewson
2019-01-02Concentrate all TOR_USEC_PER_SEC definitions in a single header file.George Kadianakis
Co-authored-by: Mike Perry <mikeperry-git@torproject.org>
2018-12-17Merge branch 'ticket28179_squashed' into ticket28179_squashed_mergedNick Mathewson
2018-12-17Move remaining code from subprocess.{h,c} to more appropriate places.Alexander Færøy
This patch moves the remaining code from subprocess.{h,c} to more appropriate places in the process.c and process_win32.c module. We also delete the now empty subprocess module files. See: https://bugs.torproject.org/28179
2018-12-17Delete old process_handle_t code.Alexander Færøy
This patch removes the old process_handle_t code. Everything should by now be using the process_t interface. See: https://bugs.torproject.org/28179
2018-12-17Remove strcmp_len(): it is now unusedNick Mathewson
(See 28856.)
2018-11-14Move buffers.c out of lib/containers to resolve a circularity.Nick Mathewson
2018-11-06Merge remote-tracking branch 'tor-github/pr/464'Nick Mathewson
2018-11-01Add tests for the string_is_utf8_no_bom() function.George Kadianakis
2018-10-30Merge branch 'ticket23082_squashed'Nick Mathewson
2018-10-30Move a check for trailing colon to tor_inet_pton()rl1987
That way, string_is_valid_ipv6_address() can benefit from it
2018-09-12Merge remote-tracking branch 'tor-github/pr/318'Nick Mathewson
2018-09-04Merge branch 'tor_api_owning_control'Nick Mathewson