From a6c1e4c9e3a6350f883ecf00190ff696fc83bf46 Mon Sep 17 00:00:00 2001 From: Michael Droettboom Date: Mon, 30 Nov 2026 15:34:20 -0500 Subject: [PATCH 1/2] test(cuda.bindings): port the cuFile filesystem check fix to cuda_bindings_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 (#1271), which asks the kernel for the mount containing the directory. The function is now identical in both roots. Closes #3592. Co-Authored-By: Claude Opus 5.5 --- cuda_bindings_12/tests/test_cufile.py | 31 +++++++-------------------- 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/cuda_bindings_12/tests/test_cufile.py b/cuda_bindings_12/tests/test_cufile.py index 6a6f0408770d..9271fdabbcd8 100644 --- a/cuda_bindings_12/tests/test_cufile.py +++ b/cuda_bindings_12/tests/test_cufile.py @@ -7,6 +7,7 @@ import os import pathlib import platform +import subprocess import tempfile from contextlib import suppress from functools import cache @@ -95,29 +96,13 @@ def cufileVersionLessThan(target): @cache def isSupportedFilesystem(): - """Check if the current filesystem is supported (ext4 or xfs).""" - try: - # Try to get filesystem type from /proc/mounts - with open("/proc/mounts") as f: - for line in f: - parts = line.split() - if len(parts) >= 2: - mount_point = parts[1] - fs_type = parts[2] - - # Check if current directory is under this mount point - current_dir = os.path.abspath(".") - if current_dir.startswith(mount_point): - fs_type_lower = fs_type.lower() - logging.info(f"Current filesystem type: {fs_type_lower}") - return fs_type_lower in ["ext4", "xfs"] - - # If we get here, we couldn't determine the filesystem type - logging.warning("Could not determine filesystem type from /proc/mounts") - return False - except Exception as e: - logging.error(f"Error checking filesystem type: {e}") - return False + """Check if the current filesystem is supported (ext4 or xfs). + + This uses `findmnt` so the kernel's mount table logic owns the decoding of the filesystem type. + """ + fs_type = subprocess.check_output(["findmnt", "-no", "FSTYPE", "-T", os.getcwd()], text=True).strip() # noqa: S603, S607 + logging.info(f"Current filesystem type (findmnt): {fs_type}") + return fs_type in ("ext4", "xfs") # These tests open/close the process-global driver inside their bodies, so From 17fcad02f04a0c540f13b3d2d97162da4ad4df08 Mon Sep 17 00:00:00 2001 From: Michael Droettboom Date: Mon, 30 Nov 2026 17:20:24 -0500 Subject: [PATCH 2/2] ci: mount /run/udev into the Linux test containers for cuFile 12.x cuFile 12.x (libcufile 1.14) looks up the block device behind a file in the host's udev database. The ubuntu:24.04 test containers did not mount it, so cuFileHandleRegister failed with CU_FILE_INTERNAL_ERROR on the workspace once the cuda_bindings_12 cuFile tests stopped skipping. Mount /run/udev read-only in test-wheel-linux.yml and in the pixi full-test job, which also tests cuda_bindings_12. The CUDA 13 cuFile tests pass with or without it. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci-pixi-source-test.yml | 3 ++- .github/workflows/test-wheel-linux.yml | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-pixi-source-test.yml b/.github/workflows/ci-pixi-source-test.yml index e512f7c8ebd4..74b800a8b8bb 100644 --- a/.github/workflows/ci-pixi-source-test.yml +++ b/.github/workflows/ci-pixi-source-test.yml @@ -286,7 +286,8 @@ jobs: runs-on: "linux-amd64-gpu-l4-latest-1" # same label scheme as test-wheel-linux.yml timeout-minutes: 90 container: - options: -u root --security-opt seccomp=unconfined --shm-size 16g + # /run/udev: cuFile 12.x needs the udev database; see test-wheel-linux.yml. + options: -u root --security-opt seccomp=unconfined --shm-size 16g -v /run/udev:/run/udev:ro image: ubuntu:24.04 env: NVIDIA_VISIBLE_DEVICES: ${{ env.NVIDIA_VISIBLE_DEVICES }} diff --git a/.github/workflows/test-wheel-linux.yml b/.github/workflows/test-wheel-linux.yml index 156827cc61c4..2319b55456f3 100644 --- a/.github/workflows/test-wheel-linux.yml +++ b/.github/workflows/test-wheel-linux.yml @@ -117,7 +117,10 @@ jobs: # Custom-DRIVER rows need --privileged --pid=host so install_gpu_driver.sh # can nsenter to the host for the install + refresh the toolkit bind mounts # back inside the container. Stock options for latest/earliest rows. - options: ${{ ((matrix.DRIVER == 'latest' || matrix.DRIVER == 'earliest') && '-u root --security-opt seccomp=unconfined --shm-size 16g') || '-u root --security-opt seccomp=unconfined --shm-size 16g --privileged --pid=host' }} + # /run/udev: cuFile 12.x (libcufile 1.14) looks up the block device behind + # a file in the udev database; without it, cuFileHandleRegister fails with + # CU_FILE_INTERNAL_ERROR on the workspace. + options: ${{ ((matrix.DRIVER == 'latest' || matrix.DRIVER == 'earliest') && '-u root --security-opt seccomp=unconfined --shm-size 16g -v /run/udev:/run/udev:ro') || '-u root --security-opt seccomp=unconfined --shm-size 16g -v /run/udev:/run/udev:ro --privileged --pid=host' }} image: ubuntu:24.04 env: NVIDIA_VISIBLE_DEVICES: ${{ env.NVIDIA_VISIBLE_DEVICES }}