samba-cvs.cvs
[Top] [All Lists]

[SCM] Samba Shared Repository - branch master updated

Subject: [SCM] Samba Shared Repository - branch master updated
From: Günther Deschner
Date: Wed, 3 Mar 2010 07:42:45 -0600 CST
The branch, master has been updated
       via  892213c... testprogs: fix boolean return code of test_PrinterData.
      from  d8ae32e... dns: make dns update script use unbuffered IO

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


- Log -----------------------------------------------------------------
commit 892213c7b72b8d22c56c6bd827c8e8785db83849
Author: Günther Deschner <gd@xxxxxxxxx>
Date:   Wed Mar 3 12:32:41 2010 +0100

    testprogs: fix boolean return code of test_PrinterData.
    
    Guenther

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

Summary of changes:
 testprogs/win32/spoolss/spoolss.c |   20 ++++++++++++--------
 1 files changed, 12 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/testprogs/win32/spoolss/spoolss.c 
b/testprogs/win32/spoolss/spoolss.c
index 97bf5eb..7417b7f 100644
--- a/testprogs/win32/spoolss/spoolss.c
+++ b/testprogs/win32/spoolss/spoolss.c
@@ -1424,22 +1424,26 @@ static BOOL test_PrinterData(struct torture_context 
*tctx,
 
                torture_comment(tctx, "Testing PrinterData (type: %s, size: 
0x%08x)", reg_type_str(type), size);
 
-               ret &= test_SetPrinterDataEx(tctx, printername, keyname, 
valuename, handle, type, buffer, size);
-               ret &= test_GetPrinterDataEx(tctx, printername, keyname, 
valuename, handle, &type_ex, &buffer_ex, &size_ex);
-               if (ret == TRUE) {
-                       if (!PrinterDataEqual(tctx, type_ex, type, size_ex, 
size, buffer_ex, buffer)) {
-                               torture_warning(tctx, "GetPrinterDataEx does 
not return the same info as we set with SetPrinterDataEx");
-                               ret = FALSE;
-                       }
+               torture_assert(tctx,
+                       test_SetPrinterDataEx(tctx, printername, keyname, 
valuename, handle, type, buffer, size),
+                       "failed to call SetPrinterDataEx");
+               torture_assert(tctx,
+                       test_GetPrinterDataEx(tctx, printername, keyname, 
valuename, handle, &type_ex, &buffer_ex, &size_ex),
+                       "failed to call GetPrinterDataEx");
+
+               if (!PrinterDataEqual(tctx, type_ex, type, size_ex, size, 
buffer_ex, buffer)) {
+                       torture_warning(tctx, "GetPrinterDataEx does not return 
the same info as we set with SetPrinterDataEx");
+                       ret = FALSE;
                }
                ret &= test_DeletePrinterDataEx(tctx, printername, keyname, 
valuename, handle);
                ret &= test_DeletePrinterKey(tctx, printername, keyname, 
handle);
 
                free(buffer);
+               free(buffer_ex);
        }
        }
 
-       return TRUE;
+       return ret;
 }
 
 /****************************************************************************


-- 
Samba Shared Repository

<Prev in Thread] Current Thread [Next in Thread>