From 6584779a910589db40f8fb0d68825766f799e14d Mon Sep 17 00:00:00 2001 From: Xiubo Li Date: Wed, 11 Nov 2020 10:09:47 +0800 Subject: [PATCH] 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 (cherry picked from commit 4f1817aa8fd62d70e708e69aeb1ad7413498b63b) --- qa/tasks/cephfs/test_readahead.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/qa/tasks/cephfs/test_readahead.py b/qa/tasks/cephfs/test_readahead.py index e936a94b9aa7c..28c544c649433 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") -- 2.39.5