https://bugs.winehq.org/show_bug.cgi?id=39644
Bug ID: 39644 Summary: WineTest.exe should detect left-over UAC prompts Product: Wine Version: 1.8-rc1 Hardware: x86 OS: Linux Status: NEW Severity: normal Priority: P2 Component: testcases Assignee: wine-bugs@winehq.org Reporter: fgouget@codeweavers.com Distribution: ---
There was a problem where the cmd.exe:batch would try to run regedit from an account without elevated privileges. This caused Windows to pop up the UAC dialog, causing the test to stall. Timeout would happen, WineTest would kill the cmd.exe:batch process but doing so, and even extending it to all process tree, does not close the UAC because it's under the control of another Windows element. So WineTest would run the following tests with the UAC dialog still up which caused them to fail as they could not put their windows in the foreground.
The cmd.exe:batch bug has been fixed. However it could make sense for WineTest to do more to handle this situation more nicely: * If possible it could dismiss the UAC dialog (not click 'Yes' obviously, just deny the request). * It could detect the UAC dialog is up and wait. It seems the UAC dialog goes away on its own after about two minutes. * If we cannot detect if an UAC dialog is up we could systematically wait for an extra 2 minutes after a timeout, just in case. * Even more basic, we could increase our test timeout so it's longer than the UAC timeout, in the hope an UAC would go away before we time out. * Even though it does not solve the UAC issue it could still make sense to kill the whole subprocess tree, just to be sure one of them is not going to break the following tests.