Fuzz mode as documented in https://github.com/google/fuzztest/blob/main/doc/quickstart-cmake.md doesn't work
- Dominant language
- C++
- Stars
- 1.1k
- Forks
- 137
- Avg merge
- 3d 6h
- Merged PRs (30d)
- 22
Description
I followed https://github.com/google/fuzztest/blob/main/doc/quickstart-cmake.md exactly. When I tried with `-DFUZZTEST_FUZZING_MODE=on` it turns out it doesn't actually work:
```
Note: Google Test filter = MyTestSuite.IntegerAdditionCommutes
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from MyTestSuite
[ RUN ] MyTestSuite.IntegerAdditionCommutes
FUZZTEST_PRNG_SEED=FEIOIwS7oGOzZwJD92Joo9IKQL1v4SFl1EB0uWiBrqU
[!] To fuzz, please build with --config=fuzztest.
/home/tmgarn/workspace/cmake_reproducer/fuzztest/./fuzztest/internal/googletest_adaptor.h:66: Failure
Expected equality of these values:
0
test->RunInFuzzingMode(argc_, argv_, configuration_)
Which is: 1
Fuzzing failure.
Stack trace:
0x559830210fb9: fuzztest::internal::GTest_TestAdaptor::TestBody()
0x5598302a1adb: testing::internal::HandleSehExceptionsInMethodIfSupported<>()
0x55983028633a: testing::internal::HandleExceptionsInMethodIfSupported<>()
0x559830264783: testing::Test::Run()
0x559830265380: testing::TestInfo::Run()
... Google Test internal frames ...
=================================================================
=== Fuzzing stats
Elapsed time: 2.231779ms
Total runs: 0
Edges covered: 0
Total edges: 0
Corpus size: 0
Max stack used: 0
==================================
```
Digging into the code it appears that this depends on something called "centipede" for which there is no code in the Cmake build system, only the bazel one seems to have support
Contributor guide
Assessment
This issue has not been assessed yet.