From e96df8c44beb67588dfb8845961ccf269659748b Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Mon, 18 Nov 2019 15:36:21 +0800 Subject: [PATCH] qa/workunits/cephtool/test.sh: use "sessions" in test_mon_tell() "version" is not an asok command anymore in the sense that it's served by registered asock hook. so in this change, we replace "version" with "sessions", so we can verify that audit channel does not the dispatched "sessions" command sent from ceph cli. also, restructure the test as a loop for better readability Signed-off-by: Kefu Chai --- qa/workunits/cephtool/test.sh | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/qa/workunits/cephtool/test.sh b/qa/workunits/cephtool/test.sh index a30d856ceb2..8a6d922b6f0 100755 --- a/qa/workunits/cephtool/test.sh +++ b/qa/workunits/cephtool/test.sh @@ -2546,19 +2546,13 @@ function test_osd_negative_filestore_merge_threshold() function test_mon_tell() { - ceph tell mon.a version - ceph tell mon.b version + for m in mon.a mon.b; do + ceph tell $m sessions + ceph_watch_start debug audit + ceph tell mon.a sessions + ceph_watch_wait "${m} \[DBG\] from.*cmd='sessions' args=\[\]: dispatch" + done expect_false ceph tell mon.foo version - - sleep 1 - - ceph_watch_start debug audit - ceph tell mon.a version - ceph_watch_wait 'mon.a \[DBG\] from.*cmd=\[{"prefix": "version"}\]: dispatch' - - ceph_watch_start debug audit - ceph tell mon.b version - ceph_watch_wait 'mon.b \[DBG\] from.*cmd=\[{"prefix": "version"}\]: dispatch' } function test_mon_ping() -- 2.39.5