Commit 536beb13 authored by Ben Walker's avatar Ben Walker Committed by Jim Harris
Browse files

test: Use regular assert in allocate_threads



This allows us to call it during test set up instead of
only within a unit test.

Change-Id: I2daae8d630729b5e0712057766a3cba8812109e9
Signed-off-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/437479


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 7b940538
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -85,12 +85,12 @@ allocate_threads(int num_threads)
	g_ut_num_threads = num_threads;

	g_ut_threads = calloc(num_threads, sizeof(*g_ut_threads));
	SPDK_CU_ASSERT_FATAL(g_ut_threads != NULL);
	assert(g_ut_threads != NULL);

	for (i = 0; i < g_ut_num_threads; i++) {
		set_thread(i);
		thread = spdk_allocate_thread(NULL, NULL, NULL, NULL, NULL);
		SPDK_CU_ASSERT_FATAL(thread != NULL);
		assert(thread != NULL);
		g_ut_threads[i].thread = thread;
	}