mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-20 10:48:06 +08:00
libtest: Improve the interrupt test timing
If no state change occurred during the test action, then assume a late interrupt.
This commit is contained in:
@@ -456,9 +456,16 @@ T_interrupt_test(const T_interrupt_test_config *config, void *arg)
|
||||
lower_bound[sample] = lower - delta;
|
||||
|
||||
sample = (sample + 1) % T_INTERRUPT_SAMPLE_COUNT;
|
||||
} else if (state == T_INTERRUPT_TEST_LATE) {
|
||||
} else if (state == T_INTERRUPT_TEST_LATE ||
|
||||
state == T_INTERRUPT_TEST_ACTION) {
|
||||
uint_fast32_t upper;
|
||||
|
||||
/*
|
||||
* If the state is T_INTERRUPT_TEST_ACTION, then there
|
||||
* was probably no interrupt during the action, so the
|
||||
* interrupt would be late.
|
||||
*/
|
||||
|
||||
lower_sum -= lower_bound[sample];
|
||||
lower_sum += busy;
|
||||
lower_bound[sample] = busy;
|
||||
|
||||
Reference in New Issue
Block a user