manager: initialize timeouts when allocating a naked Manager object
This way we can safely run manager objects from tests and good timeouts apply. Without this all timeouts are set 0, which means they fire instantly, when run from tests which do not explicitly configure them (the way main.c does).
This commit is contained in:
@@ -616,6 +616,9 @@ int manager_new(UnitFileScope scope, unsigned test_run_flags, Manager **_m) {
|
||||
m->default_timer_accuracy_usec = USEC_PER_MINUTE;
|
||||
m->default_tasks_accounting = true;
|
||||
m->default_tasks_max = UINT64_MAX;
|
||||
m->default_timeout_start_usec = DEFAULT_TIMEOUT_USEC;
|
||||
m->default_timeout_stop_usec = DEFAULT_TIMEOUT_USEC;
|
||||
m->default_restart_usec = DEFAULT_RESTART_USEC;
|
||||
|
||||
#ifdef ENABLE_EFI
|
||||
if (MANAGER_IS_SYSTEM(m) && detect_container() <= 0)
|
||||
|
||||
Reference in New Issue
Block a user