]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
fuzz: switch fuzz-manager-serialize to MANAGER_TEST_RUN_MINIMAL
authorLuca Boccassi <bluca@debian.org>
Fri, 7 Jul 2023 21:49:31 +0000 (22:49 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Sat, 8 Jul 2023 09:41:44 +0000 (10:41 +0100)
When there is no access to cgroups MANAGER_TEST_RUN_BASIC will fail
to set up and assert. This happens on a build system like Debian's.
Switch to _MINIMAL which skips cgroup and other machine-wide setups.

src/core/fuzz-manager-serialize.c

index 04560341daad8c19ae6171fd230aee04c9f2e8ec..2f0c0c302988b6a653d3fcc10fe283f24df2202e 100644 (file)
@@ -21,7 +21,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
                 log_set_target(LOG_TARGET_NULL);
         }
 
-        assert_se(manager_new(RUNTIME_SCOPE_SYSTEM, MANAGER_TEST_RUN_BASIC, &m) >= 0);
+        assert_se(manager_new(RUNTIME_SCOPE_SYSTEM, MANAGER_TEST_RUN_MINIMAL, &m) >= 0);
         /* Set log overrides as well to make it harder for a serialization file
          * to switch log levels/targets during fuzzing */
         manager_override_log_level(m, log_get_max_level());