1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

s4:torture: Don't try to close the connection after running disconnect tests

dcerpc_mdssvc_close() would always fail with
STATUS_CONNECTION_DISCONNECTED, causing the testsuite as a whole to
fail.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
Joseph Sutton 2023-04-11 20:57:31 +12:00 committed by Andreas Schneider
parent 2aa9fae1f8
commit 80c548437a

View File

@ -162,13 +162,17 @@ static bool torture_rpc_mdssvc_close(struct torture_context *tctx,
{
struct torture_mdsscv_state *state = talloc_get_type_abort(
data, struct torture_mdsscv_state);
struct dcerpc_binding_handle *b = state->p->binding_handle;
NTSTATUS status;
bool ok = true;
torture_comment(tctx, "test_teardown_mdssvc_disconnect\n");
status = dcerpc_mdssvc_close(b,
if (state->p == NULL) {
/* We have already been disconnected. */
goto done;
}
status = dcerpc_mdssvc_close(state->p->binding_handle,
state,
&state->ph,
0,
@ -497,6 +501,10 @@ static bool test_mdssvc_invalid_ph_unknown1(struct torture_context *tctx,
tctx, status, NT_STATUS_RPC_PROTOCOL_ERROR, ok, done,
"dcerpc_mdssvc_unknown1 failed\n");
/* Free and set to NULL the no-longer-usable pipe. */
b = NULL;
TALLOC_FREE(state->p);
done:
return ok;
}
@ -565,6 +573,10 @@ static bool test_mdssvc_invalid_ph_cmd(struct torture_context *tctx,
tctx, status, NT_STATUS_RPC_PROTOCOL_ERROR, ok, done,
"dcerpc_mdssvc_unknown1 failed\n");
/* Free and set to NULL the no-longer-usable pipe. */
b = NULL;
TALLOC_FREE(state->p);
done:
return ok;
}
@ -602,6 +614,10 @@ static bool test_mdssvc_invalid_ph_close(struct torture_context *tctx,
tctx, status, NT_STATUS_RPC_PROTOCOL_ERROR, ok, done,
"dcerpc_mdssvc_unknown1 failed\n");
/* Free and set to NULL the no-longer-usable pipe. */
b = NULL;
TALLOC_FREE(state->p);
done:
return ok;
}