Commit 2224554e authored by JinYu's avatar JinYu Committed by Changpeng Liu
Browse files

test/nvme: check_io after reset without setting long time



Make it easier to reproduce issue #819 without setting long time.
To decrease the UT time.

Change-Id: I3dd0268a894113e1a12395618721afee6137588d
Signed-off-by: default avatarJinYu <jin.yu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457914


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
parent cf5c4a8a
Loading
Loading
Loading
Loading
+11 −11
Original line number Diff line number Diff line
@@ -287,17 +287,6 @@ work_fn(void *arg)
	}

	while (1) {
		/*
		 * Check for completed I/O for each controller. A new
		 * I/O will be submitted in the io_complete callback
		 * to replace each I/O that is completed.
		 */
		ns_ctx = worker->ns_ctx;
		while (ns_ctx != NULL) {
			check_io(ns_ctx);
			ns_ctx = ns_ctx->next;
		}

		if (!did_reset && ((tsc_end - spdk_get_ticks()) / g_tsc_rate) > (uint64_t)g_time_in_sec / 2) {
			ns_ctx = worker->ns_ctx;
			while (ns_ctx != NULL) {
@@ -310,6 +299,17 @@ work_fn(void *arg)
			did_reset = true;
		}

		/*
		 * Check for completed I/O for each controller. A new
		 * I/O will be submitted in the io_complete callback
		 * to replace each I/O that is completed.
		 */
		ns_ctx = worker->ns_ctx;
		while (ns_ctx != NULL) {
			check_io(ns_ctx);
			ns_ctx = ns_ctx->next;
		}

		if (spdk_get_ticks() > tsc_end) {
			break;
		}