1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-09 08:58:35 +03:00

SMB2-LOCK: make use of torture_assert_*()

This is needed in order to mark tests as known failures.

metze
This commit is contained in:
Stefan Metzmacher 2009-11-18 08:12:48 +01:00
parent 77f335042b
commit c2a29967ea

View File

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