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

Function test_fsync

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

Source from the content-addressed store, hash-verified

87 stat = cephfs.sync_fs()
88
89def test_fsync(testdir):
90 fd = cephfs.open(b'file-1', 'w', 0o755)
91 cephfs.write(fd, b"asdf", 0)
92 stat = cephfs.fsync(fd, 0)
93 cephfs.write(fd, b"qwer", 0)
94 stat = cephfs.fsync(fd, 1)
95 cephfs.close(fd)
96 #sync on non-existing fd (assume fd 12345 is not exists)
97 assert_raises(libcephfs.Error, cephfs.fsync, 12345, 0)
98
99def test_directory(testdir):
100 cephfs.mkdir(b"/temp-directory", 0o755)

Callers

nothing calls this directly

Calls 5

assert_raisesFunction · 0.90
openMethod · 0.45
writeMethod · 0.45
fsyncMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected