[PATCH] Skip some tests if we don't have enough rights
Paul Vriens
Paul.Vriens.Wine at gmail.com
Wed Jan 7 04:05:24 CST 2009
---
dlls/setupapi/tests/install.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/dlls/setupapi/tests/install.c b/dlls/setupapi/tests/install.c
index 981dce3..4936923 100644
--- a/dlls/setupapi/tests/install.c
+++ b/dlls/setupapi/tests/install.c
@@ -288,6 +288,13 @@ static void test_install_svc_from(void)
infhandle = SetupOpenInfFileA(path, NULL, INF_STYLE_WIN4, NULL);
SetLastError(0xdeadbeef);
ret = SetupInstallServicesFromInfSectionA(infhandle, "Winetest.Services", 0);
+ if (!ret && GetLastError() == ERROR_ACCESS_DENIED)
+ {
+ skip("Not enough rights to install the service\n");
+ SetupCloseInfFile(infhandle);
+ DeleteFile(inffile);
+ return;
+ }
ok(ret, "Expected success\n");
ok(GetLastError() == ERROR_SUCCESS,
"Expected ERROR_SUCCESS, got %08x\n", GetLastError());
@@ -344,6 +351,11 @@ static void test_driver_install(void)
skip("OpenSCManagerA is not implemented, we are most likely on win9x\n");
return;
}
+ else if (!scm_handle && (GetLastError() == ERROR_ACCESS_DENIED))
+ {
+ skip("Not enough rights to install the service\n");
+ return;
+ }
CloseServiceHandle(scm_handle);
/* Place where we expect the driver to be installed */
--
1.6.0.6
--------------080505010306090203070305--
More information about the wine-patches
mailing list