Commit 482ca8eb authored by Darek Stojaczyk's avatar Darek Stojaczyk Committed by Tomasz Zawadzki
Browse files

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: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2143


Community-CI: Mellanox Build Bot
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
parent 25f4704e
Loading
Loading
Loading
Loading
+1 −7
Original line number Diff line number Diff line
@@ -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() {