SMB2-LOCK: make use of torture_assert_*()
authorStefan Metzmacher <metze@samba.org>
Wed, 18 Nov 2009 07:12:48 +0000 (08:12 +0100)
committerStefan Metzmacher <metze@samba.org>
Wed, 18 Nov 2009 07:24:13 +0000 (08:24 +0100)
This is needed in order to mark tests as known failures.

metze

source4/torture/smb2/lock.c

index 211578b5d637ab423352ea49c77454b98f46a236..4308ff983c2a63c667d770ca5080d1adf09cc861 100644 (file)
 #define TARGET_IS_W2K8(_tctx) (torture_setting_bool(_tctx, "w2k8", false))
 
 #define CHECK_STATUS(status, correct) do { \
-       if (!NT_STATUS_EQUAL(status, correct)) { \
-               printf("(%s) Incorrect status %s - should be %s\n", \
-                      __location__, nt_errstr(status), nt_errstr(correct)); \
-               ret = false; \
-               goto done; \
-       }} while (0)
+       const char *_cmt = "(" __location__ ")"; \
+       torture_assert_ntstatus_equal_goto(torture,status,correct,ret,done,_cmt); \
+} while (0)
 
 #define CHECK_VALUE(v, correct) do { \
-       if ((v) != (correct)) { \
-               printf("(%s) Incorrect value %s=%d - should be %d\n", \
-                      __location__, #v, v, correct); \
-               ret = false; \
-               goto done; \
-       }} while (0)
+       const char *_cmt = "(" __location__ ")"; \
+       torture_assert_int_equal_goto(torture,v,correct,ret,done,_cmt); \
+} while (0)
 
 static bool test_valid_request(struct torture_context *torture, struct smb2_tree *tree)
 {