tests/sched/deadline: Fix precision rollover
The deadline scheduler as of commit ef626571 ("kernel/sched: Optimize deadline comparison") got an optimization that requires that the the cycle difference of the deadline time of the "first" and "last" runnable thread never be higher than 2^31. The test code here was masking off the bottom 31 bits of the generated deadlines, so it looked OK. But because the actual setting of the deadline values takes time too, it was still possible to select values that would roll over. The window was VERY small, but the RNG on one platform (up_squared) hit it. Shrink the selected deadlines to live in a 30 bit space for safety. Fixes #31508 Signed-off-by:Andy Ross <andrew.j.ross@intel.com>
Loading
Please sign in to comment