Skip to content

Serialize FFI tests that share panic state - #786

Draft
Anand Krishnamoorthi (anakrish) with Copilot wants to merge 3 commits into
mainfrom
copilot/fix-failing-github-actions-job
Draft

Serialize FFI tests that share panic state#786
Anand Krishnamoorthi (anakrish) with Copilot wants to merge 3 commits into
mainfrom
copilot/fix-failing-github-actions-job

Conversation

Copilot AI commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

The test Actions job intermittently failed when an FFI alias-compilation test ran concurrently with the panic-guard test. The latter temporarily sets a process-global poison flag observed by guarded FFI calls.

  • FFI test isolation
    • Run bindings/ffi tests with a single test thread.
    • Prevent the intentional poison-state test from contaminating unrelated FFI tests.
test_args.push(OsString::from("--"));
test_args.push(OsString::from("--test-threads=1"));

Co-authored-by: anakrish <35780660+anakrish@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix the failing GitHub Actions job test Serialize FFI tests that share panic state Aug 14, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR makes the bindings/ffi test suite run single-threaded to avoid intermittent failures caused by tests interacting through a process-global panic/poison state during concurrent execution.

Changes:

  • Pass -- --test-threads=1 to cargo test for bindings/ffi to serialize its Rust test harness.
  • Improve isolation of the intentional poison-state test so it doesn’t contaminate unrelated FFI tests running in the same crate test run.
Suppressed comments (1)

xtask/src/tasks/bindings/ffi.rs:169

  • The step label string no longer matches the actual invocation now that the test harness args include -- --test-threads=1. This can make CI logs misleading when diagnosing failures; update the label to reflect the full command.
        run_cargo_step(
            &ffi_dir,
            "cargo test --features contention_checks (bindings/ffi)",
            test_args,

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Co-authored-by: anakrish <35780660+anakrish@users.noreply.github.com>
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.

3 participants