Author: akhaldi
Date: Sat Jun 25 11:28:00 2016
New Revision: 71668
URL:
http://svn.reactos.org/svn/reactos?rev=71668&view=rev
Log:
[MSI_WINETEST] Sync with Wine Staging 1.9.12. CORE-11266
Modified:
trunk/rostests/winetests/msi/action.c
trunk/rostests/winetests/msi/automation.c
trunk/rostests/winetests/msi/db.c
trunk/rostests/winetests/msi/package.c
Modified: trunk/rostests/winetests/msi/action.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msi/action.c?re…
==============================================================================
--- trunk/rostests/winetests/msi/action.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/msi/action.c [iso-8859-1] Sat Jun 25 11:28:00 2016
@@ -21,6 +21,7 @@
#define _WIN32_MSI 300
#include <stdio.h>
+#include <stdlib.h>
#include <windows.h>
#include <msiquery.h>
@@ -28,6 +29,9 @@
#include <msi.h>
#include <fci.h>
#include <srrestoreptapi.h>
+#include <wtypes.h>
+#include <shellapi.h>
+#include <winsvc.h>
#include "wine/test.h"
@@ -230,7 +234,7 @@
"LoadOrderGroup\tDependencies\tStartName\tPassword\tArguments\tComponent_\tDescription\n"
"s72\ts255\tL255\ti4\ti4\ti4\tS255\tS255\tS255\tS255\tS255\ts72\tL255\n"
"ServiceInstall\tServiceInstall\n"
-
"TestService\tTestService\tTestService\t2\t3\t0\t\t\tTestService\t\t\tservice_comp\t\n"
+
"TestService\tTestService\tTestService\t2\t3\t32768\t\t\tTestService\t\t\tservice_comp\t\n"
"TestService4\tTestService4\tTestService4\t2\t3\t0\t\t\tTestService4\t\t\tservice_comp3\t\n";
static const char service_control_dat[] =
@@ -5423,6 +5427,30 @@
DeleteFileA(msifile);
}
+static void delete_TestService(void)
+{
+ BOOL ret;
+ SC_HANDLE manager, service;
+
+ manager = OpenSCManagerA(NULL, NULL, SC_MANAGER_ALL_ACCESS);
+ ok(manager != NULL, "can't open service manager\n");
+ if (!manager)
+ return;
+
+ service = OpenServiceA(manager, "TestService", GENERIC_ALL);
+ ok(service != NULL, "TestService doesn't exist\n");
+
+ if (service)
+ {
+ ret = DeleteService( service );
+ ok( ret, "failed to delete service %u\n", GetLastError() );
+
+ CloseServiceHandle(service);
+ }
+ CloseServiceHandle(manager);
+
+}
+
static void test_delete_services(void)
{
UINT r;
@@ -5488,6 +5516,7 @@
ok(delete_pf("msitest", FALSE), "Directory not created\n");
error:
+ delete_TestService();
delete_test_files();
DeleteFileA(msifile);
}
@@ -5496,7 +5525,9 @@
{
UINT r;
SC_HANDLE manager, service;
- BOOL ret;
+ LONG res;
+ HKEY hKey;
+ DWORD err_control, err_controlsize, err_controltype;
if (is_process_limited())
{
@@ -5528,6 +5559,19 @@
service = OpenServiceA(manager, "TestService4", GENERIC_ALL);
ok(service == NULL, "TestService4 installed\n");
CloseServiceHandle(manager);
+
+ res = RegOpenKeyA(HKEY_LOCAL_MACHINE,
"SYSTEM\\CurrentControlSet\\Services\\TestService", &hKey);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+
+ if (res == ERROR_SUCCESS)
+ {
+ err_control = 0xBEEF;
+ err_controltype = REG_DWORD;
+ err_controlsize = sizeof(err_control);
+ res = RegQueryValueExA(hKey, "ErrorControl", NULL,
&err_controltype, (LPBYTE)&err_control, &err_controlsize);
+ ok(err_control == 0, "TestService.ErrorControl wrong, expected 0, got
%u\n", err_control);
+ RegCloseKey(hKey);
+ }
r = MsiInstallProductA(msifile, "REMOVE=ALL");
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
@@ -5546,20 +5590,8 @@
ok(delete_pf("msitest\\service2.exe", TRUE), "File not
installed\n");
ok(delete_pf("msitest", FALSE), "Directory not created\n");
- manager = OpenSCManagerA(NULL, NULL, SC_MANAGER_ALL_ACCESS);
- ok(manager != NULL, "can't open service manager\n");
- if (!manager) goto error;
-
- service = OpenServiceA(manager, "TestService", GENERIC_ALL);
- ok(service != NULL, "TestService doesn't exist\n");
-
- ret = DeleteService( service );
- ok( ret, "failed to delete service %u\n", GetLastError() );
-
- CloseServiceHandle(service);
- CloseServiceHandle(manager);
-
error:
+ delete_TestService();
delete_test_files();
DeleteFileA(msifile);
}
@@ -5882,7 +5914,7 @@
size = 0;
r =
MsiProvideQualifiedComponentA("{92AFCBC0-9CA6-4270-8454-47C5EE2B8FAA}",
"english.txt", INSTALLMODE_DEFAULT, NULL, &size);
- ok(r == ERROR_SUCCESS, "MsiProvideQualifiedCompontent returned %d\n", r);
+ ok(r == ERROR_SUCCESS, "MsiProvideQualifiedComponent returned %d\n", r);
res = RegOpenKeyA(HKEY_CURRENT_USER, keypath, &key);
ok(res == ERROR_SUCCESS, "components key not created %d\n", res);
@@ -5908,7 +5940,7 @@
size = 0;
r =
MsiProvideQualifiedComponentA("{92AFCBC0-9CA6-4270-8454-47C5EE2B8FAA}",
"english.txt", INSTALLMODE_DEFAULT, NULL, &size);
- ok(r == ERROR_SUCCESS, "MsiProvideQualifiedCompontent returned %d\n", r);
+ ok(r == ERROR_SUCCESS, "MsiProvideQualifiedComponent returned %d\n", r);
if (pRegDeleteKeyExA)
res = pRegDeleteKeyExA(HKEY_LOCAL_MACHINE, keypath2, KEY_WOW64_64KEY, 0);
Modified: trunk/rostests/winetests/msi/automation.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msi/automation.…
==============================================================================
--- trunk/rostests/winetests/msi/automation.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/msi/automation.c [iso-8859-1] Sat Jun 25 11:28:00 2016
@@ -29,6 +29,7 @@
#include <msidefs.h>
#include <msi.h>
#include <fci.h>
+#include <oaidl.h>
#include "wine/test.h"
@@ -600,10 +601,7 @@
while (ptr->name)
{
dispid = get_dispid(pInstaller, ptr->name);
- if (ptr->todo)
- todo_wine
- ok(dispid == ptr->did, "%s: expected %d, got %d\n",
ptr->name, ptr->did, dispid);
- else
+ todo_wine_if (ptr->todo)
ok(dispid == ptr->did, "%s: expected %d, got %d\n",
ptr->name, ptr->did, dispid);
ptr++;
}
@@ -884,9 +882,7 @@
if (hr == S_OK)
{
- if (_invoke_todo_vtResult) todo_wine
- ok(V_VT(pVarResult) == vtResult, "Variant result type is %d, expected
%d\n", V_VT(pVarResult), vtResult);
- else
+ todo_wine_if (_invoke_todo_vtResult)
ok(V_VT(pVarResult) == vtResult, "Variant result type is %d, expected
%d\n", V_VT(pVarResult), vtResult);
if (vtResult != VT_EMPTY)
{
Modified: trunk/rostests/winetests/msi/db.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msi/db.c?rev=71…
==============================================================================
--- trunk/rostests/winetests/msi/db.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/msi/db.c [iso-8859-1] Sat Jun 25 11:28:00 2016
@@ -23,11 +23,10 @@
#include <stdio.h>
#include <windows.h>
+#include <objidl.h>
#include <msi.h>
#include <msidefs.h>
#include <msiquery.h>
-
-#include <objidl.h>
#include "wine/test.h"
@@ -8069,7 +8068,7 @@
r = run_query(href, 0, query);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- /* column sting types don't match exactly */
+ /* column string types don't match exactly */
r = MsiDatabaseMergeA(hdb, href, "MergeErrors");
ok(r == ERROR_SUCCESS,
"Expected ERROR_SUCCESS, got %d\n", r);
Modified: trunk/rostests/winetests/msi/package.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msi/package.c?r…
==============================================================================
--- trunk/rostests/winetests/msi/package.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/msi/package.c [iso-8859-1] Sat Jun 25 11:28:00 2016
@@ -2482,7 +2482,7 @@
r = MsiOpenDatabaseW(msifileW, MSIDBOPEN_CREATE, &hdb);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- /* database exists, but is emtpy */
+ /* database exists, but is empty */
sprintf(name, "#%d", hdb);
r = MsiOpenPackageA(name, &hpack);
ok(r == ERROR_INSTALL_PACKAGE_INVALID,
@@ -2638,19 +2638,14 @@
{
ok( state == expected_state, "%u: expected state %d got %d\n",
line, expected_state, state );
- if (todo) todo_wine
+ todo_wine_if (todo)
ok( action == expected_action, "%u: expected action %d got %d\n",
line, expected_action, action );
- else
- ok( action == expected_action, "%u: expected action %d got %d\n",
- line, expected_action, action );
}
else
{
ok( state == 0xdeadbee, "%u: expected state 0xdeadbee got %d\n", line,
state );
- if (todo) todo_wine
- ok( action == 0xdeadbee, "%u: expected action 0xdeadbee got %d\n",
line, action );
- else
+ todo_wine_if (todo)
ok( action == 0xdeadbee, "%u: expected action 0xdeadbee got %d\n",
line, action );
}
@@ -2669,21 +2664,15 @@
{
ok( state == expected_state, "%u: expected state %d got %d\n",
line, expected_state, state );
- if (todo) todo_wine
+ todo_wine_if (todo)
ok( action == expected_action, "%u: expected action %d got %d\n",
line, expected_action, action );
- else
- ok( action == expected_action, "%u: expected action %d got %d\n",
- line, expected_action, action );
}
else
{
ok( state == 0xdeadbee, "%u: expected state 0xdeadbee got %d\n",
line, state );
- if (todo) todo_wine
- ok( action == 0xdeadbee, "%u: expected action 0xdeadbee got %d\n",
- line, action );
- else
+ todo_wine_if (todo)
ok( action == 0xdeadbee, "%u: expected action 0xdeadbee got %d\n",
line, action );
}