The [user32:sysparams patterns page](https://test.winehq.org/data/patterns.html#user32:sysparams) shows plenty of failures with Windows 10.
Running [a single machine](https://testbot.winehq.org/JobDetails.pl?Key=151682) test did not show such a failure. Therefore the idea is there is some race condition, which shows up when testbot has more load, like in the batch runs.
While there was still a batch run active, [I received with a null change](https://testbot.winehq.org/JobDetails.pl?Key=151697) the failures quite reliable.
[Adding some Sleeps](https://testbot.winehq.org/JobDetails.pl?Key=151698) seems to improve the situation.
This Sleeps would add 4 seconds to each test run.
From: Bernhard Übelacker bernhardu@mailbox.org
--- dlls/user32/tests/sysparams.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
diff --git a/dlls/user32/tests/sysparams.c b/dlls/user32/tests/sysparams.c index 870b7f1cc93..730adf88341 100644 --- a/dlls/user32/tests/sysparams.c +++ b/dlls/user32/tests/sysparams.c @@ -1186,8 +1186,11 @@ static void test_SPI_SETMENUDROPALIGNMENT( void ) /* 28 */ { UINT v;
+ winetest_push_context("i=%d", i); + rc=SystemParametersInfoA( SPI_SETMENUDROPALIGNMENT, vals[i], 0, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE ); + Sleep(500); if (!test_error_msg(rc,"SPI_SETMENUDROPALIGNMENT")) return; ok(rc, "%d: rc=%d err=%ld\n", i, rc, GetLastError()); test_change_message( SPI_SETMENUDROPALIGNMENT, 0 ); @@ -1197,10 +1200,13 @@ static void test_SPI_SETMENUDROPALIGNMENT( void ) /* 28 */ vals[i] ? "1" : "0" );
rc=SystemParametersInfoA( SPI_GETMENUDROPALIGNMENT, 0, &v, 0 ); + Sleep(500); ok(rc, "%d: rc=%d err=%ld\n", i, rc, GetLastError()); eq( v, vals[i], "SPI_{GET,SET}MENUDROPALIGNMENT", "%d" ); eq( GetSystemMetrics( SM_MENUDROPALIGNMENT ), (int)vals[i], "SM_MENUDROPALIGNMENT", "%d" ); + + winetest_pop_context(); }
rc=SystemParametersInfoA( SPI_SETMENUDROPALIGNMENT, old_b, 0, @@ -1347,9 +1353,12 @@ static void test_SPI_SETMOUSEBUTTONSWAP( void ) /* 33 */
for (i=0;i<ARRAY_SIZE(vals);i++) { + winetest_push_context("i=%d", i); + SetLastError(0xdeadbeef); rc=SystemParametersInfoA( SPI_SETMOUSEBUTTONSWAP, vals[i], 0, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE ); + Sleep(500); if (!test_error_msg(rc,"SPI_SETMOUSEBUTTONSWAP")) break;
test_change_message( SPI_SETMOUSEBUTTONSWAP, 0 ); @@ -1359,10 +1368,13 @@ static void test_SPI_SETMOUSEBUTTONSWAP( void ) /* 33 */ eq( GetSystemMetrics( SM_SWAPBUTTON ), (int)vals[i], "SM_SWAPBUTTON", "%d" ); rc=SwapMouseButton((BOOL)vals[i^1]); + Sleep(500); eq( GetSystemMetrics( SM_SWAPBUTTON ), (int)vals[i^1], "SwapMouseButton", "%d" ); ok( rc==(BOOL)vals[i], "SwapMouseButton does not return previous state (really %d)\n", rc ); test_change_message( SPI_SETMOUSEBUTTONSWAP, 1 ); + + winetest_pop_context(); }
rc=SystemParametersInfoA( SPI_SETMOUSEBUTTONSWAP, vals[1], 0,
We should probably use SPIF_SENDCHANGE/WM_SETTINGCHANGE instead of a fixed timeout.