Commit Graph

11 Commits

Author SHA1 Message Date
iphydf
4cea4f9ca4
fix: Make all the fuzzers work again, and add a test for protodump.
fuzz_select_target wasn't selecting anything, so fuzzers using that
function either did nothing or would only ever select one of the
functions.
2024-01-13 15:06:30 +00:00
iphydf
812f931d5f
fix: Make sure there's enough space for CONSUME1 in fuzzers. 2024-01-12 14:52:35 +00:00
iphydf
50f1b30fa9
test: Add fuzz tests to the coverage run.
So we don't need to write so many edge case tests ourselves for things
like parsers, which really don't need those manual tests, as long as we
can check for some properties like "can output the parsed data and it'll
be the same as the input".
2024-01-12 12:33:41 +00:00
iphydf
32b68cffca
cleanup: Some more test cleanups, removing overly smart code. 2024-01-10 12:42:37 +00:00
iphydf
a549807df7
refactor: Add mem module to allow tests to override allocators.
This will allow us to do more interesting things with memory allocation
within toxcore, and allow fuzzers to explore various allocation failure
paths.
2023-08-30 22:55:05 +00:00
iphydf
50094b7385
test: Add a protocol dump test to generate initial fuzzer input. 2022-04-19 23:42:47 +00:00
iphydf
debedb3c94
test: Add a Null_System used in toxsave_harness.
This does nothing but has a working simple RNG.
2022-04-14 19:04:25 +00:00
iphydf
cb34fe12d1
test: Add more functionality to the bootstrap harness.
Ideally this would be able to reach some of the events, so we can write
code to respond to those events, but so far only the friend request
event actually happens.
2022-04-07 20:17:56 +00:00
iphydf
941026266e
refactor: Allow overriding mono_time in tox_new.
This makes it so if mono_time is overridden, no monotonic time-related
system call is invoked in tox_new.
2022-04-03 22:48:16 +00:00
iphydf
dec1399776
test: Add fuzzer support functions for internal toxcore objects.
These help creating fuzzer fixtures with non-trivially constructed
objects and takes care of cleaning them up afterwards so the fuzzer code
can focus on the system under test.
2022-04-03 11:21:06 +00:00
iphydf
478ef39b39
test: Add some support functions to make writing fuzzers easier. 2022-03-27 18:43:41 +00:00