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.
char *name;
log_set_max_level(LOG_DEBUG);
+ log_parse_environment();
+ log_open();
+
for (i = 1; i < argc; i++) {
_cleanup_free_ char *buf = NULL;
(void) LLVMFuzzerTestOneInput((uint8_t*)buf, size);
printf("ok\n");
}
+
return EXIT_SUCCESS;
}
if (!unit_vtable[t]->load)
return 0;
+ /* We don't want to fill the logs with messages about parse errors.
+ * Disable most logging if not running standalone */
+ if (!getenv("SYSTEMD_LOG_LEVEL"))
+ log_set_max_level(LOG_CRIT);
+
assert_se(manager_new(UNIT_FILE_SYSTEM, MANAGER_TEST_RUN_MINIMAL, &m) >= 0);
name = strjoina("a.", unit_type_to_string(t));