[PATCH] advapi32/tests: Trace failures to open the event log.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> --- dlls/advapi32/tests/eventlog.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dlls/advapi32/tests/eventlog.c b/dlls/advapi32/tests/eventlog.c index 6722ea7d622..c93494e5cf3 100644 --- a/dlls/advapi32/tests/eventlog.c +++ b/dlls/advapi32/tests/eventlog.c @@ -64,8 +64,10 @@ static BOOL create_backup(const char *filename) HANDLE handle; DWORD rc, attribs; - DeleteFileA(filename); handle = OpenEventLogA(NULL, "Application"); + ok(handle != NULL, "OpenEventLogA(Application) failed : %d\n", GetLastError()); + + DeleteFileA(filename); rc = BackupEventLogA(handle, filename); if (!rc && GetLastError() == ERROR_PRIVILEGE_NOT_HELD) { @@ -160,6 +162,7 @@ static void test_info(void) ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); handle = OpenEventLogA(NULL, "Application"); + ok(handle != NULL, "OpenEventLogA(Application) failed : %d\n", GetLastError()); SetLastError(0xdeadbeef); ret = pGetEventLogInformation(handle, EVENTLOG_FULL_INFO, NULL, 0, NULL); @@ -216,6 +219,7 @@ static void test_count(void) ok(count == 0xdeadbeef, "Expected count to stay unchanged\n"); handle = OpenEventLogA(NULL, "Application"); + ok(handle != NULL, "OpenEventLogA(Application) failed : %d\n", GetLastError()); SetLastError(0xdeadbeef); ret = GetNumberOfEventLogRecords(handle, NULL); @@ -270,6 +274,7 @@ static void test_oldest(void) ok(oldest == 0xdeadbeef, "Expected oldest to stay unchanged\n"); handle = OpenEventLogA(NULL, "Application"); + ok(handle != NULL, "OpenEventLogA(Application) failed : %d\n", GetLastError()); SetLastError(0xdeadbeef); ret = GetOldestEventLogRecord(handle, NULL); @@ -322,6 +327,7 @@ static void test_backup(void) ok(GetFileAttributesA(backup) == INVALID_FILE_ATTRIBUTES, "Expected no backup file\n"); handle = OpenEventLogA(NULL, "Application"); + ok(handle != NULL, "OpenEventLogA(Application) failed : %d\n", GetLastError()); SetLastError(0xdeadbeef); ret = BackupEventLogA(handle, NULL); @@ -433,6 +439,7 @@ static void test_read(void) HeapFree(GetProcessHeap(), 0, buf); handle = OpenEventLogA(NULL, "Application"); + ok(handle != NULL, "OpenEventLogA(Application) failed : %d\n", GetLastError()); /* Show that we need the proper dwFlags with a (for the rest) proper call */ buf = HeapAlloc(GetProcessHeap(), 0, sizeof(EVENTLOGRECORD)); -- 2.20.1
Hi, While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check? Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=90525 Your paranoid android. === w1064 (32 bit report) === advapi32: eventlog: Timeout === w1064_tsign (32 bit report) === advapi32: eventlog.c:277: Test failed: OpenEventLogA(Application) failed : 1722 eventlog.c:68: Test failed: OpenEventLogA(Application) failed : 1722 eventlog.c:330: Test failed: OpenEventLogA(Application) failed : 1722 eventlog.c:68: Test failed: OpenEventLogA(Application) failed : 1722 eventlog.c:442: Test failed: OpenEventLogA(Application) failed : 1722 eventlog.c:68: Test failed: OpenEventLogA(Application) failed : 1722 === w10pro64 (32 bit report) === advapi32: eventlog.c:277: Test failed: OpenEventLogA(Application) failed : 1722 eventlog.c:68: Test failed: OpenEventLogA(Application) failed : 1722 eventlog.c:330: Test failed: OpenEventLogA(Application) failed : 1722 eventlog.c:68: Test failed: OpenEventLogA(Application) failed : 1722 eventlog.c:442: Test failed: OpenEventLogA(Application) failed : 1722 eventlog.c:68: Test failed: OpenEventLogA(Application) failed : 1722 === w1064_2qxl (64 bit report) === advapi32: eventlog.c:277: Test failed: OpenEventLogA(Application) failed : 5 eventlog.c:68: Test failed: OpenEventLogA(Application) failed : 1722 eventlog.c:330: Test failed: OpenEventLogA(Application) failed : 1722 eventlog.c:68: Test failed: OpenEventLogA(Application) failed : 1722 eventlog.c:442: Test failed: OpenEventLogA(Application) failed : 1722 eventlog.c:68: Test failed: OpenEventLogA(Application) failed : 1722 === w1064_tsign (64 bit report) === advapi32: eventlog.c:277: Test failed: OpenEventLogA(Application) failed : 1722 eventlog.c:68: Test failed: OpenEventLogA(Application) failed : 1722 eventlog.c:330: Test failed: OpenEventLogA(Application) failed : 1722 eventlog.c:68: Test failed: OpenEventLogA(Application) failed : 1722 eventlog.c:442: Test failed: OpenEventLogA(Application) failed : 1722 eventlog.c:68: Test failed: OpenEventLogA(Application) failed : 1722 === w10pro64 (64 bit report) === advapi32: eventlog.c:277: Test failed: OpenEventLogA(Application) failed : 1722 eventlog.c:68: Test failed: OpenEventLogA(Application) failed : 1722 eventlog.c:330: Test failed: OpenEventLogA(Application) failed : 1722 eventlog.c:68: Test failed: OpenEventLogA(Application) failed : 1722 eventlog.c:442: Test failed: OpenEventLogA(Application) failed : 1722 eventlog.c:68: Test failed: OpenEventLogA(Application) failed : 1722 === w10pro64_ar (64 bit report) === advapi32: eventlog.c:277: Test failed: OpenEventLogA(Application) failed : 1722 eventlog.c:68: Test failed: OpenEventLogA(Application) failed : 1722 eventlog.c:330: Test failed: OpenEventLogA(Application) failed : 1722 eventlog.c:68: Test failed: OpenEventLogA(Application) failed : 1722 eventlog.c:442: Test failed: OpenEventLogA(Application) failed : 1722 eventlog.c:68: Test failed: OpenEventLogA(Application) failed : 1722 === w10pro64_he (64 bit report) === advapi32: eventlog.c:277: Test failed: OpenEventLogA(Application) failed : 1722 eventlog.c:68: Test failed: OpenEventLogA(Application) failed : 1722 eventlog.c:330: Test failed: OpenEventLogA(Application) failed : 1722 eventlog.c:68: Test failed: OpenEventLogA(Application) failed : 1722 eventlog.c:442: Test failed: OpenEventLogA(Application) failed : 1722 eventlog.c:68: Test failed: OpenEventLogA(Application) failed : 1722 === w10pro64_ja (64 bit report) === advapi32: eventlog.c:277: Test failed: OpenEventLogA(Application) failed : 1722 eventlog.c:68: Test failed: OpenEventLogA(Application) failed : 1722 eventlog.c:330: Test failed: OpenEventLogA(Application) failed : 1722 eventlog.c:68: Test failed: OpenEventLogA(Application) failed : 1722 eventlog.c:442: Test failed: OpenEventLogA(Application) failed : 1722 eventlog.c:68: Test failed: OpenEventLogA(Application) failed : 1722 === w10pro64_zh_CN (64 bit report) === advapi32: eventlog.c:277: Test failed: OpenEventLogA(Application) failed : 5 eventlog.c:68: Test failed: OpenEventLogA(Application) failed : 5 eventlog.c:330: Test failed: OpenEventLogA(Application) failed : 1722 eventlog.c:68: Test failed: OpenEventLogA(Application) failed : 1722 eventlog.c:442: Test failed: OpenEventLogA(Application) failed : 1722 eventlog.c:68: Test failed: OpenEventLogA(Application) failed : 1722
participants (2)
-
Francois Gouget -
Marvin