File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -23,18 +23,20 @@ Add the test name on a new line in ``fuzz_tests.txt``.
23
23
24
24
In ``fuzzer.c ``, add a function to be run::
25
25
26
- int $test_name (const char* data, size_t size) {
26
+ static int $fuzz_test_name (const char* data, size_t size) {
27
27
...
28
28
return 0;
29
29
}
30
30
31
31
32
32
And invoke it from ``LLVMFuzzerTestOneInput ``::
33
33
34
- #if _Py_FUZZ_YES(fuzz_builtin_float )
35
- rv |= _run_fuzz(data, size, fuzz_builtin_float );
34
+ #if !defined(_Py_FUZZ_ONE) || defined(_Py_FUZZ_$fuzz_test_name )
35
+ rv |= _run_fuzz(data, size, $fuzz_test_name );
36
36
#endif
37
37
38
+ Don't forget to replace ``$fuzz_test_name `` with your actual test name.
39
+
38
40
``LLVMFuzzerTestOneInput `` will run in oss-fuzz, with each test in
39
41
``fuzz_tests.txt `` run separately.
40
42
You can’t perform that action at this time.
0 commit comments