summaryrefslogtreecommitdiff
path: root/auto_tests
AgeCommit message (Collapse)Author
2020-05-02Fix errors on error paths found by oomer.iphydf
* Use-after-free because we free network before dht in one case. * Various unchecked allocs in tests (not so important). * We used to not check whether ping arrays were actually allocated in DHT. * `ping_kill` and `ping_array_kill` used to crash when passing NULL. Also: * Added an assert in all public API functions to ensure tox isn't NULL. The error message you get from that is a bit nicer than "Segmentation fault" when clients (or our tests) do things wrong. * Decreased the sleep time in iterate_all_wait from 20ms to 5ms. Everything seems to still work with 5ms, and this greatly decreases the amount of time spent per test run, making oomer run much faster.
2020-04-26Skip invalid TCP relays and DHT nodes when loading save datazugz (tox)
2020-04-20Enable TCP relay test in Bazel and autotools build.iphydf
This test was fixed by @robinlinden, but not enabled in all builds.
2020-04-13Fix things not being initialized if creating a TCP-only networkRobin Linden
2020-03-29Fixes towards building on MSVC.iphydf
2020-03-27Mark conference test as small.iphydf
This used to take a long time, but is now very fast.
2020-03-18Add "member" invite responsezugz (tox)
This allows invitations to work in the case that the invitee is already in the group, which can happen if the group becomes split. Such an invitation is automatically accepted, leading to the peers becoming connected in the group and sharing peer lists.
2020-03-15Add another bootstrap node to the bootstrap test.iphydf
Hopefully not both will be down at the same time.
2020-03-14Use spdx license identifier instead of GPL blurb.iphydf
2020-03-14use -1 rather than ~0 in unsigned integer typeszugz (tox)
Using ~0 involves a bitwise operation on int, so depends on the internal representation of signed integers.
2020-03-12Use rules_cc instead of native cc_library rules.iphydf
2020-03-02Upgrade bazel to 2.1.1.iphydf
Removed av_test, because it depends on an ancient opencv that starts to really not exist on modern systems anymore.
2020-01-02synchronize call control actions to tox_iteratesudden6
2019-11-17Allow Bazel to rerun tests marked as flakyRobin Linden
2019-11-02Update tests to use a working bootstrap nodeRobin Linden
2019-05-19add configurable limit on number of stored frozen peerszugz (tox)
2019-05-01add undef guard in tox_many_tcp_testsudden6
This fixes an redefinition error when creating amalgamation.cc during static analysis
2019-04-01Disable failing TCP server testzugz (tox)
The test's intermittent failure may well be exposing a real bug in the TCP relay and/or onion systems, but we can't find the bug, and keeping the test is disrupting our CI.
2019-02-10add API function to test whether av is enabledzugz (tox)
2019-02-10Expose api functions for enabling and disabling AV in AV groupszugz (tox)
A group loaded from a savefile starts with AV disabled.
2019-01-03Added test and patch for VLA stack overflow vuln.zoff99
Also added and used the new crypto_malloc and crypto_free. The latter also zeroes out the memory safely. The former only exists for symmetry (static analysis can detect asymmetric usages).
2018-11-29Implement conferences savingzugz (tox)
* add global friend_connection status callback, used for group rejoining * stop leaving groups on killing tox
2018-11-23Avoid format truncation in save compatibility testzugz (tox)
(without this, gcc-8.2.0 issues a warning)
2018-10-20Make saving and loading the responsibility of Tox rather than Messengerzugz (tox)
2018-10-11ensure save data unchanged after save and loadzugz (tox)
2018-10-09Consistently use camel case enum names.iphydf
Including in tests and implementation files.
2018-10-06Avoid use of IPv6 in tests if not supported (e.g. on Travis).iphydf
2018-09-25Use a working DHT node for bootstrap tests.iphydf
A lot of bootstrap nodes are down :(.
2018-09-20Send rejoin packets on conference disconnectionzugz (tox)
We were mistakenly not making a rejoin attempt on freezing connections due to all closest connections going down. This fixes that, and tweaks the test. I've still only done tens rather than hundreds of tests, but I'm fairly confident that the conference test now consistently passes.
2018-09-19Fix typosyangfl
2018-09-14Standardise header guards.iphydf
Using the full path including the repo name.
2018-09-14Use run_auto_test fixture in typing_test.chugbubby
2018-09-08Use `(void)` for empty parameter lists in C.iphydf
Because `()` means "some unknown number of parameters".
2018-09-05Add mechanism for recovering from disconnections in conferenceszugz
* add freezing and unfreezing of peers * add rejoin packet * revise handling of temporary invited connections * rename "peer kill" packet to "peer leave" packet * test rejoining in conference test * use custom clock in conference test
2018-09-03Avoid use of global mutable state in mono_time on win32.iphydf
This uses a trick to get read-write access to `this` from a `const` member function, similar to C++ `mutable`, but uglier.
2018-08-31Use test clock in run_auto_test tests and dht testzugz (tox)
2018-08-27try ipv6 connections even after udp timeoutzugz (tox)
Also adds a test (auto_reconnect_test) which fails without this change.
2018-08-26Update copyright to 2018.iphydf
2018-08-26Call `abort` instead of `exit` on test failure.iphydf
This raises a signal, so we can more easily catch it with gdb.
2018-08-25Run save_compatibility_test in the autotools build.iphydf
2018-08-25Fix the `PORT_ALLOC` failure of `save_compatibility_test`.iphydf
`tox_new_log` has a much larger range of ports it can select from.
2018-08-25Use do-while instead of while in tests.iphydf
This forces all the loop bodies to be executed at least once, which is harmless since it just means one more tox event loop iteration. This reduces the jitter we see in coverage measurements, which is partially caused by loops sometimes being entered and sometimes not (because their condition happens to randomly already be true).
2018-08-25Stop using massive macros in `toxav_basic_test`.iphydf
Turned a huge macro into a function. Macros are a pain to debug.
2018-08-25Fix auto_tests Makefilezugz (tox)
* specify correct source files * add save_compatibility_test (commented out for now) * reformat TESTS to one line per test, and set check_PROGRAMS := TESTS * add run_auto_test.h to EXTRA_DIST * Fix `AUTO_TEST_CFLAGS` -> `AUTOTEST_CFLAGS`.
2018-08-22Add check to make sure tox was created successfullyendoffile78
2018-08-19Avoid redefining macros from different files.iphydf
2018-08-19Make the save_compatibility_test work with bazel.iphydf
2018-08-19Add save file generator, save compatibility test, and generate a save fileendoffile78
2018-08-16Use per-instance `Mono_Time` for Messenger and onion.iphydf
2018-08-16Reduce the number of times `unix_time_update` is called.iphydf
Reduced by, e.g.: * `file_transfer_test`: 33% of the `clock_gettime` calls. * `tox_many_test`: 53% of the `clock_gettime` calls. Other tests will see similar improvements. Real world applications will be closer to 40-50% improvement, since tox_many_test has 100 nodes, while file_transfer_test has 2 nodes.