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: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/437479
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Ben Walker 2018-12-17 11:30:13 -07:00 committed by Jim Harris
parent 7b94053827
commit 536beb1306

View File

@ -85,12 +85,12 @@ allocate_threads(int num_threads)
g_ut_num_threads = num_threads; g_ut_num_threads = num_threads;
g_ut_threads = calloc(num_threads, sizeof(*g_ut_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++) { for (i = 0; i < g_ut_num_threads; i++) {
set_thread(i); set_thread(i);
thread = spdk_allocate_thread(NULL, NULL, NULL, NULL, NULL); thread = spdk_allocate_thread(NULL, NULL, NULL, NULL, NULL);
SPDK_CU_ASSERT_FATAL(thread != NULL); assert(thread != NULL);
g_ut_threads[i].thread = thread; g_ut_threads[i].thread = thread;
} }