Signed-off-by: Michael Stefaniuc mstefani@winehq.org --- dlls/kernel32/tests/comm.c | 4 +--- dlls/kernel32/tests/toolhelp.c | 8 +++----- 2 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/dlls/kernel32/tests/comm.c b/dlls/kernel32/tests/comm.c index 4fb9de1268..d671e40f87 100644 --- a/dlls/kernel32/tests/comm.c +++ b/dlls/kernel32/tests/comm.c @@ -410,8 +410,6 @@ static const TEST test[] = }, };
-#define TEST_COUNT (sizeof(test) / sizeof(TEST)) - /* This function can be useful if you are modifying the test cases and want to output the contents of a DCB structure. */ /*static print_dcb(DCB *pdcb) @@ -656,7 +654,7 @@ static void test_BuildCommDCB(void) if(!port) trace("Could not find a valid COM port. Some tests will be skipped.\n");
- for(i = 0; i < TEST_COUNT; i++) + for(i = 0; i < ARRAY_SIZE(test); i++) { char string[sizeof(test[i].string)];
diff --git a/dlls/kernel32/tests/toolhelp.c b/dlls/kernel32/tests/toolhelp.c index c40dbc4f8f..bdb01b9824 100644 --- a/dlls/kernel32/tests/toolhelp.c +++ b/dlls/kernel32/tests/toolhelp.c @@ -217,8 +217,6 @@ static const char* sub_expected_modules[] = "ntdll.dll" };
-#define NUM_OF(x) (sizeof(x) / sizeof(x[0])) - static void test_module(DWORD pid, const char* expected[], unsigned num_expected) { HANDLE hSnapshot; @@ -229,7 +227,7 @@ static void test_module(DWORD pid, const char* expected[], unsigned num_expected unsigned i; int num = 0;
- ok(NUM_OF(found) >= num_expected, "Internal: bump found[] size\n"); + ok(ARRAY_SIZE(found) >= num_expected, "Internal: bump found[] size\n");
hSnapshot = pCreateToolhelp32Snapshot( TH32CS_SNAPMODULE, pid ); ok(hSnapshot != NULL, "Cannot create snapshot\n"); @@ -341,8 +339,8 @@ START_TEST(toolhelp)
test_process(pid, info.dwProcessId); test_thread(pid, info.dwProcessId); - test_module(pid, curr_expected_modules, NUM_OF(curr_expected_modules)); - test_module(info.dwProcessId, sub_expected_modules, NUM_OF(sub_expected_modules)); + test_module(pid, curr_expected_modules, ARRAY_SIZE(curr_expected_modules)); + test_module(info.dwProcessId, sub_expected_modules, ARRAY_SIZE(sub_expected_modules));
SetEvent(ev2); winetest_wait_child_process( info.hProcess );
Hi,
While running your changed tests on Windows, 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=39414
Your paranoid android.
=== w8 (32 bit comm) === comm.c:859: Test failed: WaitCommEvent failed with a timeout comm.c:870: recovering after WAIT_TIMEOUT... comm.c:880: Test failed: WaitCommEvent error 0 comm.c:881: Test failed: WaitCommEvent: expected EV_TXEMPTY, got 0 comm.c:885: WaitCommEvent for EV_TXEMPTY took 1515 ms (timeout 1500) comm.c:886: Test failed: WaitCommEvent used 1515 ms for waiting comm.c:1553: test_AbortWaitCts timeout 500 handle 00000144 comm.c:1520: Changing CommMask on the fly for handle 00000144 after timeout 500
On 06/27/2018 09:07 PM, Marvin wrote:
Hi,
While running your changed tests on Windows, 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=39414
Your paranoid android.
=== w8 (32 bit comm) === comm.c:859: Test failed: WaitCommEvent failed with a timeout comm.c:870: recovering after WAIT_TIMEOUT... comm.c:880: Test failed: WaitCommEvent error 0 comm.c:881: Test failed: WaitCommEvent: expected EV_TXEMPTY, got 0 comm.c:885: WaitCommEvent for EV_TXEMPTY took 1515 ms (timeout 1500) comm.c:886: Test failed: WaitCommEvent used 1515 ms for waiting comm.c:1553: test_AbortWaitCts timeout 500 handle 00000144 comm.c:1520: Changing CommMask on the fly for handle 00000144 after timeout 500
Flaky tests, see https://test.winehq.org/data/f637408a23fb0c92e56f677ab1793b66f739b14d/win8_n... The line numbers just changed.
bye michael