Skip to content

Commit 4ed2c03

Browse files
Andy-Jostclaude
andcommitted
cuda.core: mark two VMM IPC tests thread-unsafe
Under pytest-run-parallel the same test body runs in several threads. The alias test checks mapping state by address, and a freed address can be reused by another thread's allocation; the descriptor test checks a closed file descriptor number, which another thread can reuse. Co-Authored-By: Claude Fable 5.1 <[email protected]>
1 parent 682db0f commit 4ed2c03

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎cuda_core/tests/memory_ipc/test_vmm_ipc.py‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ def child_grown(device_id, desc, gran, queue):
204204
imported.close()
205205

206206
@pytest.mark.agent_authored(model="claude-fable-5-1")
207+
@pytest.mark.thread_unsafe(reason="checks mapping state by address; another thread can reuse a freed address")
207208
def test_import_in_same_process_aliases_memory(self, vmm_ipc_device):
208209
"""Importing a descriptor where it was exported maps the same memory at a new address."""
209210
device = vmm_ipc_device
@@ -224,6 +225,9 @@ def test_import_in_same_process_aliases_memory(self, vmm_ipc_device):
224225
assert not _is_mapped(ptr_buf)
225226

226227
@pytest.mark.agent_authored(model="claude-fable-5-1")
228+
@pytest.mark.thread_unsafe(
229+
reason="file descriptor numbers are process-global; another thread can reuse a closed one"
230+
)
227231
def test_descriptor_owns_its_file_descriptors(self, vmm_ipc_device):
228232
"""The exported file descriptors close when the descriptor is released."""
229233
device = vmm_ipc_device

0 commit comments

Comments
 (0)