From 3de0527c07f6250403641972694c46950490dcbc Mon Sep 17 00:00:00 2001 From: Keith Kraus Date: Wed, 27 Aug 2025 12:48:55 -0400 Subject: [PATCH] Update permissions in test_cufile to use 600 instead of 644 (#910) (cherry picked from commit 2bd44a2d9ee34dccd80a3085bc7e1383f854ce2f) --- cuda_bindings/tests/test_cufile.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/cuda_bindings/tests/test_cufile.py b/cuda_bindings/tests/test_cufile.py index 1a51348680..32b07a802f 100644 --- a/cuda_bindings/tests/test_cufile.py +++ b/cuda_bindings/tests/test_cufile.py @@ -172,7 +172,7 @@ def test_handle_register(): file_path = "test_handle_register.bin" # Create file with POSIX operations - fd = os.open(file_path, os.O_CREAT | os.O_RDWR, 0o644) + fd = os.open(file_path, os.O_CREAT | os.O_RDWR, 0o600) # Write test data using POSIX write test_data = b"Test data for cuFile - POSIX write" @@ -502,7 +502,7 @@ def test_cufile_read_write(): try: # Create file with O_DIRECT - fd = os.open(file_path, os.O_CREAT | os.O_RDWR | os.O_DIRECT, 0o644) + fd = os.open(file_path, os.O_CREAT | os.O_RDWR | os.O_DIRECT, 0o600) # Register buffers with cuFile write_buf_int = int(write_buf) @@ -601,7 +601,7 @@ def test_cufile_read_write_host_memory(): try: # Create file with O_DIRECT - fd = os.open(file_path, os.O_CREAT | os.O_RDWR | os.O_DIRECT, 0o644) + fd = os.open(file_path, os.O_CREAT | os.O_RDWR | os.O_DIRECT, 0o600) # Register host buffers with cuFile write_buf_int = int(write_buf) @@ -702,7 +702,7 @@ def test_cufile_read_write_large(): try: # Create file with O_DIRECT - fd = os.open(file_path, os.O_CREAT | os.O_RDWR | os.O_DIRECT, 0o644) + fd = os.open(file_path, os.O_CREAT | os.O_RDWR | os.O_DIRECT, 0o600) # Register buffers with cuFile write_buf_int = int(write_buf) @@ -793,7 +793,7 @@ def test_cufile_write_async(cufile_env_json): # Create test file file_path = "test_cufile_write_async.bin" - fd = os.open(file_path, os.O_CREAT | os.O_RDWR | os.O_DIRECT, 0o644) + fd = os.open(file_path, os.O_CREAT | os.O_RDWR | os.O_DIRECT, 0o600) try: # Register file handle @@ -888,7 +888,7 @@ def test_cufile_read_async(cufile_env_json): file_path = "test_cufile_read_async.bin" # First create and write test data without O_DIRECT - fd_temp = os.open(file_path, os.O_CREAT | os.O_RDWR, 0o644) + fd_temp = os.open(file_path, os.O_CREAT | os.O_RDWR, 0o600) # Create test data that's aligned to 4096 bytes test_string = b"Async read test data for cuFile!" test_string_len = len(test_string) @@ -992,7 +992,7 @@ def test_cufile_async_read_write(cufile_env_json): # Create test file file_path = "test_cufile_async_rw.bin" - fd = os.open(file_path, os.O_CREAT | os.O_RDWR | os.O_DIRECT, 0o644) + fd = os.open(file_path, os.O_CREAT | os.O_RDWR | os.O_DIRECT, 0o600) try: # Register file handle @@ -1139,7 +1139,7 @@ def test_batch_io_basic(): try: # Create file with O_DIRECT - fd = os.open(file_path, os.O_CREAT | os.O_RDWR | os.O_DIRECT, 0o644) + fd = os.open(file_path, os.O_CREAT | os.O_RDWR | os.O_DIRECT, 0o600) # Register buffers with cuFile for buf in buffers: @@ -1353,7 +1353,7 @@ def test_batch_io_cancel(): try: # Create file with O_DIRECT - fd = os.open(file_path, os.O_CREAT | os.O_RDWR | os.O_DIRECT, 0o644) + fd = os.open(file_path, os.O_CREAT | os.O_RDWR | os.O_DIRECT, 0o600) # Register buffers with cuFile for buf in buffers: @@ -1463,7 +1463,7 @@ def test_batch_io_large_operations(): try: # Create file with O_DIRECT - fd = os.open(file_path, os.O_CREAT | os.O_RDWR | os.O_DIRECT, 0o644) + fd = os.open(file_path, os.O_CREAT | os.O_RDWR | os.O_DIRECT, 0o600) # Register all buffers with cuFile all_buffers = write_buffers + read_buffers