Skip to content

Stopped the wait-abort ISR test timing out on the Windows simulators - #835

Open
fdesbiens wants to merge 1 commit into
eclipse-threadx:devfrom
fdesbiens:fix/windows-wait-abort-isr-resonance
Open

fdesbiens wants to merge 1 commit into
eclipse-threadx:devfrom
fdesbiens:fix/windows-wait-abort-isr-resonance

Conversation

@fdesbiens

Copy link
Copy Markdown
Contributor

threadx_thread_wait_abort_and_isr_test waits for a timer interrupt to arrive while preemption is disabled. On the Windows simulators each tick wakes thread 0 from the same point and the next tick follows a fixed interval later, so the interrupt rarely finds it in the window and the test outlives ctest's 20-second timeout. Run standalone on dev, it passed 10 of 40 runs. The Linux build breaks this resonance with an interrupt injector; Windows had nothing.

On Windows, thread 0 now does a pseudo-random 0 to 4,095 iterations of work before each wait, so each tick finds it at a different point in its cycle. Other ports are unchanged. A Windows injector that re-armed the port's timer early was rejected because it fixed one port and not the other.

Standalone, the test passes 12/12 per port on dev's win32 and win64 ports, reaching all ten windows in at most 9 seconds and usually under one, and 12/12 per port with #833 and #834 applied. The win32 and win64 suites pass 104/104 in all five configurations, with this test reaching ten windows in 0 to 10 seconds.

threadx_thread_wait_abort_and_isr_test waits for a timer interrupt to arrive while
preemption is disabled. On the Windows simulators each tick wakes thread 0 from the
same point and the next tick follows a fixed interval later, so the interrupt
rarely finds it in the window and the test outlives ctest's 20-second timeout. Run
standalone on dev, it passed 10 of 40 runs. The Linux build breaks this resonance
with an interrupt injector; Windows had nothing.

On Windows, thread 0 now does a pseudo-random 0 to 4,095 iterations of work before
each wait, so each tick finds it at a different point in its cycle. Other ports are
unchanged. A Windows injector that re-armed the port's timer early was rejected
because it fixed one port and not the other.

Standalone, the test passes 12/12 per port on dev's win32 and win64 ports, reaching
all ten windows in at most 9 seconds and usually under one, and 12/12 per port with
eclipse-threadx#833 and eclipse-threadx#834 applied. The win32 and win64 suites pass 104/104 in all five
configurations, with this test reaching ten windows in 0 to 10 seconds.

Assisted-by: Claude Code (Opus 5.5) <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant