summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/torture/rpc/drsuapi.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/source4/torture/rpc/drsuapi.h b/source4/torture/rpc/drsuapi.h
index d32a35ee2c..8901767549 100644
--- a/source4/torture/rpc/drsuapi.h
+++ b/source4/torture/rpc/drsuapi.h
@@ -45,10 +45,11 @@ struct DsPrivate {
* \param _tctx torture context
* \param _p DCERPC pipe handle
* \param _ntstatus NTSTATUS for dcerpc_drsuapi_ call
- * \param _pr in/out DCEPRC request structure
+ * \param _werr_expected Expected windows error to be returned
+ * \param _pr in/out DCEPRC request structure - pointer
* \param _msg error message prefix
*/
-#define torture_drsuapi_assert_call(_tctx, _p, _ntstat, _pr, _msg) \
+#define torture_drsuapi_assert_call_werr(_tctx, _p, _ntstat, _werr_expected, _pr, _msg) \
do { \
NTSTATUS __nt = _ntstat; \
if (!NT_STATUS_IS_OK(__nt)) { \
@@ -58,6 +59,18 @@ struct DsPrivate {
} \
torture_fail(tctx, talloc_asprintf(_tctx, "%s failed - %s", _msg, errstr)); \
} \
- torture_assert_werr_ok(_tctx, (_pr)->out.result, _msg); \
+ torture_assert_werr_equal(_tctx, (_pr)->out.result, _werr_expected, _msg); \
} while(0)
+/**
+ * Custom torture macro to check dcerpc_drsuapi_ call
+ * return values printing more friendly messages
+ * \param _tctx torture context
+ * \param _p DCERPC pipe handle
+ * \param _ntstatus NTSTATUS for dcerpc_drsuapi_ call
+ * \param _pr in/out DCEPRC request structure
+ * \param _msg error message prefix
+ */
+#define torture_drsuapi_assert_call(_tctx, _p, _ntstat, _pr, _msg) \
+ torture_drsuapi_assert_call_werr(_tctx, _p, _ntstat, WERR_OK, _pr, _msg)
+