mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 00:45:24 +00:00
[ADVAPI32_APITEST] Add a test to show that main service thread is tagged
This test will fail on everything < W2K3 SP2. In spite of what a wide spread rumor says, MS seems to have added that feature quite lately, but not starting Vista! ;-)
This commit is contained in:
parent
3b03f44001
commit
7d18e36a31
1 changed files with 8 additions and 0 deletions
|
@ -70,6 +70,7 @@ service_main(DWORD dwArgc, LPWSTR* lpszArgv)
|
|||
// SERVICE_STATUS_HANDLE status_handle;
|
||||
LPWSTR lpEnvironment, lpEnvStr;
|
||||
DWORD dwSize;
|
||||
PTEB Teb;
|
||||
|
||||
UNREFERENCED_PARAMETER(dwArgc);
|
||||
UNREFERENCED_PARAMETER(lpszArgv);
|
||||
|
@ -103,6 +104,9 @@ service_main(DWORD dwArgc, LPWSTR* lpszArgv)
|
|||
service_ok(dwSize != 0, "USERNAME envvar not found, or GetEnvironmentVariableW failed: %lu\n", GetLastError());
|
||||
#endif
|
||||
|
||||
Teb = NtCurrentTeb();
|
||||
service_ok(Teb->SubProcessTag != 0, "SubProcessTag is not defined!\n");
|
||||
|
||||
/* Work is done */
|
||||
report_service_status(SERVICE_STOPPED, NO_ERROR, 0);
|
||||
}
|
||||
|
@ -244,6 +248,7 @@ START_TEST(ServiceEnv)
|
|||
{
|
||||
int argc;
|
||||
char** argv;
|
||||
PTEB Teb;
|
||||
|
||||
/* Check whether this test is started as a separated service process */
|
||||
argc = winetest_get_mainargs(&argv);
|
||||
|
@ -253,6 +258,9 @@ START_TEST(ServiceEnv)
|
|||
return;
|
||||
}
|
||||
|
||||
Teb = NtCurrentTeb();
|
||||
ok(Teb->SubProcessTag == 0, "SubProcessTag is defined: %p\n", Teb->SubProcessTag);
|
||||
|
||||
/* We are started as the real test */
|
||||
test_runner(my_test_server, NULL);
|
||||
// trace("Returned from test_runner\n");
|
||||
|
|
Loading…
Reference in a new issue