Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
f94755f7
Commit
f94755f7
authored
Feb 13, 2016
by
Sebastian Lackner
Committed by
Alexandre Julliard
Feb 14, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Fix flags passed to VirtualFree in multiple tests.
Signed-off-by:
Sebastian Lackner
<
sebastian@fds-team.de
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
446067b3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
14 deletions
+14
-14
file.c
dlls/kernel32/tests/file.c
+1
-1
virtual.c
dlls/kernel32/tests/virtual.c
+13
-13
No files found.
dlls/kernel32/tests/file.c
View file @
f94755f7
...
@@ -3104,7 +3104,7 @@ static void test_read_write(void)
...
@@ -3104,7 +3104,7 @@ static void test_read_write(void)
"wrong error %u
\n
"
,
GetLastError
()
);
"wrong error %u
\n
"
,
GetLastError
()
);
ok
(
bytes
==
0
,
"read %x bytes
\n
"
,
bytes
);
ok
(
bytes
==
0
,
"read %x bytes
\n
"
,
bytes
);
VirtualFree
(
mem
,
0
,
MEM_
FRE
E
);
VirtualFree
(
mem
,
0
,
MEM_
RELEAS
E
);
ret
=
CloseHandle
(
hFile
);
ret
=
CloseHandle
(
hFile
);
ok
(
ret
,
"CloseHandle: error %d
\n
"
,
GetLastError
());
ok
(
ret
,
"CloseHandle: error %d
\n
"
,
GetLastError
());
...
...
dlls/kernel32/tests/virtual.c
View file @
f94755f7
...
@@ -147,8 +147,8 @@ static void test_VirtualAllocEx(void)
...
@@ -147,8 +147,8 @@ static void test_VirtualAllocEx(void)
b
=
pVirtualFreeEx
(
hProcess
,
addr1
,
0
,
MEM_RELEASE
);
b
=
pVirtualFreeEx
(
hProcess
,
addr1
,
0
,
MEM_RELEASE
);
ok
(
b
!=
0
,
"VirtualFreeEx, error %u
\n
"
,
GetLastError
());
ok
(
b
!=
0
,
"VirtualFreeEx, error %u
\n
"
,
GetLastError
());
VirtualFree
(
src
,
0
,
MEM_
FRE
E
);
VirtualFree
(
src
,
0
,
MEM_
RELEAS
E
);
VirtualFree
(
dst
,
0
,
MEM_
FRE
E
);
VirtualFree
(
dst
,
0
,
MEM_
RELEAS
E
);
/*
/*
* The following tests parallel those in test_VirtualAlloc()
* The following tests parallel those in test_VirtualAlloc()
...
@@ -1755,11 +1755,11 @@ static void test_write_watch(void)
...
@@ -1755,11 +1755,11 @@ static void test_write_watch(void)
ok
(
!
ret
,
"ResetWriteWatch failed %u
\n
"
,
ret
);
ok
(
!
ret
,
"ResetWriteWatch failed %u
\n
"
,
ret
);
}
}
VirtualFree
(
base
,
0
,
MEM_
FRE
E
);
VirtualFree
(
base
,
0
,
MEM_
RELEAS
E
);
base
=
VirtualAlloc
(
0
,
size
,
MEM_RESERVE
|
MEM_WRITE_WATCH
,
PAGE_READWRITE
);
base
=
VirtualAlloc
(
0
,
size
,
MEM_RESERVE
|
MEM_WRITE_WATCH
,
PAGE_READWRITE
);
ok
(
base
!=
NULL
,
"VirtualAlloc failed %u
\n
"
,
GetLastError
()
);
ok
(
base
!=
NULL
,
"VirtualAlloc failed %u
\n
"
,
GetLastError
()
);
VirtualFree
(
base
,
0
,
MEM_
FRE
E
);
VirtualFree
(
base
,
0
,
MEM_
RELEAS
E
);
base
=
VirtualAlloc
(
0
,
size
,
MEM_WRITE_WATCH
,
PAGE_READWRITE
);
base
=
VirtualAlloc
(
0
,
size
,
MEM_WRITE_WATCH
,
PAGE_READWRITE
);
ok
(
!
base
,
"VirtualAlloc succeeded
\n
"
);
ok
(
!
base
,
"VirtualAlloc succeeded
\n
"
);
...
@@ -1803,7 +1803,7 @@ static void test_write_watch(void)
...
@@ -1803,7 +1803,7 @@ static void test_write_watch(void)
"wrong count %lu
\n
"
,
count
);
"wrong count %lu
\n
"
,
count
);
if
(
count
)
ok
(
results
[
0
]
==
base
+
5
*
pagesize
,
"wrong result %p
\n
"
,
results
[
0
]
);
if
(
count
)
ok
(
results
[
0
]
==
base
+
5
*
pagesize
,
"wrong result %p
\n
"
,
results
[
0
]
);
VirtualFree
(
base
,
0
,
MEM_
FRE
E
);
VirtualFree
(
base
,
0
,
MEM_
RELEAS
E
);
}
}
#ifdef __i386__
#ifdef __i386__
...
@@ -1948,7 +1948,7 @@ static void test_guard_page(void)
...
@@ -1948,7 +1948,7 @@ static void test_guard_page(void)
ok
(
success
,
"VirtualUnlock failed %u
\n
"
,
GetLastError
()
);
ok
(
success
,
"VirtualUnlock failed %u
\n
"
,
GetLastError
()
);
}
}
VirtualFree
(
base
,
0
,
MEM_
FRE
E
);
VirtualFree
(
base
,
0
,
MEM_
RELEAS
E
);
/* combined guard page / write watch tests */
/* combined guard page / write watch tests */
if
(
!
pGetWriteWatch
||
!
pResetWriteWatch
)
if
(
!
pGetWriteWatch
||
!
pResetWriteWatch
)
...
@@ -2054,7 +2054,7 @@ static void test_guard_page(void)
...
@@ -2054,7 +2054,7 @@ static void test_guard_page(void)
todo_wine
todo_wine
ok
(
results
[
0
]
==
base
||
broken
(
results
[
0
]
==
(
void
*
)
0xdeadbeef
)
/* Windows 8 */
,
"wrong result %p
\n
"
,
results
[
0
]
);
ok
(
results
[
0
]
==
base
||
broken
(
results
[
0
]
==
(
void
*
)
0xdeadbeef
)
/* Windows 8 */
,
"wrong result %p
\n
"
,
results
[
0
]
);
VirtualFree
(
base
,
0
,
MEM_
FRE
E
);
VirtualFree
(
base
,
0
,
MEM_
RELEAS
E
);
}
}
static
DWORD
WINAPI
stack_commit_func
(
void
*
arg
)
static
DWORD
WINAPI
stack_commit_func
(
void
*
arg
)
...
@@ -2128,8 +2128,8 @@ static void test_stack_commit(void)
...
@@ -2128,8 +2128,8 @@ static void test_stack_commit(void)
pNtCurrentTeb
()
->
Tib
.
StackBase
=
old_stack_base
;
pNtCurrentTeb
()
->
Tib
.
StackBase
=
old_stack_base
;
pNtCurrentTeb
()
->
Tib
.
StackLimit
=
old_stack_limit
;
pNtCurrentTeb
()
->
Tib
.
StackLimit
=
old_stack_limit
;
VirtualFree
(
new_stack
,
0
,
MEM_
FRE
E
);
VirtualFree
(
new_stack
,
0
,
MEM_
RELEAS
E
);
VirtualFree
(
call_on_stack
,
0
,
MEM_
FRE
E
);
VirtualFree
(
call_on_stack
,
0
,
MEM_
RELEAS
E
);
}
}
DWORD
num_execute_fault_calls
;
DWORD
num_execute_fault_calls
;
...
@@ -2564,7 +2564,7 @@ static void test_atl_thunk_emulation( ULONG dep_flags )
...
@@ -2564,7 +2564,7 @@ static void test_atl_thunk_emulation( ULONG dep_flags )
success
=
UnregisterClassA
(
cls_name
,
GetModuleHandleA
(
0
)
);
success
=
UnregisterClassA
(
cls_name
,
GetModuleHandleA
(
0
)
);
ok
(
success
,
"UnregisterClass failed %u
\n
"
,
GetLastError
()
);
ok
(
success
,
"UnregisterClass failed %u
\n
"
,
GetLastError
()
);
VirtualFree
(
base
,
0
,
MEM_
FRE
E
);
VirtualFree
(
base
,
0
,
MEM_
RELEAS
E
);
/* Repeat the tests from above with MEM_WRITE_WATCH protected memory. */
/* Repeat the tests from above with MEM_WRITE_WATCH protected memory. */
...
@@ -2753,7 +2753,7 @@ static void test_atl_thunk_emulation( ULONG dep_flags )
...
@@ -2753,7 +2753,7 @@ static void test_atl_thunk_emulation( ULONG dep_flags )
success
=
UnregisterClassA
(
cls_name
,
GetModuleHandleA
(
0
)
);
success
=
UnregisterClassA
(
cls_name
,
GetModuleHandleA
(
0
)
);
ok
(
success
,
"UnregisterClass failed %u
\n
"
,
GetLastError
()
);
ok
(
success
,
"UnregisterClass failed %u
\n
"
,
GetLastError
()
);
VirtualFree
(
base
,
0
,
MEM_
FRE
E
);
VirtualFree
(
base
,
0
,
MEM_
RELEAS
E
);
out:
out:
if
(
restore_flags
)
if
(
restore_flags
)
...
@@ -2943,7 +2943,7 @@ static void test_VirtualProtect(void)
...
@@ -2943,7 +2943,7 @@ static void test_VirtualProtect(void)
exec_prot
=
1
<<
(
i
+
4
);
exec_prot
=
1
<<
(
i
+
4
);
}
}
VirtualFree
(
base
,
0
,
MEM_
FRE
E
);
VirtualFree
(
base
,
0
,
MEM_
RELEAS
E
);
}
}
static
BOOL
is_mem_writable
(
DWORD
prot
)
static
BOOL
is_mem_writable
(
DWORD
prot
)
...
@@ -3044,7 +3044,7 @@ static void test_VirtualAlloc_protection(void)
...
@@ -3044,7 +3044,7 @@ static void test_VirtualAlloc_protection(void)
ptr
=
VirtualAlloc
(
base
,
si
.
dwPageSize
,
MEM_COMMIT
,
td
[
i
].
prot
);
ptr
=
VirtualAlloc
(
base
,
si
.
dwPageSize
,
MEM_COMMIT
,
td
[
i
].
prot
);
ok
(
ptr
==
base
,
"%d: VirtualAlloc failed %d
\n
"
,
i
,
GetLastError
());
ok
(
ptr
==
base
,
"%d: VirtualAlloc failed %d
\n
"
,
i
,
GetLastError
());
VirtualFree
(
base
,
0
,
MEM_
FRE
E
);
VirtualFree
(
base
,
0
,
MEM_
RELEAS
E
);
}
}
else
else
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment