@@ -45,7 +45,14 @@ def cufile_env_json(monkeypatch):
4545 config_path = os .path .join (test_dir , "cufile.json" )
4646 assert os .path .isfile (config_path )
4747 monkeypatch .setenv ("CUFILE_ENV_PATH_JSON" , config_path )
48+ monkeypatch .setenv ("CUFILE_LOGGING_LEVEL" , "TRACE" )
4849 logging .info (f"Using cuFile config: { config_path } " )
50+ yield
51+ cufile_log_path = pathlib .Path .cwd () / "cufile.log"
52+ if cufile_log_path .is_file ():
53+ logging .info (f"cuFile log contents from { cufile_log_path } :\n { cufile_log_path .read_text (errors = 'replace' )} " )
54+ else :
55+ logging .info (f"cuFile log does not exist: { cufile_log_path } " )
4956
5057
5158@cache
@@ -91,7 +98,8 @@ def skipIfUnsupportedFilesystem(tmpdir_factory):
9198 fs_type = subprocess .check_output (cmd , text = True ).strip () # noqa: S603
9299 logging .info (f"Current filesystem type (findmnt): { fs_type } " )
93100 if fs_type not in ("ext4" , "xfs" ):
94- pytest .skip ("cuFile handle_register requires ext4 or xfs filesystem" )
101+ # pytest.skip("cuFile handle_register requires ext4 or xfs filesystem")
102+ pass
95103
96104
97105@cache
@@ -201,10 +209,10 @@ def driver(ctx):
201209
202210
203211@pytest .mark .usefixtures ("driver" , "skipIfUnsupportedFilesystem" )
204- def test_handle_register (tmpdir ):
212+ def test_handle_register ():
205213 """Test file handle registration with cuFile."""
206214 # Create test file
207- file_path = tmpdir / "test_handle_register.bin"
215+ file_path = "test_handle_register.bin"
208216
209217 # Create file with POSIX operations
210218 fd = os .open (file_path , os .O_CREAT | os .O_RDWR , 0o600 )
@@ -238,6 +246,8 @@ def test_handle_register(tmpdir):
238246
239247 finally :
240248 os .close (fd )
249+ with suppress (OSError ):
250+ os .unlink (file_path )
241251
242252
243253@pytest .mark .usefixtures ("driver" )
@@ -390,10 +400,10 @@ def test_buf_register_already_registered():
390400
391401
392402@pytest .mark .usefixtures ("driver" , "skipIfUnsupportedFilesystem" )
393- def test_cufile_read_write (tmpdir ):
403+ def test_cufile_read_write ():
394404 """Test cuFile read and write operations."""
395405 # Create test file
396- file_path = tmpdir / "test_cufile_rw.bin"
406+ file_path = "test_cufile_rw.bin"
397407
398408 # Allocate CUDA memory for write and read
399409 write_size = 65536 # 64KB, aligned to 4096 bytes (65536 % 4096 == 0)
@@ -470,13 +480,15 @@ def test_cufile_read_write(tmpdir):
470480 # Free CUDA memory
471481 cuda .cuMemFree (write_buf )
472482 cuda .cuMemFree (read_buf )
483+ with suppress (OSError ):
484+ os .unlink (file_path )
473485
474486
475487@pytest .mark .usefixtures ("driver" , "skipIfUnsupportedFilesystem" )
476- def test_cufile_read_write_host_memory (tmpdir ):
488+ def test_cufile_read_write_host_memory ():
477489 """Test cuFile read and write operations using host memory."""
478490 # Create test file
479- file_path = tmpdir / "test_cufile_rw_host.bin"
491+ file_path = "test_cufile_rw_host.bin"
480492
481493 # Allocate host memory for write and read
482494 write_size = 65536 # 64KB, aligned to 4096 bytes (65536 % 4096 == 0)
@@ -549,13 +561,15 @@ def test_cufile_read_write_host_memory(tmpdir):
549561 # Free host memory
550562 cuda .cuMemFreeHost (write_buf )
551563 cuda .cuMemFreeHost (read_buf )
564+ with suppress (OSError ):
565+ os .unlink (file_path )
552566
553567
554568@pytest .mark .usefixtures ("driver" , "skipIfUnsupportedFilesystem" )
555- def test_cufile_read_write_large (tmpdir ):
569+ def test_cufile_read_write_large ():
556570 """Test cuFile read and write operations with large data."""
557571 # Create test file
558- file_path = tmpdir / "test_cufile_rw_large.bin"
572+ file_path = "test_cufile_rw_large.bin"
559573
560574 # Allocate large CUDA memory (1MB, aligned to 4096 bytes)
561575 write_size = 1024 * 1024 # 1MB, aligned to 4096 bytes (1048576 % 4096 == 0)
@@ -635,13 +649,15 @@ def test_cufile_read_write_large(tmpdir):
635649 # Free CUDA memory
636650 cuda .cuMemFree (write_buf )
637651 cuda .cuMemFree (read_buf )
652+ with suppress (OSError ):
653+ os .unlink (file_path )
638654
639655
640656@pytest .mark .usefixtures ("ctx" , "cufile_env_json" , "driver" , "skipIfUnsupportedFilesystem" )
641- def test_cufile_write_async (tmpdir ):
657+ def test_cufile_write_async ():
642658 """Test cuFile asynchronous write operations."""
643659 # Create test file
644- file_path = tmpdir / "test_cufile_write_async.bin"
660+ file_path = "test_cufile_write_async.bin"
645661 fd = os .open (file_path , os .O_CREAT | os .O_RDWR | os .O_DIRECT , 0o600 )
646662
647663 try :
@@ -709,13 +725,15 @@ def test_cufile_write_async(tmpdir):
709725
710726 finally :
711727 os .close (fd )
728+ with suppress (OSError ):
729+ os .unlink (file_path )
712730
713731
714732@pytest .mark .usefixtures ("ctx" , "cufile_env_json" , "driver" , "skipIfUnsupportedFilesystem" )
715- def test_cufile_read_async (tmpdir ):
733+ def test_cufile_read_async ():
716734 """Test cuFile asynchronous read operations."""
717735 # Create test file
718- file_path = tmpdir / "test_cufile_read_async.bin"
736+ file_path = "test_cufile_read_async.bin"
719737
720738 # First create and write test data without O_DIRECT
721739 fd_temp = os .open (file_path , os .O_CREAT | os .O_RDWR , 0o600 )
@@ -796,13 +814,15 @@ def test_cufile_read_async(tmpdir):
796814
797815 finally :
798816 os .close (fd )
817+ with suppress (OSError ):
818+ os .unlink (file_path )
799819
800820
801821@pytest .mark .usefixtures ("ctx" , "cufile_env_json" , "driver" , "skipIfUnsupportedFilesystem" )
802- def test_cufile_async_read_write (tmpdir ):
822+ def test_cufile_async_read_write ():
803823 """Test cuFile asynchronous read and write operations in sequence."""
804824 # Create test file
805- file_path = tmpdir / "test_cufile_async_rw.bin"
825+ file_path = "test_cufile_async_rw.bin"
806826 fd = os .open (file_path , os .O_CREAT | os .O_RDWR | os .O_DIRECT , 0o600 )
807827
808828 try :
@@ -906,13 +926,15 @@ def test_cufile_async_read_write(tmpdir):
906926
907927 finally :
908928 os .close (fd )
929+ with suppress (OSError ):
930+ os .unlink (file_path )
909931
910932
911933@pytest .mark .usefixtures ("driver" , "skipIfUnsupportedFilesystem" )
912- def test_batch_io_basic (tmpdir ):
934+ def test_batch_io_basic ():
913935 """Test basic batch IO operations with multiple read/write operations."""
914936 # Create test file
915- file_path = tmpdir / "test_batch_io.bin"
937+ file_path = "test_batch_io.bin"
916938
917939 # Allocate CUDA memory for multiple operations
918940 buf_size = 65536 # 64KB
@@ -1101,13 +1123,15 @@ def test_batch_io_basic(tmpdir):
11011123 # Free CUDA memory
11021124 for buf in buffers + read_buffers :
11031125 cuda .cuMemFree (buf )
1126+ with suppress (OSError ):
1127+ os .unlink (file_path )
11041128
11051129
11061130@pytest .mark .usefixtures ("driver" , "skipIfUnsupportedFilesystem" )
1107- def test_batch_io_cancel (tmpdir ):
1131+ def test_batch_io_cancel ():
11081132 """Test batch IO cancellation."""
11091133 # Create test file
1110- file_path = tmpdir / "test_batch_cancel.bin"
1134+ file_path = "test_batch_cancel.bin"
11111135
11121136 # Allocate CUDA memory
11131137 buf_size = 4096 # 4KB, aligned to 4096 bytes
@@ -1177,13 +1201,15 @@ def test_batch_io_cancel(tmpdir):
11771201 # Free CUDA memory
11781202 for buf in buffers :
11791203 cuda .cuMemFree (buf )
1204+ with suppress (OSError ):
1205+ os .unlink (file_path )
11801206
11811207
11821208@pytest .mark .usefixtures ("driver" , "skipIfUnsupportedFilesystem" )
1183- def test_batch_io_large_operations (tmpdir ):
1209+ def test_batch_io_large_operations ():
11841210 """Test batch IO with large buffer operations."""
11851211 # Create test file
1186- file_path = tmpdir / "test_batch_large.bin"
1212+ file_path = "test_batch_large.bin"
11871213
11881214 # Allocate large CUDA memory (1MB, aligned to 4096 bytes)
11891215 buf_size = 1024 * 1024 # 1MB, aligned to 4096 bytes
@@ -1361,6 +1387,8 @@ def test_batch_io_large_operations(tmpdir):
13611387 # Free CUDA memory
13621388 for buf in all_buffers :
13631389 cuda .cuMemFree (buf )
1390+ with suppress (OSError ):
1391+ os .unlink (file_path )
13641392
13651393
13661394@pytest .mark .skipif (
@@ -1582,10 +1610,10 @@ def test_stats_start_stop():
15821610)
15831611@pytest .mark .usefixtures ("stats" , "skipIfUnsupportedFilesystem" )
15841612@pytest .mark .thread_unsafe (reason = "cuFile stats counters and collection state are process-global" )
1585- def test_get_stats_l1 (tmpdir ):
1613+ def test_get_stats_l1 ():
15861614 """Test cuFile L1 statistics retrieval with file operations."""
15871615 # Create test file directly with O_DIRECT
1588- file_path = tmpdir / "test_stats_l1.bin"
1616+ file_path = "test_stats_l1.bin"
15891617 fd = os .open (file_path , os .O_CREAT | os .O_RDWR | os .O_DIRECT , 0o600 )
15901618
15911619 try :
@@ -1652,17 +1680,19 @@ def test_get_stats_l1(tmpdir):
16521680
16531681 finally :
16541682 os .close (fd )
1683+ with suppress (OSError ):
1684+ os .unlink (file_path )
16551685
16561686
16571687@pytest .mark .skipif (
16581688 cufileVersionLessThan (1150 ), reason = "cuFile parameter APIs require cuFile library version 13.0 or later"
16591689)
16601690@pytest .mark .usefixtures ("stats" , "skipIfUnsupportedFilesystem" )
16611691@pytest .mark .thread_unsafe (reason = "cuFile stats counters and collection state are process-global" )
1662- def test_get_stats_l2 (tmpdir ):
1692+ def test_get_stats_l2 ():
16631693 """Test cuFile L2 statistics retrieval with file operations."""
16641694 # Create test file directly with O_DIRECT
1665- file_path = tmpdir / "test_stats_l2.bin"
1695+ file_path = "test_stats_l2.bin"
16661696 fd = os .open (file_path , os .O_CREAT | os .O_RDWR | os .O_DIRECT , 0o600 )
16671697
16681698 try :
@@ -1733,17 +1763,19 @@ def test_get_stats_l2(tmpdir):
17331763
17341764 finally :
17351765 os .close (fd )
1766+ with suppress (OSError ):
1767+ os .unlink (file_path )
17361768
17371769
17381770@pytest .mark .skipif (
17391771 cufileVersionLessThan (1150 ), reason = "cuFile parameter APIs require cuFile library version 13.0 or later"
17401772)
17411773@pytest .mark .usefixtures ("stats" , "skipIfUnsupportedFilesystem" )
17421774@pytest .mark .thread_unsafe (reason = "cuFile stats counters and collection state are process-global" )
1743- def test_get_stats_l3 (tmpdir ):
1775+ def test_get_stats_l3 ():
17441776 """Test cuFile L3 statistics retrieval with file operations."""
17451777 # Create test file directly with O_DIRECT
1746- file_path = tmpdir / "test_stats_l3.bin"
1778+ file_path = "test_stats_l3.bin"
17471779 fd = os .open (file_path , os .O_CREAT | os .O_RDWR | os .O_DIRECT , 0o600 )
17481780
17491781 try :
@@ -1824,6 +1856,8 @@ def test_get_stats_l3(tmpdir):
18241856
18251857 finally :
18261858 os .close (fd )
1859+ with suppress (OSError ):
1860+ os .unlink (file_path )
18271861
18281862
18291863@pytest .mark .skipif (
0 commit comments