Skip to content

[Test] Suppress stock pytest-timeout to avoid conflict with pytest_hardtle#557

Merged
hughperkins merged 2 commits intomainfrom
hp/fix-timeout-conflict
Apr 24, 2026
Merged

[Test] Suppress stock pytest-timeout to avoid conflict with pytest_hardtle#557
hughperkins merged 2 commits intomainfrom
hp/fix-timeout-conflict

Conversation

@hughperkins
Copy link
Copy Markdown
Collaborator

Summary

  • Adds -p no:timeout before -p pytest_hardtle in run_tests.py to prevent stock pytest-timeout from loading when it's present in the Python environment.
  • Fixes the ValueError: Hook 'pytest_timeout_cancel_timer' is already registered crash seen on the AMD GPU runner, where pytest-timeout was left over in the tool cache.

Test plan

  • Verify AMD GPU CI passes (previously failing with ValueError)

Made with Cursor

…rdtle

The self-hosted AMD GPU runner has pytest-timeout installed in its
Python tool cache. When pytest_hardtle (our CFFI-based hard timeout
plugin) tries to register the same hooks, pytest raises a ValueError.
Adding `-p no:timeout` before `-p pytest_hardtle` prevents the
stock plugin from loading.
@hughperkins hughperkins force-pushed the hp/fix-timeout-conflict branch from 237bc4a to 2915739 Compare April 24, 2026 05:13
Explain why we suppress stock pytest-timeout (hook conflict) and why
we use pytest_hardtle (CFFI native signal handler kills GIL-held GPU hangs).
@hughperkins hughperkins force-pushed the hp/fix-timeout-conflict branch from b8bacf8 to f85f00b Compare April 24, 2026 17:28
@hughperkins hughperkins merged commit d067a8b into main Apr 24, 2026
66 of 67 checks passed
@hughperkins hughperkins deleted the hp/fix-timeout-conflict branch April 24, 2026 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant