aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_util.c
AgeCommit message (Collapse)Author
2018-07-03Merge remote-tracking branch 'github/ticket26626'Nick Mathewson
2018-07-03Fix up some windows compilation issues.Nick Mathewson
These were mostly cases where our previous macros had been casting, and the values that we were trying to printf were not in fact uint64_t.
2018-07-03Retire U64_TO_DBL and DBL_TO_U64Nick Mathewson
These were necessary long ago to work around a bug in VC6.
2018-07-03Return U64_PRINTF_ARG and U64_FORMATNick Mathewson
The standard is printf("%"PRIu64, x);
2018-07-03Replace U64_LITERAL with the standard UINT64_CNick Mathewson
2018-07-03Clean up various things that broke with our stdint.h changesNick Mathewson
Casting before printf was necessary; now it's not so smart. We don't have SIZEOF_UINT8_T any more.
2018-07-01Remove system headers from or.hNick Mathewson
2018-07-01Minimize headers that include crypto_formats and x25519 stuffNick Mathewson
2018-07-01Remove needless includes from or.hNick Mathewson
or.h should really include only the minimum of stuff from or/*, common/*, and lib/*.
2018-06-29Remove windows libraries from util.h and compat.hNick Mathewson
2018-06-29Remove read_all and write_allNick Mathewson
These had become wrappers around their fd and socket variants; there were only a few users of the original functions still remaining.
2018-06-29Move fd and memory-info functions.Nick Mathewson
2018-06-28Fix paths for buffers.h; automated.Nick Mathewson
2018-06-28Remove all include common/ uses in crypto_ops and tls.Nick Mathewson
2018-06-28Extract time functionality into lib/wallclock and lib/timeNick Mathewson
2018-06-28Move floating-point math functions into a new lib/mathNick Mathewson
2018-06-28Move compute_num_cpus to lib/threadNick Mathewson
2018-06-28Move tor_escape_str_for_pt_args into or/transports.cNick Mathewson
2018-06-28Move string_is_key_value to lib/encodingNick Mathewson
2018-06-28Move weakrng into lib/intmathNick Mathewson
2018-06-28Extract process-management functionality into a new lib/processNick Mathewson
Note that procmon does *not* go here, since procmon needs to integrate with the event loop.
2018-06-28Fix up the modules that include memarea.h (automated)Nick Mathewson
2018-06-27Move network code to libtor-net.Nick Mathewson
There are some additional changes to come: those points are marked by XXXX.
2018-06-26Move tor_parse_long and friends into parse_int.h in libtor-stringNick Mathewson
2018-06-22Finally extract the log library and make it build.Nick Mathewson
This patch: - introduces an fdio module for low-level fd functions that don't need to log. - moves the responsibility for opening files outside of torlog.c, so it won't need to call tor_open_cloexec.
2018-06-21Extract tor_malloc and friends to a new module.Nick Mathewson
2018-06-21Rectify include paths (automated)Nick Mathewson
2018-06-21Rectify include paths (automated)Nick Mathewson
2018-06-20Run rectify_include_paths.pyNick Mathewson
2018-06-20Update copyrights to 2018.Nick Mathewson
2018-05-03Merge remote-tracking branch 'isis/bug24660_r1'Nick Mathewson
2018-04-26Add a function to compute millisecond time difference quickly.Nick Mathewson
Our main function, though accurate on all platforms, can be very slow on 32-bit hosts. This one is faster on all 32-bit hosts, and accurate everywhere except apple, where it will typically be off by 1%. But since 32-bit apple is a relic anyway, I think we should be fine.
2018-04-16Helper function to add u32 without overflow.Mike Perry
2018-04-1332-bit compilation warningsNick Mathewson
2018-04-13Expose a function that computes stamp units from msec.Nick Mathewson
(It turns out we can't just expose STAMP_TICKS_PER_SECOND, since Apple doesn't have that.)
2018-04-06crypto: Refactor (P)RNG functionality into new crypto_rand module.Isis Lovecruft
* ADD new /src/common/crypto_rand.[ch] module. * ADD new /src/common/crypto_util.[ch] module (contains the memwipe() function, since all crypto_* modules need this). * FIXES part of #24658: https://bugs.torproject.org/24658
2018-03-28Merge branch 'maint-0.3.3'Nick Mathewson
2018-03-28Rename string_is_valid_hostname -> string_is_valid_nonrfc_hostnameNick Mathewson
Per discussion on 25055.
2018-03-28Don't explode on NULL or empty stringrl1987
2018-03-28Allow alphanumeric TLDs in test for nowrl1987
2018-03-28Validate hostnames with punycode TLDs correctlyrl1987
2018-03-28Test TLD validationrl1987
2018-03-28Do not consider IP strings valid DNS names. Fixes #25055rl1987
2018-02-15Merge branch '25162_zstd_static'Nick Mathewson
2018-02-07Merge remote-tracking branch 'dgoulet/bug25113_029_01'Nick Mathewson
2018-02-07test: Bump to 10 msec gap in the monotonic testDavid Goulet
On slow system, 1 msec between one read and the other was too tight. For instance, it failed on armel with a 4msec gap: https://buildd.debian.org/status/package.php?p=tor&suite=experimental Increase to 10 msec for now to address slow system. It is important that we keep this OP_LE test in so we make sure the msec/usec/nsec read aren't desynchronized by huge gaps. We'll adjust again if we ever encounter a system that goes slower than 10 msec between calls. Fixes #25113 Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-02-07Fix spelling mistakes corresponding to ticket #23650Deepesh Pathak
2018-02-06Make zstd unit tests try running with static-only fns disabledNick Mathewson
Since we're making it so that unstable zstd apis can be disabled, we need to test them. I do this by adding a variant setup/cleanup function for the tests, and teaching it about a fake compression method called "x-zstd:nostatic".
2017-12-20whitespace fixNick Mathewson
2017-12-20Improve add_msec test to cover ms->sec rolloverNick Mathewson
Per mikeperry's suggestion, I'm making sure that the millisecond part of the time will always roll over in this test.