Skip to content

Commit 2bd44a2

Browse files
authored
Update permissions in test_cufile to use 600 instead of 644 (#910)
1 parent 135af40 commit 2bd44a2

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

cuda_bindings/tests/test_cufile.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ def test_handle_register():
169169
file_path = "test_handle_register.bin"
170170

171171
# Create file with POSIX operations
172-
fd = os.open(file_path, os.O_CREAT | os.O_RDWR, 0o644)
172+
fd = os.open(file_path, os.O_CREAT | os.O_RDWR, 0o600)
173173

174174
# Write test data using POSIX write
175175
test_data = b"Test data for cuFile - POSIX write"
@@ -499,7 +499,7 @@ def test_cufile_read_write():
499499

500500
try:
501501
# Create file with O_DIRECT
502-
fd = os.open(file_path, os.O_CREAT | os.O_RDWR | os.O_DIRECT, 0o644)
502+
fd = os.open(file_path, os.O_CREAT | os.O_RDWR | os.O_DIRECT, 0o600)
503503

504504
# Register buffers with cuFile
505505
write_buf_int = int(write_buf)
@@ -598,7 +598,7 @@ def test_cufile_read_write_host_memory():
598598

599599
try:
600600
# Create file with O_DIRECT
601-
fd = os.open(file_path, os.O_CREAT | os.O_RDWR | os.O_DIRECT, 0o644)
601+
fd = os.open(file_path, os.O_CREAT | os.O_RDWR | os.O_DIRECT, 0o600)
602602

603603
# Register host buffers with cuFile
604604
write_buf_int = int(write_buf)
@@ -699,7 +699,7 @@ def test_cufile_read_write_large():
699699

700700
try:
701701
# Create file with O_DIRECT
702-
fd = os.open(file_path, os.O_CREAT | os.O_RDWR | os.O_DIRECT, 0o644)
702+
fd = os.open(file_path, os.O_CREAT | os.O_RDWR | os.O_DIRECT, 0o600)
703703

704704
# Register buffers with cuFile
705705
write_buf_int = int(write_buf)
@@ -790,7 +790,7 @@ def test_cufile_write_async(cufile_env_json):
790790

791791
# Create test file
792792
file_path = "test_cufile_write_async.bin"
793-
fd = os.open(file_path, os.O_CREAT | os.O_RDWR | os.O_DIRECT, 0o644)
793+
fd = os.open(file_path, os.O_CREAT | os.O_RDWR | os.O_DIRECT, 0o600)
794794

795795
try:
796796
# Register file handle
@@ -885,7 +885,7 @@ def test_cufile_read_async(cufile_env_json):
885885
file_path = "test_cufile_read_async.bin"
886886

887887
# First create and write test data without O_DIRECT
888-
fd_temp = os.open(file_path, os.O_CREAT | os.O_RDWR, 0o644)
888+
fd_temp = os.open(file_path, os.O_CREAT | os.O_RDWR, 0o600)
889889
# Create test data that's aligned to 4096 bytes
890890
test_string = b"Async read test data for cuFile!"
891891
test_string_len = len(test_string)
@@ -989,7 +989,7 @@ def test_cufile_async_read_write(cufile_env_json):
989989

990990
# Create test file
991991
file_path = "test_cufile_async_rw.bin"
992-
fd = os.open(file_path, os.O_CREAT | os.O_RDWR | os.O_DIRECT, 0o644)
992+
fd = os.open(file_path, os.O_CREAT | os.O_RDWR | os.O_DIRECT, 0o600)
993993

994994
try:
995995
# Register file handle
@@ -1136,7 +1136,7 @@ def test_batch_io_basic():
11361136

11371137
try:
11381138
# Create file with O_DIRECT
1139-
fd = os.open(file_path, os.O_CREAT | os.O_RDWR | os.O_DIRECT, 0o644)
1139+
fd = os.open(file_path, os.O_CREAT | os.O_RDWR | os.O_DIRECT, 0o600)
11401140

11411141
# Register buffers with cuFile
11421142
for buf in buffers:
@@ -1350,7 +1350,7 @@ def test_batch_io_cancel():
13501350

13511351
try:
13521352
# Create file with O_DIRECT
1353-
fd = os.open(file_path, os.O_CREAT | os.O_RDWR | os.O_DIRECT, 0o644)
1353+
fd = os.open(file_path, os.O_CREAT | os.O_RDWR | os.O_DIRECT, 0o600)
13541354

13551355
# Register buffers with cuFile
13561356
for buf in buffers:
@@ -1460,7 +1460,7 @@ def test_batch_io_large_operations():
14601460

14611461
try:
14621462
# Create file with O_DIRECT
1463-
fd = os.open(file_path, os.O_CREAT | os.O_RDWR | os.O_DIRECT, 0o644)
1463+
fd = os.open(file_path, os.O_CREAT | os.O_RDWR | os.O_DIRECT, 0o600)
14641464

14651465
# Register all buffers with cuFile
14661466
all_buffers = write_buffers + read_buffers

0 commit comments

Comments
 (0)