[PATCH] kernel32/tests: Use sizeof(STARTUPINFOEX) for STARTUPINFOEX.STARTUPINFO.cb in process tests.

Paul Gofman pgofman at codeweavers.com
Thu May 13 15:08:00 CDT 2021


Fixes some test failures on a few Testbot machines when the process attributes are
just ignored.

Signed-off-by: Paul Gofman <pgofman at codeweavers.com>
---
 dlls/kernel32/tests/process.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/kernel32/tests/process.c b/dlls/kernel32/tests/process.c
index f960efb05a8..7d5d2ead75b 100644
--- a/dlls/kernel32/tests/process.c
+++ b/dlls/kernel32/tests/process.c
@@ -4073,7 +4073,7 @@ static void test_parent_process_attribute(unsigned int level, HANDLE read_pipe)
     }
 
     memset(&si, 0, sizeof(si));
-    si.StartupInfo.cb = sizeof(si.StartupInfo);
+    si.StartupInfo.cb = sizeof(si);
 
     if (level)
     {
@@ -4221,7 +4221,7 @@ static void test_handle_list_attribute(BOOL child, HANDLE handle1, HANDLE handle
             "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError());
 
     memset(&si, 0, sizeof(si));
-    si.StartupInfo.cb = sizeof(si.StartupInfo);
+    si.StartupInfo.cb = sizeof(si);
     si.lpAttributeList = heap_alloc(size);
     ret = pInitializeProcThreadAttributeList(si.lpAttributeList, 1, 0, &size);
     ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError());
-- 
2.31.1




More information about the wine-devel mailing list