Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Unified Diff: testing/libfuzzer/getting_started.md

Issue 2290223003: libfuzzer: add documentation recommending how to silence error logging (Closed)
Patch Set: adjust title; make clear this is for chromium logging Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/libfuzzer/getting_started.md
diff --git a/testing/libfuzzer/getting_started.md b/testing/libfuzzer/getting_started.md
index cfe1ab25aa46f2a811c1c5f31da03e170d12dbd2..625097885a2933148980d6138b84fc9d0926b54c 100644
--- a/testing/libfuzzer/getting_started.md
+++ b/testing/libfuzzer/getting_started.md
@@ -104,6 +104,24 @@ You can specify custom `max_len` value to be used by ClusterFuzz. For more
information check out [Maximum Testcase Length] section of the [Efficient Fuzzer
Guide].
+## Disable noisy error message logging
+
+If the code that you are a fuzzing generates error messages when encountering
+incorrect or invalid data then you need to silence those errors in the fuzzer.
+
+If the target uses the Chromium logging APIs, the best way to do that is to
+override the environment used for logging in your fuzzer:
+
+```cpp
+struct Environment {
+ Environment() {
+ logging::SetMinLogLevel(logging::LOG_FATAL);
+ }
+};
+
+Environment* env = new Environment();
+```
+
## Submitting Fuzzer to ClusterFuzz
ClusterFuzz builds and executes all `fuzzer_test` targets in the source tree.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698