summaryrefslogtreecommitdiff
path: root/source4/torture/rpc
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2011-01-19 13:48:17 +0100
committerGünther Deschner <gd@samba.org>2011-01-21 10:58:20 +0100
commitaefbec52703a10ebe49ddd4883ea728116825114 (patch)
treeec87fc4d42d8be029d2d139cae0b87626f119112 /source4/torture/rpc
parent7a7b61ef082070de9407c937a86e299a98a6ef58 (diff)
downloadsamba-aefbec52703a10ebe49ddd4883ea728116825114.tar.gz
samba-aefbec52703a10ebe49ddd4883ea728116825114.tar.bz2
samba-aefbec52703a10ebe49ddd4883ea728116825114.zip
s4-smbtorture: add tests for the size member of spoolss devicemodes.
Guenther
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r--source4/torture/rpc/spoolss.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c
index 8ab4f801e7..8f60faba1c 100644
--- a/source4/torture/rpc/spoolss.c
+++ b/source4/torture/rpc/spoolss.c
@@ -2183,11 +2183,15 @@ static bool test_devicemode_full(struct torture_context *tctx,
const char *devicename;/* [charset(UTF16)] */
enum spoolss_DeviceModeSpecVersion specversion;
uint16_t driverversion;
- uint16_t size;
uint16_t __driverextra_length;/* [value(r->driverextra_data.length)] */
uint32_t fields;
#endif
+ TEST_DEVMODE_INT_EXP(8, size, 8, size, __LINE__, WERR_INVALID_PARAM);
+ TEST_DEVMODE_INT_EXP(8, size, 8, size, 0, WERR_INVALID_PARAM);
+ TEST_DEVMODE_INT_EXP(8, size, 8, size, 0xffff, WERR_INVALID_PARAM);
+ TEST_DEVMODE_INT_EXP(8, size, 8, size, ndr_size_spoolss_DeviceMode(devmode_ctr.devmode, 0), WERR_INVALID_PARAM);
+ TEST_DEVMODE_INT(8, size, 8, size, ndr_size_spoolss_DeviceMode(devmode_ctr.devmode, 0) - devmode_ctr.devmode->__driverextra_length);
TEST_DEVMODE_INT(8, orientation, 8, orientation, __LINE__);
TEST_DEVMODE_INT(8, papersize, 8, papersize, __LINE__);
TEST_DEVMODE_INT(8, paperlength, 8, paperlength, __LINE__);