Commit c89617e0 authored by Paul Vriens's avatar Paul Vriens Committed by Alexandre Julliard

setupapi/tests: Skip some tests if we don't have enough rights.

parent b91f4a3d
...@@ -288,6 +288,13 @@ static void test_install_svc_from(void) ...@@ -288,6 +288,13 @@ static void test_install_svc_from(void)
infhandle = SetupOpenInfFileA(path, NULL, INF_STYLE_WIN4, NULL); infhandle = SetupOpenInfFileA(path, NULL, INF_STYLE_WIN4, NULL);
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
ret = SetupInstallServicesFromInfSectionA(infhandle, "Winetest.Services", 0); 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(ret, "Expected success\n");
ok(GetLastError() == ERROR_SUCCESS, ok(GetLastError() == ERROR_SUCCESS,
"Expected ERROR_SUCCESS, got %08x\n", GetLastError()); "Expected ERROR_SUCCESS, got %08x\n", GetLastError());
...@@ -344,6 +351,11 @@ static void test_driver_install(void) ...@@ -344,6 +351,11 @@ static void test_driver_install(void)
skip("OpenSCManagerA is not implemented, we are most likely on win9x\n"); skip("OpenSCManagerA is not implemented, we are most likely on win9x\n");
return; return;
} }
else if (!scm_handle && (GetLastError() == ERROR_ACCESS_DENIED))
{
skip("Not enough rights to install the service\n");
return;
}
CloseServiceHandle(scm_handle); CloseServiceHandle(scm_handle);
/* Place where we expect the driver to be installed */ /* Place where we expect the driver to be installed */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment