summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-02-19 14:25:19 +0100
committerGünther Deschner <gd@samba.org>2010-02-19 14:25:19 +0100
commitf2ecec3dcdafd63cd72d13019a998bf99539a9ba (patch)
tree8ff292071ae2b53af7320c904acee2ed549f6ce7 /source4/torture
parent299e5bc2ba767a4f23553c247a32d17395c53786 (diff)
downloadsamba-f2ecec3dcdafd63cd72d13019a998bf99539a9ba.tar.gz
s4-smbtorture: add --option=torture:spoolss_check_size=yes.
This disables the size calculation comparison by default. Guenther
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/rpc/spoolss.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c
index 6cc67277f08..e22032d8bc6 100644
--- a/source4/torture/rpc/spoolss.c
+++ b/source4/torture/rpc/spoolss.c
@@ -120,30 +120,36 @@ struct test_spoolss_context {
#define DO_ROUND(size, n) (((size)+((n)-1)) & ~((n)-1))
#define CHECK_NEEDED_SIZE_ENUM_LEVEL(fn, info, level, count, ic, needed, align) do { \
+ if (torture_setting_bool(tctx, "spoolss_check_size", false)) {\
uint32_t size = ndr_size_##fn##_info(tctx, ic, level, count, info);\
uint32_t round_size = DO_ROUND(size, align);\
if (round_size != needed) {\
torture_warning(tctx, __location__": "#fn" level %d (count: %d) got unexpected needed size: %d, we calculated: %d", level, count, needed, round_size);\
CHECK_ALIGN(size, align);\
}\
+ }\
} while(0)
#define CHECK_NEEDED_SIZE_ENUM(fn, info, count, ic, needed, align) do { \
+ if (torture_setting_bool(tctx, "spoolss_check_size", false)) {\
uint32_t size = ndr_size_##fn##_info(tctx, ic, count, info);\
uint32_t round_size = DO_ROUND(size, align);\
if (round_size != needed) {\
torture_warning(tctx, __location__": "#fn" (count: %d) got unexpected needed size: %d, we calculated: %d", count, needed, round_size);\
CHECK_ALIGN(size, align);\
}\
+ }\
} while(0)
#define CHECK_NEEDED_SIZE_LEVEL(fn, info, level, ic, needed, align) do { \
+ if (torture_setting_bool(tctx, "spoolss_check_size", false)) {\
uint32_t size = ndr_size_##fn(info, level, ic, 0);\
uint32_t round_size = DO_ROUND(size, align);\
if (round_size != needed) {\
torture_warning(tctx, __location__": "#fn" level %d got unexpected needed size: %d, we calculated: %d", level, needed, round_size);\
CHECK_ALIGN(size, align);\
}\
+ }\
} while(0)
static bool test_OpenPrinter_server(struct torture_context *tctx,