Module: wine Branch: master Commit: 9373f330e55fb00d5ef67dc00c6e8dfc40634c88 URL: https://gitlab.winehq.org/wine/wine/-/commit/9373f330e55fb00d5ef67dc00c6e8df...
Author: Daniel Lehman dlehman25@gmail.com Date: Wed Oct 11 22:56:41 2023 -0700
advapi32/tests: Skip ReadEventLog on failure to open System log.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55731
---
dlls/advapi32/tests/eventlog.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/dlls/advapi32/tests/eventlog.c b/dlls/advapi32/tests/eventlog.c index e2334c692e5..1a35efe1844 100644 --- a/dlls/advapi32/tests/eventlog.c +++ b/dlls/advapi32/tests/eventlog.c @@ -1327,11 +1327,13 @@ static void test_eventlog_start(void) char *sourcenameA, *computernameA, *localcomputerA;
/* ReadEventLogW */ - size = MAX_COMPUTERNAME_LENGTH + 1; - localcomputer = malloc(size * sizeof(WCHAR)); - GetComputerNameW(localcomputer, &size); - handle = OpenEventLogW(0, L"System"); + if (!handle && (GetLastError() == ERROR_ACCESS_DENIED || GetLastError() == RPC_S_SERVER_UNAVAILABLE)) + { + win_skip( "Can't open event log\n" ); + return; + } + ok(handle != NULL, "OpenEventLogW(System) failed : %ld\n", GetLastError()); handle2 = OpenEventLogW(0, L"System"); todo_wine ok(handle != handle2, "Expected different handle\n"); CloseEventLog(handle2); @@ -1340,6 +1342,10 @@ static void test_eventlog_start(void) ok(!!handle2, "Expected valid handle\n"); CloseEventLog(handle2);
+ size = MAX_COMPUTERNAME_LENGTH + 1; + localcomputer = malloc(size * sizeof(WCHAR)); + GetComputerNameW(localcomputer, &size); + ret = TRUE; found = FALSE; while (!found && ret)