[SCM] Samba Shared Repository - branch master updated

Günther Deschner gd at samba.org
Mon Jan 11 04:43:12 MST 2010


The branch, master has been updated
       via  403dc10... testprogs: fix driver levels in spoolss test.
       via  9a1b298... testprogs: test each printer, do not abort after first failure.
       via  3e7b7bf... testprogs: fix EnumPrintProcessorDatatypes spoolss test.
       via  4aefb33... testprogs: add more error codes to spoolss test.
      from  0ad8381... s3: Add a zfsacl:denymissingspecial parameter

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 403dc10e8ff46282dd7f4afbd5e5f3fbcc73177d
Author: Günther Deschner <gd at samba.org>
Date:   Mon Jan 11 12:38:22 2010 +0100

    testprogs: fix driver levels in spoolss test.
    
    Guenther

commit 9a1b298e3d32252dd83fd2146b578e5150a06c7b
Author: Günther Deschner <gd at samba.org>
Date:   Mon Jan 11 12:37:45 2010 +0100

    testprogs: test each printer, do not abort after first failure.
    
    Guenther

commit 3e7b7bfd27fad1680f9f331e5b8d736bc3733e05
Author: Günther Deschner <gd at samba.org>
Date:   Mon Jan 11 12:34:56 2010 +0100

    testprogs: fix EnumPrintProcessorDatatypes spoolss test.
    
    Guenther

commit 4aefb33b9fa4b93fea7035c505e480949bfb843b
Author: Günther Deschner <gd at samba.org>
Date:   Mon Jan 11 12:33:22 2010 +0100

    testprogs: add more error codes to spoolss test.
    
    Guenther

-----------------------------------------------------------------------

Summary of changes:
 testprogs/win32/spoolss/error.c   |    4 ++++
 testprogs/win32/spoolss/spoolss.c |   23 +++++++++++------------
 2 files changed, 15 insertions(+), 12 deletions(-)


Changeset truncated at 500 lines:

diff --git a/testprogs/win32/spoolss/error.c b/testprogs/win32/spoolss/error.c
index e523c15..ba15c1e 100644
--- a/testprogs/win32/spoolss/error.c
+++ b/testprogs/win32/spoolss/error.c
@@ -25,6 +25,8 @@ const char *errstr(DWORD error)
 	static char tmp[20];
 
 	switch (error) {
+	case ERROR_FILE_NOT_FOUND:
+		return "ERROR_FILE_NOT_FOUND";
 	case ERROR_ACCESS_DENIED:
 		return "ERROR_ACCESS_DENIED";
 	case ERROR_INVALID_PARAMETER:
@@ -105,6 +107,8 @@ const char *errstr(DWORD error)
 	case ERROR_PRINT_JOB_RESTART_REQUIRED:
 		return "ERROR_PRINT_JOB_RESTART_REQUIRED";
 #endif
+	case ERROR_CANCELLED:
+		return "ERROR_CANCELLED";
 	default:
 		break;
 	}
diff --git a/testprogs/win32/spoolss/spoolss.c b/testprogs/win32/spoolss/spoolss.c
index c550b99..5c77413 100644
--- a/testprogs/win32/spoolss/spoolss.c
+++ b/testprogs/win32/spoolss/spoolss.c
@@ -122,8 +122,8 @@ static BOOL test_EnumDrivers(struct torture_context *tctx,
 			     LPSTR servername,
 			     LPSTR architecture)
 {
-	DWORD levels[]  = { 1, 2, 3, 4, 5, 6, 8 };
-	DWORD success[] = { 1, 1, 1, 1, 1, 1, 1 };
+	DWORD levels[]  = { 1, 2, 3, 4, 5, 6 };
+	DWORD success[] = { 1, 1, 1, 1, 1, 1 };
 	DWORD i;
 	LPBYTE buffer = NULL;
 
@@ -357,8 +357,7 @@ static BOOL test_EnumPrintProcessors(struct torture_context *tctx,
 ****************************************************************************/
 
 static BOOL test_EnumPrintProcessorDatatypes(struct torture_context *tctx,
-					     LPSTR servername,
-					     LPSTR architecture)
+					     LPSTR servername)
 {
 	DWORD levels[]  = { 1 };
 	DWORD success[] = { 1 };
@@ -374,13 +373,13 @@ static BOOL test_EnumPrintProcessorDatatypes(struct torture_context *tctx,
 
 		torture_comment(tctx, "Testing EnumPrintProcessorDatatypes level %d", levels[i]);
 
-		EnumPrintProcessorDatatypes(servername, architecture, levels[i], NULL, 0, &needed, &returned);
+		EnumPrintProcessorDatatypes(servername, "winprint", levels[i], NULL, 0, &needed, &returned);
 		err = GetLastError();
 		if (err == ERROR_INSUFFICIENT_BUFFER) {
 			err = 0;
 			buffer = malloc(needed);
 			torture_assert(tctx, buffer, "malloc failed");
-			if (!EnumPrintProcessorDatatypes(servername, architecture, levels[i], buffer, needed, &needed, &returned)) {
+			if (!EnumPrintProcessorDatatypes(servername, "winprint", levels[i], buffer, needed, &needed, &returned)) {
 				err = GetLastError();
 			}
 		}
@@ -456,8 +455,8 @@ static BOOL test_GetPrinterDriver(struct torture_context *tctx,
 				  LPSTR architecture,
 				  HANDLE handle)
 {
-	DWORD levels[]  = { 1, 2, 3, 4, 5, 6, 8, 101};
-	DWORD success[] = { 1, 1, 1, 1, 1, 1, 1, 1 };
+	DWORD levels[]  = { 1, 2, 3, 4, 5, 6, 8 };
+	DWORD success[] = { 1, 1, 1, 1, 1, 1, 1 };
 	DWORD i;
 	LPBYTE buffer = NULL;
 
@@ -600,6 +599,7 @@ static BOOL test_EachPrinter(struct torture_context *tctx,
 	DWORD i;
 	DWORD flags = PRINTER_ENUM_NAME;
 	PPRINTER_INFO_1 buffer = NULL;
+	BOOL ret = TRUE;
 
 	torture_comment(tctx, "Testing EnumPrinters level %d", 1);
 
@@ -620,13 +620,12 @@ static BOOL test_EachPrinter(struct torture_context *tctx,
 	}
 
 	for (i=0; i < returned; i++) {
-		torture_assert(tctx, test_OnePrinter(tctx, buffer[i].pName, architecture),
-			"failed to test one printer");
+		ret &= test_OnePrinter(tctx, buffer[i].pName, architecture);
 	}
 
 	free(buffer);
 
-	return TRUE;
+	return ret;
 }
 
 /****************************************************************************
@@ -763,7 +762,7 @@ int main(int argc, char *argv[])
 	ret &= test_EnumPorts(tctx, servername);
 	ret &= test_EnumMonitors(tctx, servername);
 	ret &= test_EnumPrintProcessors(tctx, servername, architecture);
-	ret &= test_EnumPrintProcessorDatatypes(tctx, servername, architecture);
+	ret &= test_EnumPrintProcessorDatatypes(tctx, servername);
 	ret &= test_GetPrintProcessorDirectory(tctx, servername, architecture);
 	ret &= test_GetPrinterDriverDirectory(tctx, servername, architecture);
 	ret &= test_EachPrinter(tctx, servername, architecture);


-- 
Samba Shared Repository


More information about the samba-cvs mailing list