mirror of
https://github.com/systemd/systemd.git
synced 2025-01-11 09:18:07 +03:00
core: do not enumerate units in MANAGER_TEST_RUN_MINIMAL mode
In this mode we are not supposed to "interact with the environment", so loading all units and printing warnings about syntax errors and /var/run usage seems inappropriate.
This commit is contained in:
parent
bbd199c438
commit
b1d5246d29
@ -1378,6 +1378,9 @@ static void manager_enumerate_perpetual(Manager *m) {
|
||||
|
||||
assert(m);
|
||||
|
||||
if (m->test_run_flags == MANAGER_TEST_RUN_MINIMAL)
|
||||
return;
|
||||
|
||||
/* Let's ask every type to load all units from disk/kernel that it might know */
|
||||
for (c = 0; c < _UNIT_TYPE_MAX; c++) {
|
||||
if (!unit_type_supported(c)) {
|
||||
@ -1395,6 +1398,9 @@ static void manager_enumerate(Manager *m) {
|
||||
|
||||
assert(m);
|
||||
|
||||
if (m->test_run_flags == MANAGER_TEST_RUN_MINIMAL)
|
||||
return;
|
||||
|
||||
/* Let's ask every type to load all units from disk/kernel that it might know */
|
||||
for (c = 0; c < _UNIT_TYPE_MAX; c++) {
|
||||
if (!unit_type_supported(c)) {
|
||||
|
Loading…
Reference in New Issue
Block a user