Skip to content

test(cuda.bindings): port the cuFile filesystem check fix to cuda_bindings_12 - #3664

Open
mdboom wants to merge 1 commit into
NVIDIA:mainfrom
mdboom:issue3592
Open

mdboom wants to merge 1 commit into
NVIDIA:mainfrom
mdboom:issue3592

Conversation

@mdboom

@mdboom mdboom commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

Closes #3592. Part of #2077.

Summary

Ten cuFile tests in cuda_bindings_12/tests/test_cufile.py skipped on every Linux CUDA 12 row with "cuFile handle_register requires ext4 or xfs filesystem". The cause is a bug in isSupportedFilesystem() that was fixed only in cuda_bindings_13 (#1271); the CUDA 12 tests were imported from the 12.9.x maintenance source (#3172) without it.

 def isSupportedFilesystem():
-    for each /proc/mounts entry:
-        if cwd.startswith(mount_point):      # "/" matches every path first
-            return fs_type in ["ext4", "xfs"] # -> the container's overlay root
+    fs_type = findmnt -no FSTYPE -T <cwd>   # the mount that actually contains cwd
+    return fs_type in ("ext4", "xfs")
  • The function is now byte-for-byte identical to the cuda_bindings_13 one; only the import subprocess it needs is added. Other differences between the two files are left alone.
  • Other bindings root: cuda_bindings_13 already has this fix, so no change is needed there.

Evidence

CI coverage: on main, these ten tests skip in all 12 Linux CUDA 12 configurations, while the cuda_bindings_13 copies (same findmnt check, same containers) pass on 20 Linux configurations. .github/workflows/test-wheel-linux.yml installs util-linux (which provides findmnt) on every Linux row. After this change the ten tests should run and pass on the Linux CUDA 12 rows:

test_handle_register, test_cufile_read_write, test_cufile_read_write_host_memory, test_cufile_read_write_large, test_cufile_read_async, test_cufile_write_async, test_cufile_async_read_write, test_batch_io_basic, test_batch_io_cancel, test_batch_io_large_operations

Locally (cuda-bindings 12.9.11, nvidia-cufile-cu12 1.14.1, ext4): the ten tests pass, and the whole test_cufile.py passes (21 passed).

Confirming in CI: in this PR's CI run, the Linux CUDA 12 cuda.bindings jobs should report the ten tests PASSED, where main reports them SKIPPED. For example:

gh run view <CI run id> --repo NVIDIA/cuda-python --log | grep -F "cuda_bindings_12/tests/test_cufile.py" | grep -cF "SKIPPED"   # expect 0 for these tests

Merge Danger

Door: two-way. Test-only change.

Blast Radius: cuda_bindings_12/tests/test_cufile.py. The cuFile tests now actually run on the Linux CUDA 12 rows, so a real cuFile problem there would fail instead of being skipped.

Reviewers: please feel free to push commits directly to this PR to improve it.

🤖 Generated with Claude Code

…dings_12

isSupportedFilesystem() in cuda_bindings_12 returned the filesystem type
of the first /proc/mounts entry whose mount point is a string prefix of
the current directory. "/" is a prefix of every path, so in CI containers
it saw the overlay root and skipped ten cuFile tests with "requires ext4
or xfs filesystem" on every Linux CUDA 12 row.

Port the findmnt-based check from cuda_bindings_13 (NVIDIA#1271), which asks the
kernel for the mount containing the directory. The function is now
identical in both roots.

Closes NVIDIA#3592.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mdboom mdboom added this to the cuda.bindings 13.6.0 & 12.9.12 milestone Nov 30, 2026
@mdboom mdboom added test Improvements or additions to tests cuda.bindings Everything related to the cuda.bindings module labels Nov 30, 2026
@mdboom mdboom self-assigned this Nov 30, 2026
@coderabbitai

coderabbitai Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Tests
    • Filesystem support checks now recognize only ext4 and xfs for the current directory. Errors while querying the filesystem are no longer handled by returning an unsupported result.

The CUDA 12 cuFile test helper now uses findmnt to query the filesystem for the current directory. It returns true only when the reported type is exactly ext4 or xfs.

Changes: CUDA 12 cuFile filesystem check

Layer / File(s) Summary
Query the current directory filesystem
cuda_bindings_12/tests/test_cufile.py
isSupportedFilesystem now queries findmnt for the current directory and accepts exact ext4 or xfs results. The /proc/mounts scan and exception handling are removed.

Assessment against linked issues

Objective Addressed Explanation
Port the findmnt-based filesystem check to CUDA 12 [#3592] ✅
Confirm the ten affected tests pass on Linux CUDA 12 configurations [#3592] ❓ No test-run results are provided.

Suggested labels: test, cuda.bindings

Suggested reviewers: rwgk

Change: Other

Merge Risk: Minimal · up to a6c1e

This change makes the CUDA 12 cuFile tests check the filesystem of the current directory, so they should run on ext4 and xfs instead of skipping. The only affected code is a test helper. CI confirmation that the ten tests no longer skip is still pending, but no concrete merge-blocking risk was found.

Security architecture risk: Minimal · up to a6c1e

The change affects which cuFile tests run, not how the shipped CUDA bindings operate. If the filesystem query fails, pytest can report a collection error instead of skipping the affected tests.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 44743b5 and a6c1e4c.

Files selected for processing: 1

  • cuda_bindings_12/tests/test_cufile.py

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 8 remain after this review.

Finishing Touches
Fix failing CI checks

  • Create a new PR

@mdboom
mdboom requested a review from rwgk November 30, 2026 20:38
@github-actions

Copy link
Copy Markdown
Contributor

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cuda.bindings Everything related to the cuda.bindings module test Improvements or additions to tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(cuda.bindings): port the cuFile filesystem check fix (#1271) to cuda_bindings_12

1 participant