You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Rebase against 1b9d48a7b01e2b715af46bc1f8d5fe6f1529782c.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From aea7dcfb0b09794b4925c5e8f0ca2a28b783e8f1 Mon Sep 17 00:00:00 2001
|
||||
From ed30d93e063cb68111dc8f64d125f3f48cf3098e Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Wesie <awesie@gmail.com>
|
||||
Date: Mon, 27 Apr 2020 15:32:22 +0300
|
||||
Subject: [PATCH] kernel32/tests, psapi/tests: Update tests.
|
||||
@@ -9,10 +9,10 @@ Subject: [PATCH] kernel32/tests, psapi/tests: Update tests.
|
||||
2 files changed, 7 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernel32/tests/virtual.c b/dlls/kernel32/tests/virtual.c
|
||||
index f576d132d8b..70824d771ed 100644
|
||||
index a3b2d365c33..45f79903ddd 100644
|
||||
--- a/dlls/kernel32/tests/virtual.c
|
||||
+++ b/dlls/kernel32/tests/virtual.c
|
||||
@@ -3572,9 +3572,7 @@ static void test_CreateFileMapping_protection(void)
|
||||
@@ -3604,9 +3604,7 @@ static void test_CreateFileMapping_protection(void)
|
||||
SetLastError(0xdeadbeef);
|
||||
ret = VirtualQuery(base, &info, sizeof(info));
|
||||
ok(ret, "VirtualQuery failed %d\n", GetLastError());
|
||||
@@ -23,7 +23,7 @@ index f576d132d8b..70824d771ed 100644
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -3588,9 +3586,7 @@ static void test_CreateFileMapping_protection(void)
|
||||
@@ -3620,9 +3618,7 @@ static void test_CreateFileMapping_protection(void)
|
||||
SetLastError(0xdeadbeef);
|
||||
ret = VirtualProtect(base, si.dwPageSize, PAGE_NOACCESS, &old_prot);
|
||||
ok(ret, "%d: VirtualProtect error %d\n", i, GetLastError());
|
||||
@@ -34,7 +34,7 @@ index f576d132d8b..70824d771ed 100644
|
||||
|
||||
UnmapViewOfFile(base);
|
||||
}
|
||||
@@ -3943,15 +3939,12 @@ static void test_mapping( HANDLE hfile, DWORD sec_flags, BOOL readonly )
|
||||
@@ -3975,15 +3971,12 @@ static void test_mapping( HANDLE hfile, DWORD sec_flags, BOOL readonly )
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ index f576d132d8b..70824d771ed 100644
|
||||
ok(info.Protect == actual_prot,
|
||||
"VirtualProtect wrong prot, map %#x, view %#x, requested prot %#x got %#x\n",
|
||||
page_prot[i], view[j].prot, page_prot[k], info.Protect );
|
||||
@@ -4006,15 +3999,12 @@ static void test_mapping( HANDLE hfile, DWORD sec_flags, BOOL readonly )
|
||||
@@ -4038,15 +4031,12 @@ static void test_mapping( HANDLE hfile, DWORD sec_flags, BOOL readonly )
|
||||
if (!anon_mapping && is_compatible_protection(alloc_prot, PAGE_WRITECOPY))
|
||||
{
|
||||
ret = VirtualProtect(base, sec_flags & SEC_IMAGE ? si.dwPageSize : 2*si.dwPageSize, PAGE_WRITECOPY, &old_prot);
|
||||
@@ -66,7 +66,7 @@ index f576d132d8b..70824d771ed 100644
|
||||
ok(info.RegionSize == si.dwPageSize, "wrong region size %#lx after write, map %#x, view %#x got %#x\n",
|
||||
info.RegionSize, page_prot[i], view[j].prot, info.Protect );
|
||||
|
||||
@@ -4025,7 +4015,6 @@ static void test_mapping( HANDLE hfile, DWORD sec_flags, BOOL readonly )
|
||||
@@ -4057,7 +4047,6 @@ static void test_mapping( HANDLE hfile, DWORD sec_flags, BOOL readonly )
|
||||
{
|
||||
ret = VirtualQuery((char*)base + si.dwPageSize, &info, sizeof(info));
|
||||
ok(ret, "%d: VirtualQuery failed %d\n", j, GetLastError());
|
||||
@@ -74,7 +74,7 @@ index f576d132d8b..70824d771ed 100644
|
||||
ok(info.Protect == PAGE_WRITECOPY, "wrong prot, map %#x, view %#x got %#x\n",
|
||||
page_prot[i], view[j].prot, info.Protect);
|
||||
}
|
||||
@@ -4045,14 +4034,11 @@ static void test_mapping( HANDLE hfile, DWORD sec_flags, BOOL readonly )
|
||||
@@ -4077,14 +4066,11 @@ static void test_mapping( HANDLE hfile, DWORD sec_flags, BOOL readonly )
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ index f576d132d8b..70824d771ed 100644
|
||||
ok(info.Protect == map_prot_written( page_prot[k] ),
|
||||
"VirtualProtect wrong prot, map %#x, view %#x, requested prot %#x got %#x\n",
|
||||
page_prot[i], view[j].prot, page_prot[k], info.Protect );
|
||||
@@ -4093,7 +4079,6 @@ static void test_mappings(void)
|
||||
@@ -4125,7 +4111,6 @@ static void test_mappings(void)
|
||||
SetFilePointer(hfile, 0, NULL, FILE_BEGIN);
|
||||
ok(ReadFile(hfile, &data, sizeof(data), &num_bytes, NULL), "ReadFile failed\n");
|
||||
ok(num_bytes == sizeof(data), "num_bytes = %d\n", num_bytes);
|
||||
@@ -98,10 +98,10 @@ index f576d132d8b..70824d771ed 100644
|
||||
|
||||
CloseHandle( hfile );
|
||||
diff --git a/dlls/psapi/tests/psapi_main.c b/dlls/psapi/tests/psapi_main.c
|
||||
index c92423ee193..d85099455aa 100644
|
||||
index 185a4062092..519e39c3df0 100644
|
||||
--- a/dlls/psapi/tests/psapi_main.c
|
||||
+++ b/dlls/psapi/tests/psapi_main.c
|
||||
@@ -830,6 +830,8 @@ static void test_QueryWorkingSetEx(void)
|
||||
@@ -803,6 +803,8 @@ static void test_QueryWorkingSetEx(void)
|
||||
DWORD prot;
|
||||
BOOL ret;
|
||||
|
||||
@@ -110,16 +110,16 @@ index c92423ee193..d85099455aa 100644
|
||||
if (pQueryWorkingSetEx == NULL)
|
||||
{
|
||||
win_skip("QueryWorkingSetEx not found, skipping tests\n");
|
||||
@@ -848,6 +850,9 @@ static void test_QueryWorkingSetEx(void)
|
||||
@@ -821,6 +823,9 @@ static void test_QueryWorkingSetEx(void)
|
||||
check_QueryWorkingSetEx(addr, "exe,readonly1", 0, 0, 1, TRUE);
|
||||
|
||||
*(volatile char *)addr;
|
||||
+ check_QueryWorkingSetEx(addr, "exe,readonly2", 1, PAGE_READONLY, 1, FALSE);
|
||||
+
|
||||
+ ret = VirtualProtect(addr, 0x1000, PAGE_EXECUTE_READWRITE, &prot);
|
||||
ok(ret, "VirtualProtect failed with %d\n", GetLastError());
|
||||
ok(ret, "VirtualProtect failed with %ld\n", GetLastError());
|
||||
check_QueryWorkingSetEx(addr, "exe,readonly2", 1, PAGE_READONLY, 1, FALSE);
|
||||
|
||||
--
|
||||
2.27.0
|
||||
2.34.1
|
||||
|
||||
|
Reference in New Issue
Block a user