summary refs log tree commit diff stats
path: root/tests/qemu-iotests/common.qemu
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2019-11-19 09:17:23 +0000
committerPeter Maydell <peter.maydell@linaro.org>2019-11-19 09:17:24 +0000
commit385e43e6638464009e09cfaec254012e531f6342 (patch)
treec43ee841d3695d5fd24bb4faaa2b28415884f0aa /tests/qemu-iotests/common.qemu
parentf086f22d6c068ba151b0f6e81e75a64f130df712 (diff)
parent296416ff0f519d762fbb87ac59f0770824267f3f (diff)
downloadfocaccia-qemu-385e43e6638464009e09cfaec254012e531f6342.tar.gz
focaccia-qemu-385e43e6638464009e09cfaec254012e531f6342.zip
Merge remote-tracking branch 'remotes/ericb/tags/pull-nbd-2019-11-19' into staging
nbd patches for 2019-11-19

- iotests: more tests of NBD reconnect, various test output improvements
- nbd: fix spec compliance issue with long strings
- slience a Coverity warning on coroutines

# gpg: Signature made Tue 19 Nov 2019 03:06:41 GMT
# gpg:                using RSA key 71C2CC22B1C4602927D2F3AAA7A16B4A2527436A
# gpg: Good signature from "Eric Blake <eblake@redhat.com>" [full]
# gpg:                 aka "Eric Blake (Free Software Programmer) <ebb9@byu.net>" [full]
# gpg:                 aka "[jpeg image of size 6874]" [full]
# Primary key fingerprint: 71C2 CC22 B1C4 6029 27D2  F3AA A7A1 6B4A 2527 436A

* remotes/ericb/tags/pull-nbd-2019-11-19:
  tests: More iotest 223 improvements
  iotests: Include QMP input in .out files
  iotests: Switch nbd tests to use Unix rather than TCP
  iotests: Fix 173
  MAINTAINERS: add more bitmap-related to Dirty Bitmaps section
  nbd: Don't send oversize strings
  bitmap: Enforce maximum bitmap name length
  nbd/server: Prefer heap over stack for parsing client names
  qemu-coroutine-sleep: Silence Coverity warning
  iotests: Test NBD client reconnection

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests/qemu-iotests/common.qemu')
-rw-r--r--tests/qemu-iotests/common.qemu9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/qemu-iotests/common.qemu b/tests/qemu-iotests/common.qemu
index 8d2021a7eb..de680cf1c7 100644
--- a/tests/qemu-iotests/common.qemu
+++ b/tests/qemu-iotests/common.qemu
@@ -123,6 +123,9 @@ _timed_wait_for()
 # until either timeout, or a response.  If it is not set, or <=0,
 # then the command is only sent once.
 #
+# If neither $silent nor $mismatch_only is set, and $cmd begins with '{',
+# echo the command before sending it the first time.
+#
 # If $qemu_error_no_exit is set, then even if the expected response
 # is not seen, we will not exit.  $QEMU_STATUS[$1] will be set it -1 in
 # that case.
@@ -152,6 +155,12 @@ _send_qemu_cmd()
         shift $(($# - 2))
     fi
 
+    # Display QMP being sent, but not HMP (since HMP already echoes its
+    # input back to output); decide based on leading '{'
+    if [ -z "$silent" ] && [ -z "$mismatch_only" ] &&
+            [ "$cmd" != "${cmd#\{}" ]; then
+        echo "${cmd}" | _filter_testdir | _filter_imgfmt
+    fi
     while [ ${count} -gt 0 ]
     do
         echo "${cmd}" >&${QEMU_IN[${h}]}