bdevperf: Use rpc_perform_tests_cb to remove duplicated code
Due to the last patch, we can use rpc_perform_tests_cb() in rpc_perform_tests() simply and remove the duplicated code. Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: Id56da12fb5c52b6d178912f2f6cc7ead8a9cc36e Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478761 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
15cc012336
commit
f4e536cb57
@ -1458,11 +1458,7 @@ rpc_perform_tests(struct spdk_jsonrpc_request *request, const struct spdk_json_v
|
||||
|
||||
rc = bdevperf_test();
|
||||
if (rc) {
|
||||
g_request = NULL;
|
||||
bdevperf_free_targets();
|
||||
spdk_jsonrpc_send_error_response_fmt(request, SPDK_JSONRPC_ERROR_INTERNAL_ERROR,
|
||||
"Could not perform tests due to error: %s", spdk_strerror(-rc));
|
||||
return;
|
||||
rpc_perform_tests_cb(rc);
|
||||
}
|
||||
}
|
||||
SPDK_RPC_REGISTER("perform_tests", rpc_perform_tests, SPDK_RPC_RUNTIME)
|
||||
|
Loading…
Reference in New Issue
Block a user