From: huanwen ren Date: Wed, 7 Dec 2016 09:19:48 +0000 (+0800) Subject: test/cephfs: add readlink test X-Git-Tag: v11.1.1~74^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6a601eba5e423052e7136e506beca61627181c62;p=ceph.git test/cephfs: add readlink test Signed-off-by: huanwen ren --- diff --git a/src/test/pybind/test_cephfs.py b/src/test/pybind/test_cephfs.py index 5bc0f6ed538..d6235abf975 100644 --- a/src/test/pybind/test_cephfs.py +++ b/src/test/pybind/test_cephfs.py @@ -181,6 +181,17 @@ def test_symlink(): cephfs.close(fd) cephfs.unlink(b'file-2') +@with_setup(setup_test) +def test_readlink(): + fd = cephfs.open(b'/file-1', 'w', 0o755) + cephfs.write(fd, b"1111", 0) + cephfs.close(fd) + cephfs.symlink(b'/file-1', b'/file-2') + d = cephfs.readlink(b"/file-2",100) + assert_equal(d, b"/file-1") + cephfs.unlink(b'/file-2') + cephfs.unlink(b'/file-1') + @with_setup(setup_test) def test_delete_cwd(): assert_equal(b"/", cephfs.getcwd())