cyclictest problem/bug as non-root

HI !

 minor bug in cyclictest but potential causing confusion on cyclictest
 resuults when running as non-root user.

Setup:
 if one sets the rtprio in /etc/security/limits.conf to something below
 prio max - like:

 @hofrat          hard    rtprio          10
 @hofrat          soft    rtprio          10

 but then starts cylictest with -p 80 cyclictest will not fuss and also
 display priority 80 (as it uses par->prio in print_stat) but effectively
 runs with prio 0 as the return value of sched_setscheduler is not being
 checked in timerthread), resulting in semingly bad scheduling jitter values.

 So maybe cyclictest should take the effective maximum schduling priority
 of the user and not the scheduling policy maximum. Not sur if the check
 in timerthread is actually really needed - but it should not hurt ither.
 patch below (against current git) at "works for me" quality.

thx!
hofrat
1 file changed
tree: 030535109f3753a7397a497094ce2efc6492fe8f
  1. doc/
  2. scripts/
  3. src/
  4. .gitignore
  5. COPYING
  6. Makefile
  7. rt-tests.spec-in