From 482ca8eb6056376f72eef1030b03bcd9177a5abe Mon Sep 17 00:00:00 2001 From: Darek Stojaczyk Date: Thu, 30 Apr 2020 12:33:27 +0200 Subject: [PATCH] test/nvme/hotplug: always print QEMU monitor output Always print QEMU's output to the screen - there's not a lot of it and something may come useful. Let's know what's happening. The text-based QEMU monitor always runs in an interactive mode, so post-process its output a bit: $ monitor_cmd info status QEMU 5.0.0 monitor - type 'help' for more information (qemu) info status VM status: running (qemu) Clean it up by removing the first line, then filter out any lines prefixed with "(qemu) ". Change-Id: I20b56bbdfc868bc11468dea5ef246cf1db1b4ab8 Signed-off-by: Darek Stojaczyk Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2143 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Shuhei Matsumoto --- test/nvme/hotplug.sh | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/test/nvme/hotplug.sh b/test/nvme/hotplug.sh index f3ac0122e..615958871 100755 --- a/test/nvme/hotplug.sh +++ b/test/nvme/hotplug.sh @@ -17,13 +17,7 @@ function ssh_vm() { } function monitor_cmd() { - rc=0 - if ! (echo "$@" | nc localhost 4444 > mon.log); then - rc=1 - cat mon.log - fi - rm mon.log - return $rc + echo "$@" | nc localhost 4444 | tail --lines=+2 | (grep -v '^(qemu) ' || true) } function get_online_devices_count() {