Commit Graph

3 Commits

Author SHA1 Message Date
iphydf
86a528a37a
chore: Add a .clang-format that mostly agrees with astyle. 2022-02-21 16:16:16 +00:00
iphydf
2570ddcb17
Fix errors on error paths found by oomer.
* 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-05-02 21:47:08 +01:00
iphydf
3ef1f839fc
Add some tests for our ring_buffer implementation.
These can serve as documentation until we write actual api docs, probably
using apidsl.
2018-07-04 10:37:46 +00:00