Systemd/src/test
Holger Hans Peter Freyther bb11271068 sched: Only setting CPUSchedulingPriority=rr doesn't work
A service that only sets the scheduling policy to round-robin
fails to be started. This is because the cpu_sched_priority is
initialized to 0 and is not adjusted when the policy is changed.

Clamp the cpu_sched_priority when the scheduler policy is set. Use
the current policy to validate the new priority.

Change the manual page to state that the given range only applies
to the real-time scheduling policies.

Add a testcase that verifies this change:

$ make test-sched-prio; ./test-sched-prio
[test/sched_idle_bad.service:6] CPU scheduling priority is out of range, ignoring: 1
[test/sched_rr_bad.service:7] CPU scheduling priority is out of range, ignoring: 0
[test/sched_rr_bad.service:8] CPU scheduling priority is out of range, ignoring: 100
2012-11-15 16:16:45 +01:00
..
Makefile test: test tools should still be in the src/ directory 2012-04-12 13:48:01 +02:00
test-cgroup.c util: split-out path-util.[ch] 2012-05-08 02:33:10 +02:00
test-daemon.c test: test tools should still be in the src/ directory 2012-04-12 13:48:01 +02:00
test-date.c journalctl: implement --since= and --until for filtering by time 2012-10-11 16:43:37 +02:00
test-engine.c core: move ManagerRunningAs to shared 2012-09-18 19:53:34 +02:00
test-env-replace.c util: fix bad strstrip() return value in normalize_env_assignment() 2012-09-19 22:01:31 +02:00
test-hostname.c systemctl: automatically turn paths and unescaped unit names into proper unit names 2012-06-22 13:08:48 +02:00
test-id128.c test: test tools should still be in the src/ directory 2012-04-12 13:48:01 +02:00
test-install.c util: split-out path-util.[ch] 2012-05-08 02:33:10 +02:00
test-job-type.c test: correct enum misassignment 2012-07-22 23:53:48 +02:00
test-libudev.c use the same email address everywhere 2012-11-12 19:47:43 +01:00
test-log.c log: fix repeated invocation of vsnprintf()/vaprintf() in log_struct() 2012-09-24 23:26:46 +02:00
test-loopback.c test: test tools should still be in the src/ directory 2012-04-12 13:48:01 +02:00
test-ns.c namespace: rework namespace support 2012-08-13 15:27:04 +02:00
test-replace-var.c shared: add API for replacing @FOO@ style variables in strings 2012-11-14 22:21:16 +01:00
test-sched-prio.c sched: Only setting CPUSchedulingPriority=rr doesn't work 2012-11-15 16:16:45 +01:00
test-sleep.c logind: support for hybrid sleep (i.e. suspend+hibernate at the same time) 2012-10-28 00:50:35 +02:00
test-strv.c test: test tools should still be in the src/ directory 2012-04-12 13:48:01 +02:00
test-udev.c use the same email address everywhere 2012-11-12 19:47:43 +01:00
test-unit-file.c core: lift restriction on order of - and @ in ExecStart 2012-11-15 16:01:22 +01:00
test-unit-name.c test: extend unit-name test a bit 2012-09-12 08:31:08 +02:00
test-watchdog.c test: test tools should still be in the src/ directory 2012-04-12 13:48:01 +02:00