Updated kernel32-Job_Tests patchset

Warning fixes.
This commit is contained in:
Alistair Leslie-Hughes 2022-03-14 10:13:20 +11:00
parent fd7be1f70c
commit 348ecab0e4

View File

@ -1,4 +1,4 @@
From 58eba4970c0ab92c7554d76eaa5e4f6571506dbc Mon Sep 17 00:00:00 2001
From dd46b005cfcc8aa02bf25c031326e28bd75e0ff2 Mon Sep 17 00:00:00 2001
From: Mark Jansen <mark.jansen@reactos.org>
Date: Sun, 24 Sep 2017 22:45:22 +0200
Subject: [PATCH] kernel32/tests: Add tests for job object accounting
@ -9,7 +9,7 @@ Signed-off-by: Mark Jansen <mark.jansen@reactos.org>
1 file changed, 95 insertions(+)
diff --git a/dlls/kernel32/tests/process.c b/dlls/kernel32/tests/process.c
index e9e8555c32e..32318ecdffd 100644
index e9e8555c32e..e5a9914ca7b 100644
--- a/dlls/kernel32/tests/process.c
+++ b/dlls/kernel32/tests/process.c
@@ -2541,6 +2541,69 @@ static void _create_process(int line, const char *command, LPPROCESS_INFORMATION
@ -28,16 +28,16 @@ index e9e8555c32e..32318ecdffd 100644
+
+ memset(buf, 0, sizeof(buf));
+ ret = pQueryInformationJobObject(job, JobObjectBasicProcessIdList, pid_list, sizeof(buf), &ret_len);
+ ok_(__FILE__, line)(ret, "QueryInformationJobObject error %u\n", GetLastError());
+ ok_(__FILE__, line)(ret, "QueryInformationJobObject error %lu\n", GetLastError());
+ if (ret)
+ {
+ todo_wine_if(expected_count)
+ ok_(__FILE__, line)(expected_count == pid_list->NumberOfAssignedProcesses,
+ "Expected NumberOfAssignedProcesses to be %d (expected_count) is %d\n",
+ "Expected NumberOfAssignedProcesses to be %d (expected_count) is %ld\n",
+ expected_count, pid_list->NumberOfAssignedProcesses);
+ todo_wine_if(expected_count)
+ ok_(__FILE__, line)(expected_count == pid_list->NumberOfProcessIdsInList,
+ "Expected NumberOfProcessIdsInList to be %d (expected_count) is %d\n",
+ "Expected NumberOfProcessIdsInList to be %d (expected_count) is %ld\n",
+ expected_count, pid_list->NumberOfProcessIdsInList);
+
+ va_start(valist, expected_count);
@ -45,7 +45,7 @@ index e9e8555c32e..32318ecdffd 100644
+ {
+ pid = va_arg(valist, DWORD);
+ ok_(__FILE__, line)(pid == pid_list->ProcessIdList[n],
+ "Expected pid_list->ProcessIdList[%d] to be %x is %lx\n",
+ "Expected pid_list->ProcessIdList[%d] to be %lx is %Ix\n",
+ n, pid, pid_list->ProcessIdList[n]);
+ }
+ va_end(valist);
@ -61,21 +61,21 @@ index e9e8555c32e..32318ecdffd 100644
+
+ memset(&basic_accounting, 0, sizeof(basic_accounting));
+ ret = pQueryInformationJobObject(job, JobObjectBasicAccountingInformation, &basic_accounting, sizeof(basic_accounting), &ret_len);
+ ok_(__FILE__, line)(ret, "QueryInformationJobObject error %u\n", GetLastError());
+ ok_(__FILE__, line)(ret, "QueryInformationJobObject error %lu\n", GetLastError());
+ if (ret)
+ {
+ /* Not going to check process times or page faults */
+
+ todo_wine_if(total_proc)
+ ok_(__FILE__, line)(total_proc == basic_accounting.TotalProcesses,
+ "Expected basic_accounting.TotalProcesses to be %d (total_proc) is %d\n",
+ "Expected basic_accounting.TotalProcesses to be %d (total_proc) is %ld\n",
+ total_proc, basic_accounting.TotalProcesses);
+ todo_wine_if(active_proc)
+ ok_(__FILE__, line)(active_proc == basic_accounting.ActiveProcesses,
+ "Expected basic_accounting.ActiveProcesses to be %d (active_proc) is %d\n",
+ "Expected basic_accounting.ActiveProcesses to be %d (active_proc) is %ld\n",
+ active_proc, basic_accounting.ActiveProcesses);
+ ok_(__FILE__, line)(terminated_proc == basic_accounting.TotalTerminatedProcesses,
+ "Expected basic_accounting.TotalTerminatedProcesses to be %d (terminated_proc) is %d\n",
+ "Expected basic_accounting.TotalTerminatedProcesses to be %d (terminated_proc) is %ld\n",
+ terminated_proc, basic_accounting.TotalTerminatedProcesses);
+ }
+}