From: Xiubo Li Date: Wed, 11 Nov 2020 02:09:47 +0000 (+0800) Subject: qa: switch to 'osdop_read' instead of 'op_r' X-Git-Tag: v16.1.0~595^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4f1817aa8fd62d70e708e69aeb1ad7413498b63b;p=ceph.git qa: switch to 'osdop_read' instead of 'op_r' The 'op_r' will just acount CEPH_OSD_FLAG_READ flag, which will include some other none real data read opcodes, like the CEPH_OSD_OP_STAT. Signed-off-by: Xiubo Li --- diff --git a/qa/tasks/cephfs/test_readahead.py b/qa/tasks/cephfs/test_readahead.py index e936a94b9aa7..28c544c64943 100644 --- a/qa/tasks/cephfs/test_readahead.py +++ b/qa/tasks/cephfs/test_readahead.py @@ -17,14 +17,14 @@ class TestReadahead(CephFSTestCase): self.mount_a.umount_wait() self.mount_a.mount_wait() - initial_op_r = self.mount_a.admin_socket(['perf', 'dump', 'objecter'])['objecter']['op_r'] + initial_op_read = self.mount_a.admin_socket(['perf', 'dump', 'objecter'])['objecter']['osdop_read'] self.mount_a.run_shell(["dd", "if=foo", "of=/dev/null", "bs=128k", "count=32"]) - op_r = self.mount_a.admin_socket(['perf', 'dump', 'objecter'])['objecter']['op_r'] - assert op_r >= initial_op_r - op_r -= initial_op_r - log.info("read operations: {0}".format(op_r)) + op_read = self.mount_a.admin_socket(['perf', 'dump', 'objecter'])['objecter']['osdop_read'] + assert op_read >= initial_op_read + op_read -= initial_op_read + log.info("read operations: {0}".format(op_read)) # with exponentially increasing readahead, we should see fewer than 10 operations # but this test simply checks if the client is doing a remote read for each local read - if op_r >= 32: + if op_read >= 32: raise RuntimeError("readahead not working")