Functions | |
fuzzer::Domain< Request > | pw::allocator::test::ArbitraryRequest (size_t max_size) |
template<size_t kMaxRequests, size_t kMaxSize> | |
auto | pw::allocator::test::ArbitraryRequests () |
template<size_t kIndex, typename... Args> | |
Request | pw::allocator::test::MakeRequest (Args... args) |
auto | pw::allocator::test::DefaultArbitraryRequests () |
Variables | |
constexpr size_t | pw::allocator::test::kMaxRequests = 256 |
constexpr size_t | pw::allocator::test::kMaxSize = 2048 |
fuzzer::Domain< Request > pw::allocator::test::ArbitraryRequest | ( | size_t | max_size | ) |
Returns a FuzzTest domain for producing arbitrary allocator requests.
This method integrates with FuzzTest to use code coverage to produce guided mutations.
See https://github.com/google/fuzztest/blob/main/doc/domains-reference.md
max_size | Size of the largest allocation that can be requested. |
auto pw::allocator::test::ArbitraryRequests | ( | ) |
Returns a FuzzTest domain for producing sequences of arbitrary allocator requests.
This method can be used to drive an AllocatorTestHarness
as part of a fuzz test.
See https://github.com/google/fuzztest/blob/main/doc/domains-reference.md
max_size | Size of the largest allocation that can be requested. |
Request pw::allocator::test::MakeRequest | ( | Args... | args | ) |
Builds an Request from an index and values.
Unfortunately, the reproducer emitted by FuzzTest for vectors of Requests cannot simply be copied and pasted. To create a reproducer, create a pw::Vector
of the appropriate size, and populate it using this method with the correct index.
For example, consider the following sample output:
A valid reproducer might be: