rt-tests / cyclictest: Make cyclictest fail if it cannot run with requested priority.
Currently if a non-root user requests a priority higher than the soft limit in
the call to sched_setscheduler will silently fail and the user will be running
with priority of 0. Cyclictest will not complain, and display the
requested priority resulting in seemingly poor results.
The following patch fixes this by doing two things.
1. If the requested priority is higher than the soft limit but lower than the
hard limit, it will raise the soft limit to the requested priority.
2. If the requested priority is higher than the hard limit, it will fail with a
The patch should not affect privileged users.
Reported-by: Nicholas Mc Guire <email@example.com>
Signed-off-by: John Kacur <firstname.lastname@example.org>
1 file changed