mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
Added patch to close process / thread handles in kernel32/tests.
This commit is contained in:
parent
34a26b4e9e
commit
7dcf0a40b3
@ -0,0 +1,143 @@
|
||||
From f1b8afc713f881f8c0ff5328d030dda53ba166ec Mon Sep 17 00:00:00 2001
|
||||
From: Mark Jansen <mark.jansen@reactos.org>
|
||||
Date: Fri, 22 Sep 2017 11:20:27 +0200
|
||||
Subject: kernel32/tests: Close process / thread handles
|
||||
|
||||
Signed-off-by: Mark Jansen <mark.jansen@reactos.org>
|
||||
---
|
||||
dlls/kernel32/tests/process.c | 28 ++++++++++++++++++++++++++++
|
||||
1 file changed, 28 insertions(+)
|
||||
|
||||
diff --git a/dlls/kernel32/tests/process.c b/dlls/kernel32/tests/process.c
|
||||
index 0ff1fb165c8..d2afdbdfd71 100644
|
||||
--- a/dlls/kernel32/tests/process.c
|
||||
+++ b/dlls/kernel32/tests/process.c
|
||||
@@ -620,6 +620,8 @@ static void test_Startup(void)
|
||||
ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n");
|
||||
/* child process has changed result file, so let profile functions know about it */
|
||||
WritePrivateProfileStringA(NULL, NULL, NULL, resfile);
|
||||
+ CloseHandle(info.hThread);
|
||||
+ CloseHandle(info.hProcess);
|
||||
|
||||
GetStartupInfoA(&si);
|
||||
okChildInt("StartupInfoA", "cb", startup.cb);
|
||||
@@ -658,6 +660,8 @@ static void test_Startup(void)
|
||||
ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n");
|
||||
/* child process has changed result file, so let profile functions know about it */
|
||||
WritePrivateProfileStringA(NULL, NULL, NULL, resfile);
|
||||
+ CloseHandle(info.hThread);
|
||||
+ CloseHandle(info.hProcess);
|
||||
|
||||
okChildInt("StartupInfoA", "cb", startup.cb);
|
||||
okChildString("StartupInfoA", "lpDesktop", startup.lpDesktop);
|
||||
@@ -696,6 +700,8 @@ static void test_Startup(void)
|
||||
ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n");
|
||||
/* child process has changed result file, so let profile functions know about it */
|
||||
WritePrivateProfileStringA(NULL, NULL, NULL, resfile);
|
||||
+ CloseHandle(info.hThread);
|
||||
+ CloseHandle(info.hProcess);
|
||||
|
||||
okChildInt("StartupInfoA", "cb", startup.cb);
|
||||
okChildString("StartupInfoA", "lpDesktop", si.lpDesktop);
|
||||
@@ -734,6 +740,8 @@ static void test_Startup(void)
|
||||
ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n");
|
||||
/* child process has changed result file, so let profile functions know about it */
|
||||
WritePrivateProfileStringA(NULL, NULL, NULL, resfile);
|
||||
+ CloseHandle(info.hThread);
|
||||
+ CloseHandle(info.hProcess);
|
||||
|
||||
okChildInt("StartupInfoA", "cb", startup.cb);
|
||||
okChildString("StartupInfoA", "lpDesktop", startup.lpDesktop);
|
||||
@@ -772,6 +780,8 @@ static void test_Startup(void)
|
||||
ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n");
|
||||
/* child process has changed result file, so let profile functions know about it */
|
||||
WritePrivateProfileStringA(NULL, NULL, NULL, resfile);
|
||||
+ CloseHandle(info.hThread);
|
||||
+ CloseHandle(info.hProcess);
|
||||
|
||||
okChildInt("StartupInfoA", "cb", startup.cb);
|
||||
okChildString("StartupInfoA", "lpDesktop", startup.lpDesktop);
|
||||
@@ -812,6 +822,8 @@ static void test_Startup(void)
|
||||
ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n");
|
||||
/* child process has changed result file, so let profile functions know about it */
|
||||
WritePrivateProfileStringA(NULL, NULL, NULL, resfile);
|
||||
+ CloseHandle(info.hThread);
|
||||
+ CloseHandle(info.hProcess);
|
||||
|
||||
okChildInt("StartupInfoA", "cb", startup.cb);
|
||||
okChildString("StartupInfoA", "lpDesktop", startup.lpDesktop);
|
||||
@@ -850,6 +862,8 @@ static void test_Startup(void)
|
||||
ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n");
|
||||
/* child process has changed result file, so let profile functions know about it */
|
||||
WritePrivateProfileStringA(NULL, NULL, NULL, resfile);
|
||||
+ CloseHandle(info.hThread);
|
||||
+ CloseHandle(info.hProcess);
|
||||
|
||||
okChildInt("StartupInfoA", "cb", startup.cb);
|
||||
okChildString("StartupInfoA", "lpDesktop", startup.lpDesktop);
|
||||
@@ -890,6 +904,8 @@ static void test_CommandLine(void)
|
||||
ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n");
|
||||
/* child process has changed result file, so let profile functions know about it */
|
||||
WritePrivateProfileStringA(NULL, NULL, NULL, resfile);
|
||||
+ CloseHandle(info.hThread);
|
||||
+ CloseHandle(info.hProcess);
|
||||
|
||||
okChildInt("Arguments", "argcA", 5);
|
||||
okChildString("Arguments", "argvA4", "C:\\Program Files\\my nice app.exe");
|
||||
@@ -911,6 +927,8 @@ static void test_CommandLine(void)
|
||||
ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n");
|
||||
/* child process has changed result file, so let profile functions know about it */
|
||||
WritePrivateProfileStringA(NULL, NULL, NULL, resfile);
|
||||
+ CloseHandle(info.hThread);
|
||||
+ CloseHandle(info.hProcess);
|
||||
|
||||
okChildInt("Arguments", "argcA", 7);
|
||||
okChildString("Arguments", "argvA4", "a\"b\\");
|
||||
@@ -932,6 +950,8 @@ static void test_CommandLine(void)
|
||||
ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n");
|
||||
/* child process has changed result file, so let profile functions know about it */
|
||||
WritePrivateProfileStringA(NULL, NULL, NULL, resfile);
|
||||
+ CloseHandle(info.hThread);
|
||||
+ CloseHandle(info.hProcess);
|
||||
sprintf(buffer, "./%s", exename);
|
||||
okChildString("Arguments", "argvA0", buffer);
|
||||
release_memory();
|
||||
@@ -947,6 +967,8 @@ static void test_CommandLine(void)
|
||||
ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n");
|
||||
/* child process has changed result file, so let profile functions know about it */
|
||||
WritePrivateProfileStringA(NULL, NULL, NULL, resfile);
|
||||
+ CloseHandle(info.hThread);
|
||||
+ CloseHandle(info.hProcess);
|
||||
sprintf(buffer, ".\\%s", exename);
|
||||
okChildString("Arguments", "argvA0", buffer);
|
||||
release_memory();
|
||||
@@ -967,6 +989,8 @@ static void test_CommandLine(void)
|
||||
ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n");
|
||||
/* child process has changed result file, so let profile functions know about it */
|
||||
WritePrivateProfileStringA(NULL, NULL, NULL, resfile);
|
||||
+ CloseHandle(info.hThread);
|
||||
+ CloseHandle(info.hProcess);
|
||||
if (p) sprintf(buffer, "..%s/%s", p, exename);
|
||||
else sprintf(buffer, "./%s", exename);
|
||||
okChildString("Arguments", "argvA0", buffer);
|
||||
@@ -990,6 +1014,8 @@ static void test_CommandLine(void)
|
||||
ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n");
|
||||
/* child process has changed result file, so let profile functions know about it */
|
||||
WritePrivateProfileStringA(NULL, NULL, NULL, resfile);
|
||||
+ CloseHandle(info.hThread);
|
||||
+ CloseHandle(info.hProcess);
|
||||
sprintf(buffer, "tests/process.c dump %s", resfile);
|
||||
okChildString("Arguments", "argvA0", "dummy");
|
||||
okChildString("Arguments", "CommandLineA", buffer2);
|
||||
@@ -1087,6 +1113,8 @@ static void test_Directory(void)
|
||||
ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n");
|
||||
/* child process has changed result file, so let profile functions know about it */
|
||||
WritePrivateProfileStringA(NULL, NULL, NULL, resfile);
|
||||
+ CloseHandle(info.hThread);
|
||||
+ CloseHandle(info.hProcess);
|
||||
|
||||
okChildIString("Misc", "CurrDirA", windir);
|
||||
release_memory();
|
||||
--
|
||||
2.14.1
|
||||
|
@ -204,6 +204,7 @@ patch_enable_all ()
|
||||
enable_kernel32_Profile="$1"
|
||||
enable_kernel32_SCSI_Sysfs="$1"
|
||||
enable_kernel32_SetFileCompletionNotificationModes="$1"
|
||||
enable_kernel32_Tests="$1"
|
||||
enable_kernel32_TimezoneInformation_Registry="$1"
|
||||
enable_kernel32_UmsStubs="$1"
|
||||
enable_kernel32_VerifyVersionInfo="$1"
|
||||
@ -888,6 +889,9 @@ patch_enable ()
|
||||
kernel32-SetFileCompletionNotificationModes)
|
||||
enable_kernel32_SetFileCompletionNotificationModes="$2"
|
||||
;;
|
||||
kernel32-Tests)
|
||||
enable_kernel32_Tests="$2"
|
||||
;;
|
||||
kernel32-TimezoneInformation_Registry)
|
||||
enable_kernel32_TimezoneInformation_Registry="$2"
|
||||
;;
|
||||
@ -5492,6 +5496,18 @@ if test "$enable_kernel32_SetFileCompletionNotificationModes" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset kernel32-Tests
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/kernel32/tests/process.c
|
||||
# |
|
||||
if test "$enable_kernel32_Tests" -eq 1; then
|
||||
patch_apply kernel32-Tests/0001-kernel32-tests-Close-process-thread-handles.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Mark Jansen", "kernel32/tests: Close process / thread handles.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset kernel32-TimezoneInformation_Registry
|
||||
# |
|
||||
# | Modified files:
|
||||
|
Loading…
Reference in New Issue
Block a user