mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
Rebase against 44b30c42cbb231e3ea54a47f6ecc19e641e5f889.
This commit is contained in:
parent
b595359adf
commit
e3ec587726
@ -1,4 +1,4 @@
|
||||
From 8781454669b29f8e2a2c0406ed4b48b435354a0c Mon Sep 17 00:00:00 2001
|
||||
From 5d8e7efe186c9a49005e1451ac04e4fc8f9bb2b8 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,10 +9,10 @@ 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 32818042337..2ecd3dc10e8 100644
|
||||
index 52c3036fe59..1b72f8f4466 100644
|
||||
--- a/dlls/kernel32/tests/process.c
|
||||
+++ b/dlls/kernel32/tests/process.c
|
||||
@@ -2398,6 +2398,69 @@ static void _create_process(int line, const char *command, LPPROCESS_INFORMATION
|
||||
@@ -2541,6 +2541,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 32818042337..2ecd3dc10e8 100644
|
||||
|
||||
static void test_IsProcessInJob(void)
|
||||
{
|
||||
@@ -2423,11 +2486,15 @@ static void test_IsProcessInJob(void)
|
||||
@@ -2566,11 +2629,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);
|
||||
@ -98,7 +98,7 @@ index 32818042337..2ecd3dc10e8 100644
|
||||
|
||||
ret = pAssignProcessToJobObject(job, pi.hProcess);
|
||||
ok(ret, "AssignProcessToJobObject error %u\n", GetLastError());
|
||||
@@ -2436,11 +2503,15 @@ static void test_IsProcessInJob(void)
|
||||
@@ -2579,11 +2646,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 32818042337..2ecd3dc10e8 100644
|
||||
|
||||
out = FALSE;
|
||||
ret = pIsProcessInJob(pi.hProcess, NULL, &out);
|
||||
@@ -2454,6 +2525,8 @@ static void test_IsProcessInJob(void)
|
||||
@@ -2597,6 +2668,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 32818042337..2ecd3dc10e8 100644
|
||||
|
||||
CloseHandle(pi.hProcess);
|
||||
CloseHandle(pi.hThread);
|
||||
@@ -2470,11 +2543,15 @@ static void test_TerminateJobObject(void)
|
||||
@@ -2613,11 +2686,15 @@ static void test_TerminateJobObject(void)
|
||||
|
||||
job = pCreateJobObjectW(NULL, NULL);
|
||||
ok(job != NULL, "CreateJobObject error %u\n", GetLastError());
|
||||
@ -139,7 +139,7 @@ index 32818042337..2ecd3dc10e8 100644
|
||||
|
||||
ret = pTerminateJobObject(job, 123);
|
||||
ok(ret, "TerminateJobObject error %u\n", GetLastError());
|
||||
@@ -2483,6 +2560,8 @@ static void test_TerminateJobObject(void)
|
||||
@@ -2626,6 +2703,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 32818042337..2ecd3dc10e8 100644
|
||||
|
||||
ret = GetExitCodeProcess(pi.hProcess, &dwret);
|
||||
ok(ret, "GetExitCodeProcess error %u\n", GetLastError());
|
||||
@@ -2500,6 +2579,8 @@ static void test_TerminateJobObject(void)
|
||||
@@ -2643,6 +2722,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 32818042337..2ecd3dc10e8 100644
|
||||
|
||||
CloseHandle(pi.hProcess);
|
||||
CloseHandle(pi.hThread);
|
||||
@@ -2687,11 +2768,15 @@ static void test_KillOnJobClose(void)
|
||||
@@ -2850,11 +2931,15 @@ static void test_KillOnJobClose(void)
|
||||
return;
|
||||
}
|
||||
ok(ret, "SetInformationJobObject error %u\n", GetLastError());
|
||||
@ -173,7 +173,7 @@ index 32818042337..2ecd3dc10e8 100644
|
||||
|
||||
CloseHandle(job);
|
||||
|
||||
@@ -2801,6 +2886,8 @@ static HANDLE test_AddSelfToJob(void)
|
||||
@@ -2964,6 +3049,8 @@ static HANDLE test_AddSelfToJob(void)
|
||||
|
||||
ret = pAssignProcessToJobObject(job, GetCurrentProcess());
|
||||
ok(ret, "AssignProcessToJobObject error %u\n", GetLastError());
|
||||
@ -182,7 +182,7 @@ index 32818042337..2ecd3dc10e8 100644
|
||||
|
||||
return job;
|
||||
}
|
||||
@@ -2822,6 +2909,8 @@ static void test_jobInheritance(HANDLE job)
|
||||
@@ -2985,6 +3072,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 32818042337..2ecd3dc10e8 100644
|
||||
|
||||
wait_and_close_child_process(&pi);
|
||||
}
|
||||
@@ -2844,6 +2933,8 @@ static void test_BreakawayOk(HANDLE job)
|
||||
@@ -3018,6 +3107,8 @@ static void test_BreakawayOk(HANDLE parent_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,16 +200,16 @@ index 32818042337..2ecd3dc10e8 100644
|
||||
|
||||
if (ret)
|
||||
{
|
||||
@@ -2861,6 +2952,8 @@ static void test_BreakawayOk(HANDLE job)
|
||||
@@ -3057,6 +3148,8 @@ static void test_BreakawayOk(HANDLE parent_job)
|
||||
ret = pIsProcessInJob(pi.hProcess, job, &out);
|
||||
ok(ret, "IsProcessInJob error %u\n", GetLastError());
|
||||
ok(!out, "IsProcessInJob returned out=%u\n", out);
|
||||
+ test_assigned_proc(job, 1, GetCurrentProcessId());
|
||||
+ test_accounting(job, 2, 1, 0);
|
||||
|
||||
wait_and_close_child_process(&pi);
|
||||
|
||||
@@ -2874,6 +2967,8 @@ static void test_BreakawayOk(HANDLE job)
|
||||
ret = pIsProcessInJob(pi.hProcess, parent_job, &out);
|
||||
ok(ret, "IsProcessInJob error %u\n", GetLastError());
|
||||
@@ -3074,6 +3167,8 @@ static void test_BreakawayOk(HANDLE parent_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 32818042337..2ecd3dc10e8 100644
|
||||
wait_and_close_child_process(&pi);
|
||||
|
||||
--
|
||||
2.25.1
|
||||
2.30.2
|
||||
|
||||
|
@ -51,7 +51,7 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "2a667e28ba7800288f5873a4b13bc0baf6e4a857"
|
||||
echo "44b30c42cbb231e3ea54a47f6ecc19e641e5f889"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
|
@ -1 +1 @@
|
||||
2a667e28ba7800288f5873a4b13bc0baf6e4a857
|
||||
44b30c42cbb231e3ea54a47f6ecc19e641e5f889
|
||||
|
Loading…
Reference in New Issue
Block a user