Skip to content

Commit 2448960

Browse files
committed
Merge PR ceph#61675 into main
* refs/pull/61675/head: qa: do read checks with non-empty file Reviewed-by: Dhairya Parmar <[email protected]>
2 parents 8fc3b33 + e3ed3b3 commit 2448960

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

qa/tasks/cephfs/test_pool_perm.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,20 @@
66

77
class TestPoolPerm(CephFSTestCase):
88
def test_pool_perm(self):
9-
self.mount_a.run_shell(["touch", "test_file"])
9+
self.mount_a.run_shell_payload("dd if=/dev/urandom of=test_file bs=4k count=1")
1010

1111
file_path = os.path.join(self.mount_a.mountpoint, "test_file")
1212

1313
remote_script = dedent("""
1414
import os
1515
import errno
1616
17-
fd = os.open("{path}", os.O_RDWR)
17+
fd = os.open("{path}", os.O_RDWR | os.O_SYNC)
1818
try:
1919
if {check_read}:
2020
ret = os.read(fd, 1024)
2121
else:
22-
os.write(fd, b'content')
22+
os.pwrite(fd, b'content', 0)
2323
except OSError as e:
2424
if e.errno != errno.EPERM:
2525
raise

0 commit comments

Comments
 (0)