From 6aeb0a08abed38f311970d403b366636d01d8a8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnther=20Deschner?= Date: Fri, 26 Jun 2015 00:48:03 +0200 Subject: [PATCH] s4-torture: move torture_assert_sid_equal() out of ndr headers. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Guenther Signed-off-by: Günther Deschner Reviewed-by: Stefan Metzmacher --- lib/torture/torture.h | 10 ++++++++++ source4/torture/ndr/ndr.h | 10 ---------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/torture/torture.h b/lib/torture/torture.h index b90af843858..2d1ecccb936 100644 --- a/lib/torture/torture.h +++ b/lib/torture/torture.h @@ -500,6 +500,16 @@ void torture_result(struct torture_context *test, }\ } while(0) +#define torture_assert_sid_equal(torture_ctx,got,expected,cmt)\ + do { struct dom_sid *__got = (got), *__expected = (expected); \ + if (!dom_sid_equal(__got, __expected)) { \ + torture_result(torture_ctx, TORTURE_FAIL, \ + __location__": "#got" was %s, expected %s: %s", \ + dom_sid_string(torture_ctx, __got), dom_sid_string(torture_ctx, __expected), cmt); \ + return false; \ + } \ + } while(0) + #define torture_assert_not_null(torture_ctx,got,cmt)\ do { void *__got = (got); \ if (__got == NULL) { \ diff --git a/source4/torture/ndr/ndr.h b/source4/torture/ndr/ndr.h index 068d5f64633..8b34cd9c742 100644 --- a/source4/torture/ndr/ndr.h +++ b/source4/torture/ndr/ndr.h @@ -73,14 +73,4 @@ _PUBLIC_ struct torture_test *_torture_suite_add_ndr_pull_inout_test( sizeof(struct name), \ (bool (*) (struct torture_context *, void *)) check_fn_out); -#define torture_assert_sid_equal(torture_ctx,got,expected,cmt)\ - do { struct dom_sid *__got = (got), *__expected = (expected); \ - if (!dom_sid_equal(__got, __expected)) { \ - torture_result(torture_ctx, TORTURE_FAIL, \ - __location__": "#got" was %s, expected %s: %s", \ - dom_sid_string(torture_ctx, __got), dom_sid_string(torture_ctx, __expected), cmt); \ - return false; \ - } \ - } while(0) - #endif /* __TORTURE_NDR_H__ */