Module: wine Branch: master Commit: e0c3530a741adec459e6701799a2c0c6631c27d0 URL: https://gitlab.winehq.org/wine/wine/-/commit/e0c3530a741adec459e6701799a2c0c...
Author: Francois Gouget fgouget@codeweavers.com Date: Fri Oct 13 15:24:57 2023 +0200
advapi32/tests: Add the read_write info to the failures context.
Otherwise it's impossible to know which iteration failed.
---
dlls/advapi32/tests/eventlog.c | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/dlls/advapi32/tests/eventlog.c b/dlls/advapi32/tests/eventlog.c index 74a6be07b60..5e5e311bcbd 100644 --- a/dlls/advapi32/tests/eventlog.c +++ b/dlls/advapi32/tests/eventlog.c @@ -882,6 +882,8 @@ static void test_readwrite(void) DWORD oldest; BOOL run_sidtests = read_write[i].evt_sid & sidavailable;
+ winetest_push_context("%lu:%s", i, read_write[i].evt_src); + /* We don't need to use RegisterEventSource to report events */ if (i % 2) handle = OpenEventLogA(NULL, read_write[i].evt_src); @@ -918,6 +920,7 @@ static void test_readwrite(void) else ret = DeregisterEventSource(handle); ok(ret, "Expected success : %ld\n", GetLastError()); + winetest_pop_context(); }
handle = OpenEventLogA(NULL, eventlogname); @@ -969,7 +972,9 @@ static void test_readwrite(void) char *ptr; BOOL run_sidtests = read_write[i].evt_sid & sidavailable;
+ winetest_push_context("%lu", i); buf = HeapAlloc(GetProcessHeap(), 0, sizeof(EVENTLOGRECORD)); + SetLastError(0xdeadbeef); ret = ReadEventLogA(handle, EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ, 0, buf, sizeof(EVENTLOGRECORD), &read, &needed); @@ -978,6 +983,7 @@ static void test_readwrite(void) { HeapFree(GetProcessHeap(), 0, buf); ok(GetLastError() == ERROR_HANDLE_EOF, "record %ld, got %ld\n", i, GetLastError()); + winetest_pop_context(); break; }
@@ -1052,6 +1058,7 @@ static void test_readwrite(void) "Expected the closing DWORD to contain the length of the record\n");
HeapFree(GetProcessHeap(), 0, buf); + winetest_pop_context(); i++; } CloseEventLog(handle);