Commit c80e7df5 authored by cunyinch's avatar cunyinch Committed by Daniel Verkamp
Browse files

test/nvme: optimization of hotplug script.



Change-Id: I167faf4daf04e50b7cb74a90cfeaa0f7a78a113a
Signed-off-by: default avatarcunyinch <cunyin.chang@intel.com>
Reviewed-on: https://review.gerrithub.io/366032


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarZiye Yang <optimistyzy@gmail.com>
Reviewed-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
parent 721a4d44
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -21,13 +21,13 @@ function monitor_cmd() {
}

function get_online_devices_count() {
	ssh_vm "lspci | grep "NVM" | wc -l"
	ssh_vm "lspci | grep -c NVM"
}

function wait_for_devices_ready() {
	count=$(get_online_devices_count)

	while [ "$count" -ne "4" ]; do
	while [ $count -ne 4 ]; do
		echo "waitting for all devices online"
		count=$(get_online_devices_count)
	done