Repository navigation
Guard remaining Nanvix VFS failures - #894
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates CPython’s test suite to account for known Nanvix VFS deviations by adding targeted unittest.skipIf(...) guards so the affected tests don’t fail on Nanvix.
Changes:
- Add NSKIP058 skips in
test_pathlibfor predicate tests impacted bystat(file/child)returningEINVALinstead ofENOTDIR. - Add an NSKIP034 skip in
test_genericpathfor a FATctime/mtimeordering assertion that fails on Nanvix.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| Lib/test/test_pathlib.py | Adds NSKIP058 skip decorators to multiple pathlib predicate tests affected by Nanvix VFS errno behavior. |
| Lib/test/test_genericpath.py | Skips test_filetime on Nanvix under NSKIP034 due to FAT timestamp ordering/resolution differences. |
Suppressed comments (7)
Lib/test/test_pathlib.py:2520
- This decorator skips the entire test on all Nanvix runs (
support.is_nanvix), but the NSKIP058 symptom is specific to the standalone VFS. Consider usingsupport.is_nanvix_standaloneto match the bug scope, and (to preserve coverage) guard only the failingfileA / 'bah'assertion rather than skipping the wholeis_dir()test.
# NSKIP058 https://github.com/nanvix/cpython/issues/893
@unittest.skipIf(support.is_nanvix,
"NSKIP058: stat below a regular file returns EINVAL instead of ENOTDIR")
Lib/test/test_pathlib.py:2536
- NSKIP058 is described as a standalone VFS
stat(file/child)errno mismatch; usingsupport.is_nanvixhere will also skip hosted Nanvix if this module’s NSKIP050 guard is ever removed. Consider switching tosupport.is_nanvix_standaloneand/or guarding only the affectedfileA / 'bah'assertion so the rest of theis_file()cases still run on Nanvix.
# NSKIP058 https://github.com/nanvix/cpython/issues/893
@unittest.skipIf(support.is_nanvix,
"NSKIP058: stat below a regular file returns EINVAL instead of ENOTDIR")
Lib/test/test_pathlib.py:2570
- This NSKIP058 guard uses
support.is_nanvixeven though the underlying errno mismatch is a standalone VFS behavior. Usingsupport.is_nanvix_standalonewould better match the issue scope and would allow hosted Nanvix coverage if the module-level NSKIP050 skip is relaxed later.
# NSKIP058 https://github.com/nanvix/cpython/issues/893
@unittest.skipIf(support.is_nanvix,
"NSKIP058: stat below a regular file returns EINVAL instead of ENOTDIR")
Lib/test/test_pathlib.py:2596
- NSKIP058 skips the entire
is_fifo_falsetest, but only thefileA/'bah'path is impacted by thestat(file/child)errno behavior. Consider guarding just that assertion (or moving it into a dedicated test) so the rest of the predicate checks still run on Nanvix.
# NSKIP058 https://github.com/nanvix/cpython/issues/893
@unittest.skipIf(support.is_nanvix,
"NSKIP058: stat below a regular file returns EINVAL instead of ENOTDIR")
Lib/test/test_pathlib.py:2624
- This NSKIP058 decorator uses
support.is_nanvix; if the failure is limited to the standalone VFS, prefersupport.is_nanvix_standaloneto avoid skipping hosted runs in the future, and consider guarding only the affectedfileA/'bah'assertion to retain coverage of the otheris_socket()predicate cases.
# NSKIP058 https://github.com/nanvix/cpython/issues/893
@unittest.skipIf(support.is_nanvix,
"NSKIP058: stat below a regular file returns EINVAL instead of ENOTDIR")
Lib/test/test_pathlib.py:2662
- This NSKIP058 skip currently removes all coverage for
is_block_device_false()on Nanvix. Since the errno mismatch is triggered by thefileA/'bah'path specifically, consider keeping the rest of the test running and only guarding that assertion; also consider usingsupport.is_nanvix_standaloneto reflect the standalone-only scope.
# NSKIP058 https://github.com/nanvix/cpython/issues/893
@unittest.skipIf(support.is_nanvix,
"NSKIP058: stat below a regular file returns EINVAL instead of ENOTDIR")
Lib/test/test_pathlib.py:2674
- Same as the other NSKIP058 sites: if this is a standalone-only VFS behavior, consider
support.is_nanvix_standalonerather thansupport.is_nanvix, and (to preserve coverage) guard only the failingfileA/'bah'assertion instead of skipping the entireis_char_device_false()test.
# NSKIP058 https://github.com/nanvix/cpython/issues/893
@unittest.skipIf(support.is_nanvix,
"NSKIP058: stat below a regular file returns EINVAL instead of ENOTDIR")
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This was referenced Aug 21, 2026
This was referenced Aug 24, 2026
ada-x64
marked this pull request as ready for review
August 24, 2026 15:24
re-enable tests for #329
There was a problem hiding this comment.
Review details
Suppressed comments (1)
Lib/test/test_genericpath.py:120
- NSKIP034 is linked to issue #514 (os.utime(times) not updating mtime/atime) and is used with that same message in other tests (e.g. Lib/test/test_os.py:819+), but here the skip reason is about ctime/mtime resolution and this test never calls os.utime(). To keep NSKIP codes searchable/consistent, either reuse the standard NSKIP034 message (and explain how it causes this ctime/mtime ordering assertion to fail) or introduce a new NSKIP code/issue link specific to the timestamp-resolution ordering problem.
# NSKIP034 https://github.com/nanvix/cpython/issues/514
@unittest.skipIf(support.is_nanvix,
"NSKIP034: FAT creation and modification times use different resolutions")
def test_filetime(self):
- Files reviewed: 3/3 changed files
- Comments generated: 1
- Review effort level: Lite
Comment on lines
245
to
+249
| # #323 wave 8 — regex and plistlib | ||
| "test_re", | ||
| "test_plistlib", | ||
| "test_pyexpat", | ||
| "test_xml_etree", |
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.
Summary
Guard the FAT
ctime/mtimeordering check under NSKIP034 and add NSKIP058 guards forpathlibpredicates affected bystat(file/child)returningEINVALinstead ofENOTDIR.Verification
Verified the full lifecycle on
tests/nskip-058-pathlib-enotdirat122147f4835against Nanvixdevat32419d6cc(0.23.49, clean release build). All 166 modules and release packaging passed.Refs #514
Refs #893