summaryrefslogtreecommitdiff
path: root/lib/torture
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2010-11-22 12:38:41 +0100
committerStefan Metzmacher <metze@samba.org>2010-12-04 12:55:44 +0100
commit929063bb126b45cfe175a0e9518905bfcc8c95a2 (patch)
tree782f319dee6ea438cb65fa8ee98baca4ce1a27fd /lib/torture
parent69ad3f7f90273cb62f67331982a40aa99ea05d90 (diff)
downloadsamba-929063bb126b45cfe175a0e9518905bfcc8c95a2.tar.gz
samba-929063bb126b45cfe175a0e9518905bfcc8c95a2.tar.bz2
samba-929063bb126b45cfe175a0e9518905bfcc8c95a2.zip
lib/torture: add torture_assert_u64_equal_goto()
metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Sat Dec 4 12:55:44 CET 2010 on sn-devel-104
Diffstat (limited to 'lib/torture')
-rw-r--r--lib/torture/torture.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/torture/torture.h b/lib/torture/torture.h
index 605ba341eb..aeedd71e6b 100644
--- a/lib/torture/torture.h
+++ b/lib/torture/torture.h
@@ -416,6 +416,19 @@ void torture_result(struct torture_context *test,
} \
} while(0)
+#define torture_assert_u64_equal_goto(torture_ctx,got,expected,ret,label,cmt)\
+ do { uint64_t __got = (got), __expected = (expected); \
+ if (__got != __expected) { \
+ torture_result(torture_ctx, TORTURE_FAIL, \
+ __location__": "#got" was %llu (0x%llX), expected %llu (0x%llX): %s", \
+ (unsigned long long)__got, (unsigned long long)__got, \
+ (unsigned long long)__expected, (unsigned long long)__expected, \
+ cmt); \
+ ret = false; \
+ goto label; \
+ } \
+ } while(0)
+
#define torture_assert_errno_equal(torture_ctx,expected,cmt)\
do { int __expected = (expected); \
if (errno != __expected) { \