bdevperf: Reset g_run_rc to 0 after sending RPC reply

When RPC kicks the test and the test results in error, RPC response
should return error but bdevperf application should not return error.

RPC can kick the test multiple times, and if RPC kicks the test again
and it completes normally, RPC response should return success.

So reset g_run_rc to 0 after sending RPC response.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I59a7c06a293ba7f7b5caa8171bcfb54d736524da
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479914
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Shuhei Matsumoto 2020-01-09 20:40:25 -05:00 committed by Tomasz Zawadzki
parent 9b36011acc
commit f594537a48

View File

@ -1460,6 +1460,9 @@ rpc_perform_tests_cb(void)
spdk_jsonrpc_send_error_response_fmt(request, SPDK_JSONRPC_ERROR_INTERNAL_ERROR,
"bdevperf failed with error %s", spdk_strerror(-g_run_rc));
}
/* Reset g_run_rc to 0 for the next test run. */
g_run_rc = 0;
}
static void