test/ioat: verify app will exit with error code

This change will make sure that verify application
exits with error code 1 whenever there was
no test performed.

Mainly by checking work_fn return code.
Other changes made to align with returning 1 on error.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I28a36dd5d5adb50bb4f54b1cc724c80da96af564
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1671
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
This commit is contained in:
Tomasz Zawadzki 2020-04-03 04:10:26 -04:00
parent 23a7e4b94f
commit 5a48cd9690

View File

@ -328,7 +328,7 @@ work_fn(void *arg)
struct thread_entry *t = (struct thread_entry *)arg;
if (!t->chan) {
return 0;
return 1;
}
t->lcore_id = spdk_env_get_current_core();
@ -369,7 +369,7 @@ init_src_buffer(void)
g_src = spdk_dma_zmalloc(SRC_BUFFER_SIZE, 512, NULL);
if (g_src == NULL) {
fprintf(stderr, "Allocate src buffer failed\n");
return -1;
return 1;
}
for (i = 0; i < SRC_BUFFER_SIZE / 4; i++) {
@ -504,7 +504,10 @@ main(int argc, char **argv)
}
threads[current_core].chan = get_next_chan();
work_fn(&threads[current_core]);
if (work_fn(&threads[current_core]) != 0) {
rc = 1;
goto cleanup;
}
spdk_env_thread_wait_all();
rc = dump_result(threads, num_threads);