summaryrefslogtreecommitdiffstats
path: root/src/journal/fuzz-journald-kmsg.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-05-05 16:44:52 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-05-05 17:15:04 +0200
commit7ecb052fb3d851b8e11324b738d4c1fbe1b4ab0b (patch)
treef91a6107ff4d2377559025cfa1df0f824368e69e /src/journal/fuzz-journald-kmsg.c
parentcore: fix crash in BPFProgram parsing (diff)
downloadsystemd-7ecb052fb3d851b8e11324b738d4c1fbe1b4ab0b.tar.xz
systemd-7ecb052fb3d851b8e11324b738d4c1fbe1b4ab0b.zip
fuzz-journald-kmsg: silence output as usual
Diffstat (limited to '')
-rw-r--r--src/journal/fuzz-journald-kmsg.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/journal/fuzz-journald-kmsg.c b/src/journal/fuzz-journald-kmsg.c
index 1b423d5cba..ec22f14ccb 100644
--- a/src/journal/fuzz-journald-kmsg.c
+++ b/src/journal/fuzz-journald-kmsg.c
@@ -10,6 +10,11 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
if (size == 0)
return 0;
+ /* We don't want to fill the logs with assert warnings.
+ * Disable most logging if not running standalone */
+ if (!getenv("SYSTEMD_LOG_LEVEL"))
+ log_set_max_level(LOG_CRIT);
+
dummy_server_init(&s, data, size);
dev_kmsg_record(&s, s.buffer, size);
server_done(&s);