Skip to content

Guard remaining Nanvix VFS failures - #894

Merged
ppenna merged 3 commits into
nanvix/v3.12.3from
tests/nskip-058-pathlib-enotdir
Aug 24, 2026
Merged

ppenna merged 3 commits into
nanvix/v3.12.3from
tests/nskip-058-pathlib-enotdir

Conversation

@ada-x64

@ada-x64 ada-x64 commented Aug 21, 2026

Copy link
Copy Markdown

Summary

Guard the FAT ctime/mtime ordering check under NSKIP034 and add NSKIP058 guards for pathlib predicates affected by stat(file/child) returning EINVAL instead of ENOTDIR.

Verification

Verified the full lifecycle on tests/nskip-058-pathlib-enotdir at 122147f4835 against Nanvix dev at 32419d6cc (0.23.49, clean release build). All 166 modules and release packaging passed.

Refs #514
Refs #893

Copilot AI lite review requested due to automatic review settings August 21, 2026 14:25

Copilot AI left a comment

Copy link
Copy Markdown

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 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_pathlib for predicate tests impacted by stat(file/child) returning EINVAL instead of ENOTDIR.
  • Add an NSKIP034 skip in test_genericpath for a FAT ctime/mtime ordering 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 using support.is_nanvix_standalone to match the bug scope, and (to preserve coverage) guard only the failing fileA / 'bah' assertion rather than skipping the whole is_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; using support.is_nanvix here will also skip hosted Nanvix if this module’s NSKIP050 guard is ever removed. Consider switching to support.is_nanvix_standalone and/or guarding only the affected fileA / 'bah' assertion so the rest of the is_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_nanvix even though the underlying errno mismatch is a standalone VFS behavior. Using support.is_nanvix_standalone would 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_false test, but only the fileA/'bah' path is impacted by the stat(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, prefer support.is_nanvix_standalone to avoid skipping hosted runs in the future, and consider guarding only the affected fileA/'bah' assertion to retain coverage of the other is_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 the fileA/'bah' path specifically, consider keeping the rest of the test running and only guarding that assertion; also consider using support.is_nanvix_standalone to 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_standalone rather than support.is_nanvix, and (to preserve coverage) guard only the failing fileA/'bah' assertion instead of skipping the entire is_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.

Comment thread Lib/test/test_pathlib.py Resolved
Comment thread Lib/test/test_genericpath.py Resolved
@ada-x64
ada-x64 marked this pull request as ready for review August 24, 2026 15:24
Copilot AI review requested due to automatic review settings August 24, 2026 15:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 thread .nanvix/src/config.py
Comment on lines 245 to +249
# #323 wave 8 — regex and plistlib
"test_re",
"test_plistlib",
"test_pyexpat",
"test_xml_etree",
@ppenna
ppenna merged commit 5f23600 into nanvix/v3.12.3 Aug 24, 2026
14 checks passed
@ppenna
ppenna deleted the tests/nskip-058-pathlib-enotdir branch August 24, 2026 16:46
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