diff options
author | Günther Deschner <gd@samba.org> | 2009-12-08 10:21:28 +0100 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2009-12-15 08:16:41 +0100 |
commit | d5efd83325d0c0f9ca5efcc2b40dd712851c73aa (patch) | |
tree | 54dcf2724555232154b01ced3fab7facada85111 /source4 | |
parent | ec1e4fb9527dcd45056d4e161b50b4c0fa2fbab7 (diff) | |
download | samba-d5efd83325d0c0f9ca5efcc2b40dd712851c73aa.tar.gz samba-d5efd83325d0c0f9ca5efcc2b40dd712851c73aa.tar.xz samba-d5efd83325d0c0f9ca5efcc2b40dd712851c73aa.zip |
s4-smbtorture: fill in COMPARE_STRING_ARRAY macro in spoolss driver test.
Guenther
(cherry picked from commit 35c067782b1dcd354dd825af3e853adf4c74e1d1)
(cherry picked from commit 52361a5c66773e2032b5b9a67b5c3d47ea0c3430)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/torture/rpc/spoolss.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c index 26083a7a20a..1a2c6ddea4a 100644 --- a/source4/torture/rpc/spoolss.c +++ b/source4/torture/rpc/spoolss.c @@ -80,7 +80,21 @@ struct test_spoolss_context { torture_assert_int_equal(tctx, c.e, r.e, "invalid value"); \ } while(0) -#define COMPARE_STRING_ARRAY(tctx, c,r,e) +#define COMPARE_STRING_ARRAY(tctx, c,r,e) do {\ + int __i; \ + if (!c.e && !r.e) { \ + break; \ + } \ + if (c.e && !r.e) { \ + torture_fail(tctx, #r "." #e " field is NULL and " #c "." #e " is not\n"); \ + } \ + if (!c.e && r.e) { \ + torture_fail(tctx, #c "." #e " field is NULL and " #r "." #e " is not\n"); \ + } \ + for (__i=0;c.e[__i] != NULL; __i++) { \ + torture_assert_str_equal(tctx, c.e[__i], r.e[__i], "invalid value"); \ + } \ +} while(0) static bool test_OpenPrinter_server(struct torture_context *tctx, struct dcerpc_pipe *p, |