MCPcopy Create free account
hub / github.com/ceph/ceph / test_fallocate

Function test_fallocate

src/test/pybind/test_cephfs.py:618–626  ·  view source on GitHub ↗
(testdir)

Source from the content-addressed store, hash-verified

616 cephfs.unlink(b'/file-ftruncate')
617
618def test_fallocate(testdir):
619 fd = cephfs.open(b'/file-fallocate', 'w', 0o755)
620 assert_raises(TypeError, cephfs.fallocate, b'/file-fallocate', 0, 10)
621 assert_raises(libcephfs.OperationNotSupported, cephfs.fallocate, fd, 0, 10)
622 stat = cephfs.fsync(fd, 0)
623 st = cephfs.fstat(fd)
624 assert_equal(st.st_size, 0)
625 cephfs.close(fd)
626 cephfs.unlink(b'/file-fallocate')
627
628def test_mknod(testdir):
629 mode = stat.S_IFIFO | stat.S_IRUSR | stat.S_IWUSR

Callers

nothing calls this directly

Calls 7

assert_raisesFunction · 0.90
assert_equalFunction · 0.90
openMethod · 0.45
fsyncMethod · 0.45
fstatMethod · 0.45
closeMethod · 0.45
unlinkMethod · 0.45

Tested by

no test coverage detected