diff options
author | Günther Deschner <gd@samba.org> | 2010-02-19 14:25:19 +0100 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2010-03-29 09:41:03 +0200 |
commit | d3f3694b054dbcd5b3473ce4d1fa7599332f9d89 (patch) | |
tree | fd80ef8926f834230d5a84aacdd89bd8c07896b4 /source4 | |
parent | f71d5f75f7dd6037f6bc8d952011816ab0bfd43e (diff) | |
download | samba-d3f3694b054dbcd5b3473ce4d1fa7599332f9d89.tar.gz |
s4-smbtorture: add --option=torture:spoolss_check_size=yes.
This disables the size calculation comparison by default.
Guenther
(cherry picked from commit f2ecec3dcdafd63cd72d13019a998bf99539a9ba)
The last 18 patches address bug #6727 (Printer issues on 3.4.x).
(cherry picked from commit a7bb1455a12084ce7400507bc6351f7dead14c0a)
Diffstat (limited to 'source4')
-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 c443f9b0345..044b6aa6570 100644 --- a/source4/torture/rpc/spoolss.c +++ b/source4/torture/rpc/spoolss.c @@ -119,30 +119,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, |