Rebase against 8c74027ba60a360f24cf232ee233e71262d8f1ff

This commit is contained in:
Alistair Leslie-Hughes 2019-10-19 13:36:30 +11:00
parent b95882c061
commit eab8fd69f7
2 changed files with 21 additions and 21 deletions

View File

@ -1,18 +1,18 @@
From 6addfba7928c62ea5a1a7e9717c564f745523957 Mon Sep 17 00:00:00 2001
From e9f5574ee2a3b6a0b2668747aef7d95c176ece8f Mon Sep 17 00:00:00 2001
From: Mark Jansen <mark.jansen@reactos.org>
Date: Sun, 24 Sep 2017 22:45:22 +0200
Subject: kernel32/tests: Add tests for job object accounting
Subject: [PATCH] kernel32/tests: Add tests for job object accounting
Signed-off-by: Mark Jansen <mark.jansen@reactos.org>
---
dlls/kernel32/tests/process.c | 95 +++++++++++++++++++++++++++++++++++++++++++
dlls/kernel32/tests/process.c | 95 +++++++++++++++++++++++++++++++++++
1 file changed, 95 insertions(+)
diff --git a/dlls/kernel32/tests/process.c b/dlls/kernel32/tests/process.c
index 07daea82aec..5379684e28d 100644
index f181536e7a6..4c2709cce0e 100644
--- a/dlls/kernel32/tests/process.c
+++ b/dlls/kernel32/tests/process.c
@@ -2364,6 +2364,69 @@ static void _create_process(int line, const char *command, LPPROCESS_INFORMATION
@@ -2423,6 +2423,69 @@ static void _create_process(int line, const char *command, LPPROCESS_INFORMATION
ok_(__FILE__, line)(ret, "CreateProcess error %u\n", GetLastError());
}
@ -82,7 +82,7 @@ index 07daea82aec..5379684e28d 100644
static void test_IsProcessInJob(void)
{
@@ -2390,11 +2453,15 @@ static void test_IsProcessInJob(void)
@@ -2449,11 +2512,15 @@ static void test_IsProcessInJob(void)
ret = pIsProcessInJob(pi.hProcess, job, &out);
ok(ret, "IsProcessInJob error %u\n", GetLastError());
ok(!out, "IsProcessInJob returned out=%u\n", out);
@ -96,9 +96,9 @@ index 07daea82aec..5379684e28d 100644
+ test_assigned_proc(job2, 0);
+ test_accounting(job2, 0, 0, 0);
out = TRUE;
ret = pIsProcessInJob(pi.hProcess, NULL, &out);
@@ -2408,11 +2475,15 @@ static void test_IsProcessInJob(void)
ret = pAssignProcessToJobObject(job, pi.hProcess);
ok(ret, "AssignProcessToJobObject error %u\n", GetLastError());
@@ -2462,11 +2529,15 @@ static void test_IsProcessInJob(void)
ret = pIsProcessInJob(pi.hProcess, job, &out);
ok(ret, "IsProcessInJob error %u\n", GetLastError());
ok(out, "IsProcessInJob returned out=%u\n", out);
@ -114,7 +114,7 @@ index 07daea82aec..5379684e28d 100644
out = FALSE;
ret = pIsProcessInJob(pi.hProcess, NULL, &out);
@@ -2428,6 +2499,8 @@ static void test_IsProcessInJob(void)
@@ -2482,6 +2553,8 @@ static void test_IsProcessInJob(void)
ret = pIsProcessInJob(pi.hProcess, job, &out);
ok(ret, "IsProcessInJob error %u\n", GetLastError());
ok(out, "IsProcessInJob returned out=%u\n", out);
@ -123,7 +123,7 @@ index 07daea82aec..5379684e28d 100644
CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);
@@ -2444,11 +2517,15 @@ static void test_TerminateJobObject(void)
@@ -2498,11 +2571,15 @@ static void test_TerminateJobObject(void)
job = pCreateJobObjectW(NULL, NULL);
ok(job != NULL, "CreateJobObject error %u\n", GetLastError());
@ -139,7 +139,7 @@ index 07daea82aec..5379684e28d 100644
ret = pTerminateJobObject(job, 123);
ok(ret, "TerminateJobObject error %u\n", GetLastError());
@@ -2456,6 +2533,8 @@ static void test_TerminateJobObject(void)
@@ -2510,6 +2587,8 @@ static void test_TerminateJobObject(void)
dwret = WaitForSingleObject(pi.hProcess, 1000);
ok(dwret == WAIT_OBJECT_0, "WaitForSingleObject returned %u\n", dwret);
if (dwret == WAIT_TIMEOUT) TerminateProcess(pi.hProcess, 0);
@ -148,7 +148,7 @@ index 07daea82aec..5379684e28d 100644
ret = GetExitCodeProcess(pi.hProcess, &dwret);
ok(ret, "GetExitCodeProcess error %u\n", GetLastError());
@@ -2475,6 +2554,8 @@ static void test_TerminateJobObject(void)
@@ -2529,6 +2608,8 @@ static void test_TerminateJobObject(void)
ret = pAssignProcessToJobObject(job, pi.hProcess);
ok(!ret, "AssignProcessToJobObject unexpectedly succeeded\n");
expect_eq_d(ERROR_ACCESS_DENIED, GetLastError());
@ -157,7 +157,7 @@ index 07daea82aec..5379684e28d 100644
CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);
@@ -2661,11 +2742,15 @@ static void test_KillOnJobClose(void)
@@ -2715,11 +2796,15 @@ static void test_KillOnJobClose(void)
return;
}
ok(ret, "SetInformationJobObject error %u\n", GetLastError());
@ -173,7 +173,7 @@ index 07daea82aec..5379684e28d 100644
CloseHandle(job);
@@ -2769,6 +2854,8 @@ static HANDLE test_AddSelfToJob(void)
@@ -2823,6 +2908,8 @@ static HANDLE test_AddSelfToJob(void)
ret = pAssignProcessToJobObject(job, GetCurrentProcess());
ok(ret, "AssignProcessToJobObject error %u\n", GetLastError());
@ -182,7 +182,7 @@ index 07daea82aec..5379684e28d 100644
return job;
}
@@ -2796,6 +2883,8 @@ static void test_jobInheritance(HANDLE job)
@@ -2850,6 +2937,8 @@ static void test_jobInheritance(HANDLE job)
ret = pIsProcessInJob(pi.hProcess, job, &out);
ok(ret, "IsProcessInJob error %u\n", GetLastError());
ok(out, "IsProcessInJob returned out=%u\n", out);
@ -191,7 +191,7 @@ index 07daea82aec..5379684e28d 100644
dwret = WaitForSingleObject(pi.hProcess, 1000);
ok(dwret == WAIT_OBJECT_0, "WaitForSingleObject returned %u\n", dwret);
@@ -2824,6 +2913,8 @@ static void test_BreakawayOk(HANDLE job)
@@ -2878,6 +2967,8 @@ static void test_BreakawayOk(HANDLE job)
ret = CreateProcessA(NULL, buffer, NULL, NULL, FALSE, CREATE_BREAKAWAY_FROM_JOB, NULL, NULL, &si, &pi);
ok(!ret, "CreateProcessA expected failure\n");
expect_eq_d(ERROR_ACCESS_DENIED, GetLastError());
@ -200,7 +200,7 @@ index 07daea82aec..5379684e28d 100644
if (ret)
{
@@ -2846,6 +2937,8 @@ static void test_BreakawayOk(HANDLE job)
@@ -2900,6 +2991,8 @@ static void test_BreakawayOk(HANDLE job)
ret = pIsProcessInJob(pi.hProcess, job, &out);
ok(ret, "IsProcessInJob error %u\n", GetLastError());
ok(!out, "IsProcessInJob returned out=%u\n", out);
@ -209,7 +209,7 @@ index 07daea82aec..5379684e28d 100644
dwret = WaitForSingleObject(pi.hProcess, 1000);
ok(dwret == WAIT_OBJECT_0, "WaitForSingleObject returned %u\n", dwret);
@@ -2863,6 +2956,8 @@ static void test_BreakawayOk(HANDLE job)
@@ -2917,6 +3010,8 @@ static void test_BreakawayOk(HANDLE job)
ret = pIsProcessInJob(pi.hProcess, job, &out);
ok(ret, "IsProcessInJob error %u\n", GetLastError());
ok(!out, "IsProcessInJob returned out=%u\n", out);
@ -219,5 +219,5 @@ index 07daea82aec..5379684e28d 100644
dwret = WaitForSingleObject(pi.hProcess, 1000);
ok(dwret == WAIT_OBJECT_0, "WaitForSingleObject returned %u\n", dwret);
--
2.14.1
2.23.0

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "0fe003435e90dc32dd405a62af8fbcc20afc925d"
echo "8c74027ba60a360f24cf232ee233e71262d8f1ff"
}
# Show version information