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.
This commit is contained in:
Evgeny Vereshchagin
2018-11-28 10:10:09 +09:00
committed by Yu Watanabe
parent e849ae9524
commit 95ccf1aa5f
3 changed files with 9 additions and 0 deletions
+3
View File
@@ -11,6 +11,9 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
_cleanup_fclose_ FILE *f = NULL;
_cleanup_(unlink_tempfilep) char netdev_config[] = "/tmp/fuzz-networkd.XXXXXX";
if (!getenv("SYSTEMD_LOG_LEVEL"))
log_set_max_level(LOG_CRIT);
assert_se(fmkostemp_safe(netdev_config, "r+", &f) == 0);
if (size != 0)
assert_se(fwrite(data, size, 1, f) == 1);