From: Sage Weil Date: Thu, 10 Jan 2019 23:18:24 +0000 (-0600) Subject: qa/standalone/mon/mon-handle-forward: fix grep path and check return results X-Git-Tag: v14.1.0~415^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2762955576e5ced704b921f32fe4414256b7d804;p=ceph.git qa/standalone/mon/mon-handle-forward: fix grep path and check return results This makes the test more strict and less confusing. Signed-off-by: Sage Weil --- diff --git a/qa/standalone/mon/mon-handle-forward.sh b/qa/standalone/mon/mon-handle-forward.sh index 097c27c4d6a..f067f46d9d7 100755 --- a/qa/standalone/mon/mon-handle-forward.sh +++ b/qa/standalone/mon/mon-handle-forward.sh @@ -40,19 +40,19 @@ function run() { # when the leader ( MONA ) is used, there is no message forwarding ceph --mon-host $MONA osd pool create POOL1 12 CEPH_ARGS='' ceph --admin-daemon $(get_asok_path mon.a) log flush || return 1 - grep 'mon_command(.*"POOL1"' $dir/a/mon.a.log + grep 'mon_command(.*"POOL1"' $dir/mon.a.log || return 1 CEPH_ARGS='' ceph --admin-daemon $(get_asok_path mon.b) log flush || return 1 grep 'mon_command(.*"POOL1"' $dir/mon.b.log && return 1 # when the peon ( MONB ) is used, the message is forwarded to the leader ceph --mon-host $MONB osd pool create POOL2 12 CEPH_ARGS='' ceph --admin-daemon $(get_asok_path mon.b) log flush || return 1 - grep 'forward_request.*mon_command(.*"POOL2"' $dir/mon.b.log + grep 'forward_request.*mon_command(.*"POOL2"' $dir/mon.b.log || return 1 CEPH_ARGS='' ceph --admin-daemon $(get_asok_path mon.a) log flush || return 1 - grep ' forward(mon_command(.*"POOL2"' $dir/mon.a.log + grep ' forward(mon_command(.*"POOL2"' $dir/mon.a.log || return 1 # forwarded messages must retain features from the original connection features=$(sed -n -e 's|.*127.0.0.1:0.*accept features \([0-9][0-9]*\)|\1|p' < \ $dir/mon.b.log) - grep ' forward(mon_command(.*"POOL2".*con_features '$features $dir/mon.a.log + grep ' forward(mon_command(.*"POOL2".*con_features '$features $dir/mon.a.log || return 1 teardown $dir || return 1 }