Skip to content
Snippets Groups Projects
Commit c9b4210b authored by Alexandre Julliard's avatar Alexandre Julliard
Browse files

kernel32/tests: Use the actual name of the exe module in toolhelp tests.

parent 1cdccc7d
Branches
Tags
No related merge requests found
......@@ -204,14 +204,14 @@ static void test_thread(DWORD curr_pid, DWORD sub_pcs_pid)
static const char* curr_expected_modules[] =
{
"kernel32.dll",
"kernel32_test.exe"
"kernel32.dll",
/* FIXME: could test for ntdll on NT and Wine */
};
static const char* sub_expected_modules[] =
{
"kernel32.dll",
"kernel32_test.exe",
"kernel32.dll",
"shell32.dll"
/* FIXME: could test for ntdll on NT and Wine */
};
......@@ -283,6 +283,7 @@ START_TEST(toolhelp)
{
DWORD pid = GetCurrentProcessId();
int r;
char *p, module[MAX_PATH];
char buffer[MAX_PATH];
SECURITY_ATTRIBUTES sa;
PROCESS_INFORMATION info;
......@@ -330,6 +331,12 @@ START_TEST(toolhelp)
w = WaitForSingleObject(ev1, WAIT_TIME);
ok(w == WAIT_OBJECT_0, "Failed to wait on sub-process startup\n");
GetModuleFileNameA( 0, module, sizeof(module) );
if (!(p = strrchr( module, '\\' ))) p = module;
else p++;
curr_expected_modules[0] = p;
sub_expected_modules[0] = p;
test_process(pid, info.dwProcessId);
test_thread(pid, info.dwProcessId);
test_module(pid, curr_expected_modules, NUM_OF(curr_expected_modules));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment