summaryrefslogtreecommitdiffstats
path: root/src/fuzz/fuzz-main.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-03-11 09:22:28 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-03-11 16:33:59 +0100
commitb872843c4db1bb8677c9e1ed8c8c65167181adba (patch)
tree7bb9e07c15fd84fbac0b5d2f34384f5d4c8f2303 /src/fuzz/fuzz-main.c
parentfuzz: skip bus error map in bus_error_name_to_errno() (diff)
downloadsystemd-b872843c4db1bb8677c9e1ed8c8c65167181adba.tar.xz
systemd-b872843c4db1bb8677c9e1ed8c8c65167181adba.zip
fuzz: allow logging to be configured, disable in fuzz-unit-file
fuzz-unit-file generated too much logs about invalid config lines. This just slows things down and fills the logs. If necessary, it's better to rerun the interesting cases with SYSTEMD_LOG_LEVEL=debug.
Diffstat (limited to 'src/fuzz/fuzz-main.c')
-rw-r--r--src/fuzz/fuzz-main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/fuzz/fuzz-main.c b/src/fuzz/fuzz-main.c
index 45e46907e2..cace47ba22 100644
--- a/src/fuzz/fuzz-main.c
+++ b/src/fuzz/fuzz-main.c
@@ -33,6 +33,9 @@ int main(int argc, char **argv) {
char *name;
log_set_max_level(LOG_DEBUG);
+ log_parse_environment();
+ log_open();
+
for (i = 1; i < argc; i++) {
_cleanup_free_ char *buf = NULL;
@@ -47,5 +50,6 @@ int main(int argc, char **argv) {
(void) LLVMFuzzerTestOneInput((uint8_t*)buf, size);
printf("ok\n");
}
+
return EXIT_SUCCESS;
}