[PR #1338] check_d3d12_trace: capture fixture output in files so a timeout cannot wait for its children (OLD-9920) #1368

Open
opened 2026-11-26 20:21:00 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1338
Author: @ambroseautomation
Created: 11/24/2026
Status: 🔄 Open

Base: main ← Head: carry/old-9920-check-d3d12-trace-timeout


📝 Commits (2)

  • af93f4a check_d3d12_trace: finish communicate() after killing a timed-out fixture
  • 865d357 check_d3d12_trace: capture the fixture's output in files so a timeout cannot wait for its children

📊 Changes

2 files changed (+54 additions, -12 deletions)

View changed files

📝 runtime/test/check_d3d12_trace.py (+38 -12)
📝 tests/test_check_d3d12_trace.py (+16 -0)

📄 Description

Summary

Coordination item: OLD-9920 (carry-forward of old-pr/9920, preserving original author Sunkiller-qc across both commits).

Problem & Root Cause

In runtime/test/check_d3d12_trace.py, when a timed-out fixture was killed, calling communicate() on piped stdout/stderr could block indefinitely if a grandchild process inherited and kept the pipe handles open.

Implementation

  • Captures the fixture's stdout/stderr in temporary files rather than pipes in runtime/test/check_d3d12_trace.py and finishes waiting/cleanup after killing a timed-out fixture so grandchildren holding descriptors cannot block the runner.
  • Adds test_runner_timeout_does_not_wait_for_a_child_holding_the_output in tests/test_check_d3d12_trace.py.

Tests Run

Environment: Windows 11 Pro 64-bit, Python 3.12.10, synthetic fixtures only (no game data).

  • python -I -m py_compile runtime/test/check_d3d12_trace.py tests/test_check_d3d12_trace.py — PASS
  • pytest tests/test_check_d3d12_trace.py -v — 3 passed, 1 skipped (POSIX-only os.kill(pid, 0) check skipped on Windows; new test_runner_timeout_does_not_wait_for_a_child_holding_the_output PASSED)
  • python -I scripts/check_no_game_data.py runtime/test/check_d3d12_trace.py tests/test_check_d3d12_trace.py — PASS

Disclosure

AI-assisted: yes (carry-forward, rebase onto current main, and local verification; original implementation by Sunkiller-qc).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/1338 **Author:** [@ambroseautomation](https://github.com/ambroseautomation) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `carry/old-9920-check-d3d12-trace-timeout` --- ### 📝 Commits (2) - [`af93f4a`](https://github.com/ubiquitarianism/leonida/commit/af93f4a15e12620e86b38b3e6d2479ac68c8353b) check_d3d12_trace: finish communicate() after killing a timed-out fixture - [`865d357`](https://github.com/ubiquitarianism/leonida/commit/865d3579ac9a10db69489cd7c5e720b08f0e6177) check_d3d12_trace: capture the fixture's output in files so a timeout cannot wait for its children ### 📊 Changes **2 files changed** (+54 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `runtime/test/check_d3d12_trace.py` (+38 -12) 📝 `tests/test_check_d3d12_trace.py` (+16 -0) </details> ### 📄 Description ## Summary Coordination item: `OLD-9920` (carry-forward of `old-pr/9920`, preserving original author `Sunkiller-qc` across both commits). ### Problem & Root Cause In `runtime/test/check_d3d12_trace.py`, when a timed-out fixture was killed, calling `communicate()` on piped stdout/stderr could block indefinitely if a grandchild process inherited and kept the pipe handles open. ### Implementation - Captures the fixture's stdout/stderr in temporary files rather than pipes in `runtime/test/check_d3d12_trace.py` and finishes waiting/cleanup after killing a timed-out fixture so grandchildren holding descriptors cannot block the runner. - Adds `test_runner_timeout_does_not_wait_for_a_child_holding_the_output` in `tests/test_check_d3d12_trace.py`. ## Tests Run Environment: Windows 11 Pro 64-bit, Python 3.12.10, synthetic fixtures only (no game data). - `python -I -m py_compile runtime/test/check_d3d12_trace.py tests/test_check_d3d12_trace.py` — PASS - `pytest tests/test_check_d3d12_trace.py -v` — 3 passed, 1 skipped (POSIX-only `os.kill(pid, 0)` check skipped on Windows; new `test_runner_timeout_does_not_wait_for_a_child_holding_the_output` PASSED) - `python -I scripts/check_no_game_data.py runtime/test/check_d3d12_trace.py tests/test_check_d3d12_trace.py` — PASS ## Disclosure AI-assisted: yes (carry-forward, rebase onto current `main`, and local verification; original implementation by Sunkiller-qc). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#1368
No description provided.