From: Milind Changire Date: Mon, 30 Sep 2024 10:09:48 +0000 (+0530) Subject: test/pybind: update to test_fallocate for mode 0 X-Git-Tag: testing/wip-pdonnell-testing-20241106.142118-debug~21^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=9244f0a30309077e432b9487ce7b639175afdb1c;p=ceph-ci.git test/pybind: update to test_fallocate for mode 0 Signed-off-by: Milind Changire --- diff --git a/src/test/pybind/test_cephfs.py b/src/test/pybind/test_cephfs.py index 3761056efdf..577cb9e4171 100644 --- a/src/test/pybind/test_cephfs.py +++ b/src/test/pybind/test_cephfs.py @@ -610,10 +610,10 @@ def test_ftruncate(testdir): def test_fallocate(testdir): fd = cephfs.open(b'/file-fallocate', 'w', 0o755) assert_raises(TypeError, cephfs.fallocate, b'/file-fallocate', 0, 10) - cephfs.fallocate(fd, 0, 10) + assert_raises(libcephfs.OperationNotSupported, cephfs.fallocate, fd, 0, 10) stat = cephfs.fsync(fd, 0) st = cephfs.fstat(fd) - assert_equal(st.st_size, 10) + assert_equal(st.st_size, 0) cephfs.close(fd) cephfs.unlink(b'/file-fallocate')