Commit 5412468f authored by Shuhei Matsumoto's avatar Shuhei Matsumoto Committed by Tomasz Zawadzki
Browse files

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: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ia43da0793f8e77a5d5491758589e9b77f4cf86e7
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478832


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
parent c3aad41f
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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;
	}
}