summaryrefslogtreecommitdiff
path: root/src/fuzz
diff options
context:
space:
mode:
authorEvgeny Vereshchagin <evvers@ya.ru>2018-11-27 21:57:33 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2018-11-28 10:10:09 +0900
commit95ccf1aa5f440d8310050a71234ab57386ec223a (patch)
tree7df875278d9b1e2b5cd8abe21764e40b3326e630 /src/fuzz
parente849ae95243e54fac05990ffab5ff386a5a881ff (diff)
downloadsystemd-95ccf1aa5f440d8310050a71234ab57386ec223a.tar.gz
tests: suppress "unwanted log lines" in several fuzzers
According to https://oss-fuzz.com/fuzzer-stats/by-fuzzer/fuzzer/libFuzzer/job/libfuzzer_asan_systemd, fuzz-network-parser, fuzz-netdev-parser and fuzz-journal-remote produce a lot of unwanted log lines. Let's set the maximum log level to LOG_CRIT as we do in the other fuzzers.
Diffstat (limited to 'src/fuzz')
-rw-r--r--src/fuzz/fuzz-journal-remote.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/fuzz/fuzz-journal-remote.c b/src/fuzz/fuzz-journal-remote.c
index 432c687bc0..3ab4eb07fa 100644
--- a/src/fuzz/fuzz-journal-remote.c
+++ b/src/fuzz/fuzz-journal-remote.c
@@ -29,6 +29,9 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
if (size <= 2)
return 0;
+ if (!getenv("SYSTEMD_LOG_LEVEL"))
+ log_set_max_level(LOG_CRIT);
+
assert_se((fdin = memfd_new_and_map("fuzz-journal-remote", size, &mem)) >= 0);
memcpy(mem, data, size);
assert_se(munmap(mem, size) == 0);