From 7c4fe3d2d303d4a48fa29209d6824b3b1471e32f Mon Sep 17 00:00:00 2001 From: cunyinch Date: Fri, 16 Jun 2017 08:22:35 +0800 Subject: [PATCH] example/hotplug: quit from hotplug once the count of hotplug is correct. This patch will cut down the autotest time. Change-Id: Ica23bbe39884f1f51f42f836e7c9fa9007c06693 Signed-off-by: cunyinch Reviewed-on: https://review.gerrithub.io/365736 Tested-by: SPDK Automated Test System Reviewed-by: Jim Harris Reviewed-by: Ben Walker --- examples/nvme/hotplug/hotplug.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/nvme/hotplug/hotplug.c b/examples/nvme/hotplug/hotplug.c index 05943febe..30b207826 100644 --- a/examples/nvme/hotplug/hotplug.c +++ b/examples/nvme/hotplug/hotplug.c @@ -358,6 +358,10 @@ io_loop(void) print_stats(); next_stats_tsc += g_tsc_rate; } + + if (g_insert_times == g_expected_insert_times && g_removal_times == g_expected_removal_times) { + break; + } } TAILQ_FOREACH_SAFE(dev, &g_devs, tailq, dev_tmp) {