Repository navigation
Conversation
test_filestream_touch_atime_swallows_fstat_failure replaced os.fstat for the whole process. pytest 9.2 calls os.fstat in its fd output capture while the test runs, so the test failed under pytest 9.2.0 with the patched OSError raised from pytest's CaptureManager, although cuda.core swallowed its own fstat failure. Patch os, fstat included, only as cuda.core.utils._program_cache._file_stream sees it. Test change written with Claude Opus 5.5 and reviewed by the contributor. Signed-off-by: 0z5a <dezhen.lu@student.uni-tuebingen.de>
Contributor
|
No actionable comments were generated in the recent review. Summary
Change: Other Merge Risk:
|
mdboom
approved these changes
Nov 4, 2026
Contributor
|
/ok to test 739a818 |
Contributor
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Closes #3329.
The test for swallowing an
os.fstatfailure patches the process-wideosmodule. With pytest 9.2's file-descriptor capture, that also makes pytest's ownfstatfail. Replace the module only in_file_stream, forwarding other operations to the realosmodule while continuing to check that the cache read succeeds, the opened descriptor is closed, andutimeis not called.The issue is currently unassigned, and a maintainer has not yet requested or approved the implementation.
The test change was written with Claude Opus 5.5 and reviewed by the contributor.
Testing
On Linux aarch64 with Python 3.12.3,
cuda-core==1.2.2, andcuda-bindings==13.4.2:OSError: fstat refused; the threefilestream_touch_atimetests pass with this change._file_stream.pymatched the file at this PR's head by SHA-256. These targeted runs used--noconftest -c /dev/nullwith third-party plugins disabled, not the full repository test configuration; no GPU was used.git diff --check, passed.Checklist