[PATCH resend] user32/tests: Fix broadcast test failures on Windows 10
Alex Henrie
alexhenrie24 at gmail.com
Thu Apr 26 14:36:36 CDT 2018
On Thu, Apr 26, 2018 at 1:13 PM Alexandre Julliard <julliard at winehq.org>
wrote:
> Alex Henrie <alexhenrie24 at gmail.com> writes:
> > @@ -266,8 +228,10 @@ static void test_noprivileges(void)
> > recips = BSM_ALLDESKTOPS;
> > ResetEvent(hevent);
> > ret = BroadcastSystemMessageExW( BSF_QUERY, &recips, WM_NULL, 100,
0, NULL );
> > - ok(ret==1, "Returned: %d error %u\n", ret, GetLastError());
> > - ok(WaitForSingleObject(hevent, 0) != WAIT_TIMEOUT, "Asynchronous
message sent instead\n");
> > + ok((ret == 1 && WaitForSingleObject(hevent, 0) != WAIT_TIMEOUT) ||
> > + (ret == 0 && WaitForSingleObject(hevent, 1000) == WAIT_TIMEOUT)
/* win10 */,
> > + "Asynchronous message sent instead of synchronous message or no
message. Returned: %d error %08x\n",
> > + ret, GetLastError());
> These still look like hiding the problem. Why are these calls failing?
Lack of privileges. The test_noprivileges function calls
AdjustTokenPrivileges to disable all privileges, then verifies that
BroadcastSystemMessage can no longer send a message to BSM_ALLDESKTOPS,
BSM_ALLCOMPONENTS, or BSM_APPLICATIONS.
If I understand correctly, before Windows 10 BroadcastSystemMessage would
still send the message to the current application. In Windows 10,
BroadcastSystemMessage does not send the message at all.
-Alex
More information about the wine-devel
mailing list