bdevperf: Use negative errno to pass bdevperf_fini() or rpc_perform_tests_cb()
bdevperf_fini() had expected to get one but rpc_perform_tests_cb() had expected to get negative errno for any error. Using negative errno will be reasonable and change the code accordingly. The next patch will unify local rc variables and the global g_run_failed by changing g_run_failed to g_run_errno. Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: Ia43da0793f8e77a5d5491758589e9b77f4cf86e7 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478832 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
c3aad41fb1
commit
5412468f87
@ -471,7 +471,7 @@ end_run(void *arg1, void *arg2)
|
||||
}
|
||||
|
||||
if (g_run_failed) {
|
||||
rc = 1;
|
||||
rc = -1;
|
||||
}
|
||||
|
||||
if (g_request && !g_shutdown) {
|
||||
@ -1308,7 +1308,7 @@ bdevperf_run(void *arg1)
|
||||
|
||||
rc = blockdev_heads_init();
|
||||
if (rc) {
|
||||
spdk_app_stop(1);
|
||||
spdk_app_stop(rc);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1323,7 +1323,7 @@ bdevperf_run(void *arg1)
|
||||
|
||||
rc = bdevperf_test();
|
||||
if (rc) {
|
||||
bdevperf_fini(1);
|
||||
bdevperf_fini(rc);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user