From f5a58cccc2dad567ddda2fe621f21352781852f0 Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Mon, 23 Mar 2020 22:05:02 +0100 Subject: [PATCH] Fuzzing: ignore logging output from QColorSpace Change-Id: Ica549be24c8873854934f4ba24f2b3f7cb077e25 Reviewed-by: Allan Sandfeld Jensen --- .../gui/painting/qcolorspace/fromiccprofile/main.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/libfuzzer/gui/painting/qcolorspace/fromiccprofile/main.cpp b/tests/libfuzzer/gui/painting/qcolorspace/fromiccprofile/main.cpp index f663727d1a..8a588c6e21 100644 --- a/tests/libfuzzer/gui/painting/qcolorspace/fromiccprofile/main.cpp +++ b/tests/libfuzzer/gui/painting/qcolorspace/fromiccprofile/main.cpp @@ -26,14 +26,16 @@ ** ****************************************************************************/ +#include + #include #include -// Run this with -// QT_LOGGING_RULES="qt.gui.icc=false" -// to reduce noise and increase speed. - extern "C" int LLVMFuzzerTestOneInput(const char *data, size_t size) { + // to reduce noise and increase speed + static char quiet[] = "QT_LOGGING_RULES=qt.gui.icc=false"; + static int pe = putenv(quiet); + Q_UNUSED(pe) static int argc = 3; static char arg1[] = "fuzzer"; static char arg2[] = "-platform";