diff options
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r-- | source4/torture/rpc/spoolss.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c index 6cc67277f0..e22032d8bc 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, |