diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-03-11 09:22:28 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-03-11 16:33:59 +0100 |
commit | b872843c4db1bb8677c9e1ed8c8c65167181adba (patch) | |
tree | 7bb9e07c15fd84fbac0b5d2f34384f5d4c8f2303 /src/fuzz/fuzz-main.c | |
parent | fuzz: skip bus error map in bus_error_name_to_errno() (diff) | |
download | systemd-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.c | 4 |
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; } |