diff options
author | Günther Deschner <gd@samba.org> | 2010-03-03 12:32:41 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2010-03-03 14:42:31 +0100 |
commit | 892213c7b72b8d22c56c6bd827c8e8785db83849 (patch) | |
tree | 173cac80f96f772502dca127b06be3d64bc770df /testprogs | |
parent | d8ae32ec4183b121b207fbfb84d4be726f0cdb8f (diff) | |
download | samba-892213c7b72b8d22c56c6bd827c8e8785db83849.tar.gz samba-892213c7b72b8d22c56c6bd827c8e8785db83849.tar.bz2 samba-892213c7b72b8d22c56c6bd827c8e8785db83849.zip |
testprogs: fix boolean return code of test_PrinterData.
Guenther
Diffstat (limited to 'testprogs')
-rw-r--r-- | testprogs/win32/spoolss/spoolss.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/testprogs/win32/spoolss/spoolss.c b/testprogs/win32/spoolss/spoolss.c index 97bf5eb1fc..7417b7f321 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; } /**************************************************************************** |