Author: akhaldi
Date: Sun Jul 3 11:52:01 2016
New Revision: 71786
URL:
http://svn.reactos.org/svn/reactos?rev=71786&view=rev
Log:
[SERVICES_WINETEST] Sync with Wine Staging 1.9.11. CORE-11368
Modified:
trunk/rostests/winetests/services/service.c
Modified: trunk/rostests/winetests/services/service.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/services/servic…
==============================================================================
--- trunk/rostests/winetests/services/service.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/services/service.c [iso-8859-1] Sun Jul 3 11:52:01 2016
@@ -94,9 +94,9 @@
SERVICE_STATUS status;
BOOL res;
- service_ok(argc == 1, "argc = %d", argc);
+ service_ok(argc == 1, "argc = %d\n", argc);
if(argc)
- service_ok(!strcmp(argv[0], service_name), "argv[0] = %s, expected %s",
argv[0], service_name);
+ service_ok(!strcmp(argv[0], service_name), "argv[0] = %s, expected
%s\n", argv[0], service_name);
service_handle = pRegisterServiceCtrlHandlerExA(service_name, service_handler,
NULL);
service_ok(service_handle != NULL, "RegisterServiceCtrlHandlerEx failed:
%u\n", GetLastError());
@@ -111,7 +111,7 @@
status.dwCheckPoint = 0;
status.dwWaitHint = 10000;
res = SetServiceStatus(service_handle, &status);
- service_ok(res, "SetServiceStatus(SERVICE_RUNNING) failed: %u",
GetLastError());
+ service_ok(res, "SetServiceStatus(SERVICE_RUNNING) failed: %u\n",
GetLastError());
service_event("RUNNING");
@@ -120,7 +120,7 @@
status.dwCurrentState = SERVICE_STOPPED;
status.dwControlsAccepted = 0;
res = SetServiceStatus(service_handle, &status);
- service_ok(res, "SetServiceStatus(SERVICE_STOPPED) failed: %u",
GetLastError());
+ service_ok(res, "SetServiceStatus(SERVICE_STOPPED) failed: %u\n",
GetLastError());
}
static void service_process(void (WINAPI *p_service_main)(DWORD, char **))
@@ -140,7 +140,7 @@
if(pipe_handle == INVALID_HANDLE_VALUE)
return;
- service_trace("Starting...");
+ service_trace("Starting...\n");
service_stop_event = CreateEventA(NULL, TRUE, FALSE, NULL);
service_ok(service_stop_event != NULL, "Could not create event: %u\n",
GetLastError());
@@ -190,9 +190,9 @@
SERVICE_STATUS status;
BOOL res;
- service_ok(argc == 1, "argc = %d", argc);
+ service_ok(argc == 1, "argc = %d\n", argc);
if(argc)
- service_ok(!strcmp(argv[0], service_name), "argv[0] = %s, expected %s",
argv[0], service_name);
+ service_ok(!strcmp(argv[0], service_name), "argv[0] = %s, expected
%s\n", argv[0], service_name);
service_handle = pRegisterServiceCtrlHandlerExA(service_name, no_stop_handler,
NULL);
service_ok(service_handle != NULL, "RegisterServiceCtrlHandlerEx failed:
%u\n", GetLastError());
@@ -207,7 +207,7 @@
status.dwCheckPoint = 0;
status.dwWaitHint = 10000;
res = SetServiceStatus(service_handle, &status);
- service_ok(res, "SetServiceStatus(SERVICE_RUNNING) failed: %u",
GetLastError());
+ service_ok(res, "SetServiceStatus(SERVICE_RUNNING) failed: %u\n",
GetLastError());
service_event("RUNNING");
}
@@ -291,11 +291,11 @@
for(ptr = buf; ptr < buf+read; ptr += strlen(ptr)+1) {
if(!strncmp(ptr, "TRACE:", 6)) {
- trace("service trace: %s\n", ptr+6);
+ trace("service trace: %s", ptr+6);
}else if(!strncmp(ptr, "OK:", 3)) {
- ok(1, "service: %s\n", ptr+3);
+ ok(1, "service: %s", ptr+3);
}else if(!strncmp(ptr, "FAIL:", 5)) {
- ok(0, "service: %s\n", ptr+5);
+ ok(0, "service: %s", ptr+5);
}else if(!strncmp(ptr, "EVENT:", 6)) {
trace("service event: %s\n", ptr+6);
EnterCriticalSection(&event_cs);
@@ -441,7 +441,6 @@
if(pipe_handle == INVALID_HANDLE_VALUE)
return;
- InitializeCriticalSection(&event_cs);
event_handle = CreateEventA(NULL, FALSE, FALSE, NULL);
ok(event_handle != INVALID_HANDLE_VALUE, "CreateEvent failed: %u\n",
GetLastError());
if(event_handle == INVALID_HANDLE_VALUE)
@@ -463,6 +462,8 @@
{
char **argv;
int argc;
+
+ InitializeCriticalSection(&event_cs);
pRegisterServiceCtrlHandlerExA =
(void*)GetProcAddress(GetModuleHandleA("advapi32.dll"),
"RegisterServiceCtrlHandlerExA");
if(!pRegisterServiceCtrlHandlerExA) {