]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
test/pybind: update to test_fallocate for mode 0
authorMilind Changire <mchangir@redhat.com>
Mon, 30 Sep 2024 10:09:48 +0000 (15:39 +0530)
committerMilind Changire <mchangir@redhat.com>
Wed, 30 Oct 2024 10:11:16 +0000 (15:41 +0530)
Signed-off-by: Milind Changire <mchangir@redhat.com>
src/test/pybind/test_cephfs.py

index 3761056efdfde11ed79e9ffef4f7fe6d30024ee7..577cb9e4171536fca1a03802409170716aa2e42e 100644 (file)
@@ -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')