advapi32/tests: Move check for ERROR_CALL_NOT_IMPLEMENTED to the first call.
This commit is contained in:
parent
640cb29bb7
commit
e54247b10c
|
@ -857,7 +857,13 @@ static void test_token_attr(void)
|
||||||
SECURITY_IMPERSONATION_LEVEL ImpersonationLevel;
|
SECURITY_IMPERSONATION_LEVEL ImpersonationLevel;
|
||||||
|
|
||||||
/* cygwin-like use case */
|
/* cygwin-like use case */
|
||||||
|
SetLastError(0xdeadbeef);
|
||||||
ret = OpenProcessToken(GetCurrentProcess(), MAXIMUM_ALLOWED, &Token);
|
ret = OpenProcessToken(GetCurrentProcess(), MAXIMUM_ALLOWED, &Token);
|
||||||
|
if(!ret && (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED))
|
||||||
|
{
|
||||||
|
skip("OpenProcessToken is not implemented\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
ok(ret, "OpenProcessToken failed with error %d\n", GetLastError());
|
ok(ret, "OpenProcessToken failed with error %d\n", GetLastError());
|
||||||
if (ret)
|
if (ret)
|
||||||
{
|
{
|
||||||
|
@ -878,15 +884,9 @@ static void test_token_attr(void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SetLastError(0xdeadbeef);
|
||||||
ret = OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY|TOKEN_DUPLICATE, &Token);
|
ret = OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY|TOKEN_DUPLICATE, &Token);
|
||||||
GLE = GetLastError();
|
ok(ret, "OpenProcessToken failed with error %d\n", GetLastError());
|
||||||
ok(ret || (GLE == ERROR_CALL_NOT_IMPLEMENTED),
|
|
||||||
"OpenProcessToken failed with error %d\n", GLE);
|
|
||||||
if(!ret && (GLE == ERROR_CALL_NOT_IMPLEMENTED))
|
|
||||||
{
|
|
||||||
trace("OpenProcessToken() not implemented, skipping test_token_attr()\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* groups */
|
/* groups */
|
||||||
ret = GetTokenInformation(Token, TokenGroups, NULL, 0, &Size);
|
ret = GetTokenInformation(Token, TokenGroups, NULL, 0, &Size);
|
||||||
|
|
Loading…
Reference in New Issue