Commit 681de45c authored by Darwin Huang's avatar Darwin Huang Committed by Commit Bot

fuzz: Mention minimizing test-cases more in docs.

Change-Id: I18866d9a69a846ebc5aed73200d643c386717d29
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1776930
Auto-Submit: Darwin Huang <huangdarwin@chromium.org>
Reviewed-by: default avatarVictor Costan <pwnall@chromium.org>
Reviewed-by: default avatarDarwin Huang <huangdarwin@chromium.org>
Reviewed-by: default avatarAbhishek Arya <inferno@chromium.org>
Commit-Queue: Abhishek Arya <inferno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#692979}
parent 782a4e6a
...@@ -44,8 +44,10 @@ then build and run the fuzzer. ...@@ -44,8 +44,10 @@ then build and run the fuzzer.
3. `gn args out/Fuzzer # Set arguments to matches those in the clusterfuzz "Detailed report"'s "GN CONFIG (ARGS.GN)" section` 3. `gn args out/Fuzzer # Set arguments to matches those in the clusterfuzz "Detailed report"'s "GN CONFIG (ARGS.GN)" section`
4. `autoninja -C out/Fuzzer/ ${FUZZER_NAME} # Build the fuzzer target` 4. `autoninja -C out/Fuzzer/ ${FUZZER_NAME} # Build the fuzzer target`
5. `./out/Fuzzer/${FUZZER_NAME} ${CLUSTERFUZZ_TESTCASE} # Verify repro by running fuzzer (for memory leaks, try setting "ASAN_OPTIONS=detect_leaks=1")` 5. `./out/Fuzzer/${FUZZER_NAME} ${CLUSTERFUZZ_TESTCASE} # Verify repro by running fuzzer (for memory leaks, try setting "ASAN_OPTIONS=detect_leaks=1")`
6. `LPM_DUMP_NATIVE_INPUT=1 SQL_SKIP_QUERIES=AlterTable ./out/Fuzzer/${FUZZER_NAME} ${CLUSTERFUZZ_TESTCASE} # Try using different args to get SQL statements that will repro the bug` 6. `LPM_DUMP_NATIVE_INPUT=1 SQL_SKIP_QUERIES=AlterTable ./out/Fuzzer/${FUZZER_NAME} ${CLUSTERFUZZ_TESTCASE} # Try using different args to get SQL statements that will repro the bug. SQL_SKIP_QUERIES can help minimize the repro`
7. Optionally, take output from (7) into a repro.sql file for further testing. 7. Optionally, minimize the testcase further using the `-minimize_crash`
[flag](https://chromium.googlesource.com/chromium/src/+/master/testing/libfuzzer/reproducing.md#minimizing-a-crash-input-optional).
8. Optionally, take output from (7) into a repro.sql file for further testing.
To do so, either copy the SQL query in the output from (6) into a .sql file, or To do so, either copy the SQL query in the output from (6) into a .sql file, or
run the final command in (7) with a `> repro.sql` at the end, and filter out run the final command in (7) with a `> repro.sql` at the end, and filter out
non-sql content afterwards. Either way, ensure that the case continues to repro non-sql content afterwards. Either way, ensure that the case continues to repro
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment