Skip to content

Add stress testing mode#2683

Merged
plajjan merged 1 commit intomainfrom
stress-test-mode
Mar 9, 2026
Merged

Add stress testing mode#2683
plajjan merged 1 commit intomainfrom
stress-test-mode

Conversation

@plajjan
Copy link
Contributor

@plajjan plajjan commented Mar 8, 2026

Acton's existing test flow is strong for functional correctness, but it can under-exercise concurrency faults when tests run in isolation. That is a blind spot for races in shared state, FFI boundaries, and C threading behavior where failures often require specific overlap timing. A dedicated stress mode is needed to repeatedly run the same test under coordinated parallel pressure so these bugs surface earlier and more reliably.

This adds a dedicated stress testing mode to acton test and integrates it through the CLI parser, test runner, runtime test executor, and documentation.

Stress mode runs one test function at a time at the outer runner layer, launches concurrent workers for that test, and skips reuse of cached results. Mode-specific defaults are now applied only when users omit flags: run keeps 50 ms behavior, perf defaults to 1 s, and stress defaults to --max-time 0 for continuous execution.

The stress executor now uses sync and drift worker cohorts, performs calibration from measured iteration durations, applies startup offsets, and reports richer live telemetry. Continuous stress runs refine phase granularity over time and include observed phase-bin coverage.

Interrupt handling was updated so Ctrl-C in stress mode returns valid partial results instead of failing the run.

A dedicated test project under test/test_stress was added with simple, racy FFI, and stress-only segfault fixtures to exercise stress behavior. The Acton guide now includes a separate stress testing chapter and links from performance testing docs.

Fixes #2577

Closes #1914

@plajjan plajjan force-pushed the stress-test-mode branch from 8377c18 to eed4ef6 Compare March 8, 2026 22:36
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8377c1879d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@plajjan plajjan force-pushed the stress-test-mode branch from eed4ef6 to 847a22b Compare March 8, 2026 22:47
@plajjan plajjan enabled auto-merge March 8, 2026 22:48
@plajjan plajjan disabled auto-merge March 8, 2026 22:54
Acton's existing test flow is strong for functional correctness, but it
can under-exercise concurrency faults when tests run in isolation.
That is a blind spot for races in shared state, FFI boundaries, and C
threading behavior where failures often require specific overlap timing.
A dedicated stress mode is needed to repeatedly run the same test under
coordinated parallel pressure so these bugs surface earlier and more
reliably.

This adds a dedicated stress testing mode to acton test and integrates
it through the CLI parser, test runner, runtime test executor, and
documentation.

Stress mode runs one test function at a time at the outer runner layer,
launches concurrent workers for that test, and skips reuse of cached
results. Mode-specific defaults are now applied only when users omit
flags: run keeps 50 ms behavior, perf defaults to 1 s, and stress
defaults to --max-time 0 for continuous execution.

The stress executor now uses sync and drift worker cohorts, performs
calibration from measured iteration durations, applies startup offsets,
and reports richer live telemetry. Continuous stress runs refine phase
granularity over time and include observed phase-bin coverage.

Interrupt handling was updated so Ctrl-C in stress mode returns valid
partial results instead of failing the run.

A dedicated test project under test/test_stress was added with simple,
racy FFI, and stress-only segfault fixtures to exercise stress behavior.
The Acton guide now includes a separate stress testing chapter and links
from performance testing docs.
@plajjan plajjan force-pushed the stress-test-mode branch from 847a22b to 351e0cf Compare March 9, 2026 06:08
@plajjan plajjan merged commit 0b0f3cd into main Mar 9, 2026
41 of 44 checks passed
@plajjan plajjan deleted the stress-test-mode branch March 9, 2026 06:51
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.

Add stress testing Run same test in parallel by multiple test executors

1 participant