From 30da4d8d93cbfc0062a6c97c2b8255670615405c Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 7 Jun 2005 14:31:45 +0000 Subject: r7369: allow no entries returned by Enum*() metze (This used to be commit 3778da9d17778cb215ac08e1dcd6ad8c0fa13dfd) --- source4/torture/rpc/spoolss.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c index 0ea74c7e56..5d9390ab59 100644 --- a/source4/torture/rpc/spoolss.c +++ b/source4/torture/rpc/spoolss.c @@ -149,7 +149,10 @@ static BOOL test_EnumPorts(struct test_spoolss_context *ctx) ret = False; continue; } - + if (W_ERROR_IS_OK(r.out.result)) { + /* TODO: do some more checks here */ + continue; + } if (!W_ERROR_EQUAL(r.out.result, WERR_INSUFFICIENT_BUFFER)) { printf("EnumPorts unexspected return code %s, should be WERR_INSUFFICIENT_BUFFER\n", win_errstr(r.out.result)); @@ -239,7 +242,10 @@ static BOOL test_EnumPrinterDrivers(struct test_spoolss_context *ctx) ret = False; continue; } - + if (W_ERROR_IS_OK(r.out.result)) { + /* TODO: do some more checks here */ + continue; + } if (!W_ERROR_EQUAL(r.out.result, WERR_INSUFFICIENT_BUFFER)) { printf("EnumPrinterDrivers unexspected return code %s, should be WERR_INSUFFICIENT_BUFFER\n", win_errstr(r.out.result)); @@ -372,7 +378,10 @@ static BOOL test_EnumMonitors(struct test_spoolss_context *ctx) ret = False; continue; } - + if (W_ERROR_IS_OK(r.out.result)) { + /* TODO: do some more checks here */ + continue; + } if (!W_ERROR_EQUAL(r.out.result, WERR_INSUFFICIENT_BUFFER)) { printf("EnumMonitors unexspected return code %s, should be WERR_INSUFFICIENT_BUFFER\n", win_errstr(r.out.result)); @@ -462,7 +471,10 @@ static BOOL test_EnumPrintProcessors(struct test_spoolss_context *ctx) ret = False; continue; } - + if (W_ERROR_IS_OK(r.out.result)) { + /* TODO: do some more checks here */ + continue; + } if (!W_ERROR_EQUAL(r.out.result, WERR_INSUFFICIENT_BUFFER)) { printf("EnumPrintProcessors unexspected return code %s, should be WERR_INSUFFICIENT_BUFFER\n", win_errstr(r.out.result)); @@ -550,7 +562,10 @@ static BOOL test_EnumPrinters(struct test_spoolss_context *ctx) ret = False; continue; } - + if (W_ERROR_IS_OK(r.out.result)) { + /* TODO: do some more checks here */ + continue; + } if (!W_ERROR_EQUAL(r.out.result, WERR_INSUFFICIENT_BUFFER)) { printf("EnumPrinters unexspected return code %s, should be WERR_INSUFFICIENT_BUFFER\n", win_errstr(r.out.result)); -- cgit