mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-06 15:55:03 +00:00
advapi32/tests: Fix a service stop race condition.
If some Windows services stop while testing EnumServicesStatusW()'s resume handle support, one possibility is that the still running services all fit in the specified buffer, invalidating the test so there is a retry in place. But in some cases the second call just returns fewer tests than expected. So retry in that case too. Wine-Bug: https://bugs.winehq.org//show_bug.cgi?id=53460
This commit is contained in:
parent
58155d3eb9
commit
96da5a8a35
|
@ -1370,6 +1370,8 @@ static BOOL test_enum_svc(int attempt)
|
|||
goto retry; /* service start race condition */
|
||||
ok(ret, "Expected success, got error %lu\n", GetLastError());
|
||||
ok(needed == 0, "Expected 0 needed bytes as we are done, got %lu\n", needed);
|
||||
if (returned < missing && strcmp(winetest_platform, "wine") && attempt)
|
||||
goto retry; /* service stop race condition */
|
||||
todo_wine ok(returned == missing, "Expected %lu remaining services, got %lu\n", missing, returned);
|
||||
ok(resume == 0, "Expected the resume handle to be 0\n");
|
||||
|
||||
|
|
Loading…
Reference in a new issue