summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Loehning <robert.loehning@qt.io>2019-03-11 13:37:29 +0100
committerRobert Loehning <robert.loehning@qt.io>2019-03-13 11:18:40 +0000
commiteb25acc05b177c49eb81b190a476854fbf3c6fb1 (patch)
treebb57e269dc4e3d6ea14d52d66ad033f6ada4f439
parentfed9fa171496fd24b264ef66e3e517d988fa3105 (diff)
Improve project files of libfuzzer tests
Change-Id: I7977beb1bbc142326a3cc48435b91ec7293e2cff Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
-rw-r--r--tests/libfuzzer/README4
-rw-r--r--tests/libfuzzer/corelib/serialization/qxmlstream/qxmlstreamreader/readnext/readnext.pro4
-rw-r--r--tests/libfuzzer/gui/text/qtextdocument/setHtml/setHtml.pro3
3 files changed, 6 insertions, 5 deletions
diff --git a/tests/libfuzzer/README b/tests/libfuzzer/README
index ed668ff9e2..7327e76eff 100644
--- a/tests/libfuzzer/README
+++ b/tests/libfuzzer/README
@@ -12,7 +12,9 @@ data which triggered the crash. You can then use this to debug and fix the calle
To run a test with libFuzzer:
-1. Install libFuzzer, e.g. from the repositories of the Linux distribution you are using.
+1. Install clang 5.0 or later, e.g. from the repositories of the Linux distribution you are using.
+ Depending on the version of clang and the source you are installing from, you might have to
+ install libFuzzer for this version of clang explicitly.
2. Make sure clang and clang++ from this version of clang are found in PATH.
3. Configure Qt with
-platform linux-clang -coverage trace-pc-guard
diff --git a/tests/libfuzzer/corelib/serialization/qxmlstream/qxmlstreamreader/readnext/readnext.pro b/tests/libfuzzer/corelib/serialization/qxmlstream/qxmlstreamreader/readnext/readnext.pro
index 8c890f5b6e..2fda3ecefd 100644
--- a/tests/libfuzzer/corelib/serialization/qxmlstream/qxmlstreamreader/readnext/readnext.pro
+++ b/tests/libfuzzer/corelib/serialization/qxmlstream/qxmlstreamreader/readnext/readnext.pro
@@ -1,5 +1,5 @@
QT -= gui
-CONFIG += c++11 console
+CONFIG += console
CONFIG -= app_bundle
SOURCES += main.cpp
-LIBS += -lFuzzer
+LIBS += -fsanitize=fuzzer
diff --git a/tests/libfuzzer/gui/text/qtextdocument/setHtml/setHtml.pro b/tests/libfuzzer/gui/text/qtextdocument/setHtml/setHtml.pro
index 2602f16dc7..c9b14f6caf 100644
--- a/tests/libfuzzer/gui/text/qtextdocument/setHtml/setHtml.pro
+++ b/tests/libfuzzer/gui/text/qtextdocument/setHtml/setHtml.pro
@@ -1,4 +1,3 @@
QT += widgets
-CONFIG += c++11
SOURCES += main.cpp
-LIBS += -lFuzzer
+LIBS += -fsanitize=fuzzer