diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-04-17 15:54:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-17 15:54:10 +0200 |
commit | 2cb36f7c1e4672df2b47bffab3b7d65216915992 (patch) | |
tree | b4f0fa07c1cd3ffe34d7624efe27ad98eaa2da82 /src/test/test-sched-prio.c | |
parent | 79a4beb39f16ae47213e42145bda2ea64bee9987 (diff) | |
parent | 7e4a49b42b2f4fb3a621dc89a4a76e330a9aebe9 (diff) | |
download | systemd-2cb36f7c1e4672df2b47bffab3b7d65216915992.tar.gz |
Merge pull request #8575 from keszybz/non-absolute-paths
Do not require absolute paths in ExecStart and friends
Diffstat (limited to 'src/test/test-sched-prio.c')
-rw-r--r-- | src/test/test-sched-prio.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/test/test-sched-prio.c b/src/test/test-sched-prio.c index cede70b053..7d8fc445ec 100644 --- a/src/test/test-sched-prio.c +++ b/src/test/test-sched-prio.c @@ -40,8 +40,7 @@ int main(int argc, char *argv[]) { assert_se(manager_startup(m, serial, fdset) >= 0); /* load idle ok */ - assert_se(manager_load_unit(m, "sched_idle_ok.service", NULL, NULL, &idle_ok) >= 0); - assert_se(idle_ok->load_state == UNIT_LOADED); + assert_se(manager_load_startable_unit_or_warn(m, "sched_idle_ok.service", NULL, &idle_ok) >= 0); ser = SERVICE(idle_ok); assert_se(ser->exec_context.cpu_sched_policy == SCHED_OTHER); assert_se(ser->exec_context.cpu_sched_priority == 0); @@ -49,8 +48,7 @@ int main(int argc, char *argv[]) { /* * load idle bad. This should print a warning but we have no way to look at it. */ - assert_se(manager_load_unit(m, "sched_idle_bad.service", NULL, NULL, &idle_bad) >= 0); - assert_se(idle_bad->load_state == UNIT_LOADED); + assert_se(manager_load_startable_unit_or_warn(m, "sched_idle_bad.service", NULL, &idle_bad) >= 0); ser = SERVICE(idle_ok); assert_se(ser->exec_context.cpu_sched_policy == SCHED_OTHER); assert_se(ser->exec_context.cpu_sched_priority == 0); @@ -59,8 +57,7 @@ int main(int argc, char *argv[]) { * load rr ok. * Test that the default priority is moving from 0 to 1. */ - assert_se(manager_load_unit(m, "sched_rr_ok.service", NULL, NULL, &rr_ok) >= 0); - assert_se(rr_ok->load_state == UNIT_LOADED); + assert_se(manager_load_startable_unit_or_warn(m, "sched_rr_ok.service", NULL, &rr_ok) >= 0); ser = SERVICE(rr_ok); assert_se(ser->exec_context.cpu_sched_policy == SCHED_RR); assert_se(ser->exec_context.cpu_sched_priority == 1); @@ -69,8 +66,7 @@ int main(int argc, char *argv[]) { * load rr bad. * Test that the value of 0 and 100 is ignored. */ - assert_se(manager_load_unit(m, "sched_rr_bad.service", NULL, NULL, &rr_bad) >= 0); - assert_se(rr_bad->load_state == UNIT_LOADED); + assert_se(manager_load_startable_unit_or_warn(m, "sched_rr_bad.service", NULL, &rr_bad) >= 0); ser = SERVICE(rr_bad); assert_se(ser->exec_context.cpu_sched_policy == SCHED_RR); assert_se(ser->exec_context.cpu_sched_priority == 1); @@ -79,8 +75,7 @@ int main(int argc, char *argv[]) { * load rr change. * Test that anything between 1 and 99 can be set. */ - assert_se(manager_load_unit(m, "sched_rr_change.service", NULL, NULL, &rr_sched) >= 0); - assert_se(rr_sched->load_state == UNIT_LOADED); + assert_se(manager_load_startable_unit_or_warn(m, "sched_rr_change.service", NULL, &rr_sched) >= 0); ser = SERVICE(rr_sched); assert_se(ser->exec_context.cpu_sched_policy == SCHED_RR); assert_se(ser->exec_context.cpu_sched_priority == 99); |