Qian Hong : user32/tests: Skip more winstation tests when no enough privileges.
Alexandre Julliard
julliard at winehq.org
Mon Mar 10 14:38:29 CDT 2014
Module: wine
Branch: master
Commit: 298e050b438733d61a86cb8de7b2835c48820710
URL: http://source.winehq.org/git/wine.git/?a=commit;h=298e050b438733d61a86cb8de7b2835c48820710
Author: Qian Hong <qhong at codeweavers.com>
Date: Mon Mar 10 11:09:11 2014 +0800
user32/tests: Skip more winstation tests when no enough privileges.
---
dlls/user32/tests/winstation.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/dlls/user32/tests/winstation.c b/dlls/user32/tests/winstation.c
index 4f664dd..7f91b8b 100644
--- a/dlls/user32/tests/winstation.c
+++ b/dlls/user32/tests/winstation.c
@@ -297,7 +297,8 @@ static BOOL CALLBACK open_window_station_callbackA(LPSTR winsta, LPARAM lp)
static void test_enumstations(void)
{
- BOOL ret;
+ DWORD ret;
+ HWINSTA hwinsta;
if (0) /* Crashes instead */
{
@@ -307,6 +308,15 @@ static void test_enumstations(void)
ok(GetLastError() == ERROR_INVALID_PARAMETER, "LastError is set to %08x\n", GetLastError());
}
+ hwinsta = CreateWindowStationA("winsta_test", 0, WINSTA_ALL_ACCESS, NULL);
+ ret = GetLastError();
+ ok(hwinsta != NULL || ret == ERROR_ACCESS_DENIED, "CreateWindowStation failed (%u)\n", ret);
+ if (!hwinsta)
+ {
+ win_skip("Not enough privileges for CreateWindowStation\n");
+ return;
+ }
+
SetLastError(0xdeadbeef);
ret = EnumWindowStationsA(open_window_station_callbackA, 0x12345);
ok(ret == 0x12345, "EnumWindowStationsA returned %x\n", ret);
More information about the wine-cvs
mailing list