Skip to content

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

Merged
fdesbiens merged 1 commit into
eclipse-threadx:devfrom
fdesbiens:fix/windows-wait-abort-isr-resonance
Nov 6, 2026
Merged

fdesbiens merged 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>
@fdesbiens
fdesbiens merged commit 33884b8 into eclipse-threadx:dev Nov 6, 2026
11 checks passed
fdesbiens added a commit that referenced this pull request Nov 6, 2026
…#836)

The Module Manager host tests compile the Cortex-A7 and Cortex-M4 module ports'
headers, which stop with "Compiler not supported." unless the compiler is IAR, AC5
or GNU-compatible. Their CMake also passes GCC-only flags such as -Wextra and
-include. MSVC therefore cannot build them, and with them in the tree the Windows
regression build failed before running any test. No CI job builds the Windows
tree, so the break went unnoticed.

The test tree now adds the module_manager directory only when the compiler is not
MSVC, as it already does only outside the MISRA configurations. Translating the
flags to MSVC equivalents was considered and rejected because the port headers'
compiler check still fails.

On dev, scripts/build_tx.ps1 stops with MSVC error D8021 on -Wextra. With the flags
translated, all 19 compile failures are that "Compiler not supported." error. With
this change, the unmodified scripts build all five configurations on win32 and win64,
and the only failing test is threadx_thread_wait_abort_and_isr_test, which #835
fixes. On Linux with GCC, all 13 Module Manager tests still build and pass.

Assisted-by: Claude Code (Opus 5.5) <noreply@anthropic.com>
fdesbiens added a commit that referenced this pull request Nov 6, 2026
CI ran the regression suites on Linux only, so nothing built the Win32, Win64 or
SMP Win64 simulator ports or the Windows test tree. A build break in the test tree
and a test that timed out on the Windows simulators both went unnoticed.

The new workflow runs the ThreadX suite on the Win32 and Win64 simulators and the
SMP suite on the Win64 SMP simulator, on windows-2022, through the PowerShell build
and test scripts used locally. It raises the scripts' per-configuration build timeout
to 5 minutes for hosted runners and uploads ctest logs and timeout diagnostics when
a job fails. It depends on #835 and #836 to pass.

Run on a fork branch holding #835, #836 and this workflow, all three jobs passed:
Win32 and Win64 104/104 and SMP Win64 118/118 in each of five configurations. The
jobs took 4 to 7 minutes, with builds of 2m20s to 3m53s and test runs of 52s to
4m45s.

Assisted-by: Claude Code (Opus 5.5) <noreply@anthropic.com>
@fdesbiens
fdesbiens deleted the fix/windows-wait-abort-isr-resonance branch November 6, 2026 17:41
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