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
0ba0f505
Commit
0ba0f505
authored
Sep 25, 2011
by
André Hentschel
Committed by
Alexandre Julliard
Sep 26, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Don't test function directly when reporting GetLastError().
parent
fd71f876
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
13 deletions
+18
-13
comm.c
dlls/kernel32/tests/comm.c
+2
-3
file.c
dlls/kernel32/tests/file.c
+2
-1
pipe.c
dlls/kernel32/tests/pipe.c
+2
-1
profile.c
dlls/kernel32/tests/profile.c
+6
-6
virtual.c
dlls/kernel32/tests/virtual.c
+6
-2
No files found.
dlls/kernel32/tests/comm.c
View file @
0ba0f505
...
...
@@ -1115,9 +1115,8 @@ static void test_WaitRx(HANDLE hcom)
ZeroMemory
(
&
overlapped
,
sizeof
(
overlapped
));
overlapped
.
hEvent
=
hComPortEvent
;
ok
((
hComWriteEvent
=
CreateEvent
(
NULL
,
TRUE
,
FALSE
,
NULL
))
!=
0
,
"CreateEvent res %d
\n
"
,
GetLastError
());
hComWriteEvent
=
CreateEvent
(
NULL
,
TRUE
,
FALSE
,
NULL
);
ok
(
hComWriteEvent
!=
NULL
,
"CreateEvent res %d
\n
"
,
GetLastError
());
ZeroMemory
(
&
overlapped_w
,
sizeof
(
overlapped_w
));
overlapped_w
.
hEvent
=
hComWriteEvent
;
...
...
dlls/kernel32/tests/file.c
View file @
0ba0f505
...
...
@@ -2393,7 +2393,8 @@ static void test_read_write(void)
user_apc_ran
=
FALSE
;
if
(
pQueueUserAPC
)
{
trace
(
"Queueing an user APC
\n
"
);
/* verify the file is non alerable */
ok
(
pQueueUserAPC
(
&
user_apc
,
GetCurrentThread
(),
0
),
"QueueUserAPC failed: %d
\n
"
,
GetLastError
());
ret
=
pQueueUserAPC
(
&
user_apc
,
GetCurrentThread
(),
0
);
ok
(
ret
,
"QueueUserAPC failed: %d
\n
"
,
GetLastError
());
}
SetLastError
(
12345678
);
...
...
dlls/kernel32/tests/pipe.c
View file @
0ba0f505
...
...
@@ -480,7 +480,8 @@ static DWORD CALLBACK serverThreadMain2(LPVOID arg)
user_apc_ran
=
FALSE
;
if
(
i
==
0
&&
pQueueUserAPC
)
{
trace
(
"Queueing an user APC
\n
"
);
/* verify the pipe is non alerable */
ok
(
pQueueUserAPC
(
&
user_apc
,
GetCurrentThread
(),
0
),
"QueueUserAPC failed: %d
\n
"
,
GetLastError
());
success
=
pQueueUserAPC
(
&
user_apc
,
GetCurrentThread
(),
0
);
ok
(
success
,
"QueueUserAPC failed: %d
\n
"
,
GetLastError
());
}
/* Wait for client to connect */
...
...
dlls/kernel32/tests/profile.c
View file @
0ba0f505
...
...
@@ -448,8 +448,8 @@ static void test_profile_delete_on_close(void)
h
=
CreateFile
(
testfile
,
GENERIC_WRITE
,
FILE_SHARE_READ
,
NULL
,
CREATE_ALWAYS
,
FILE_FLAG_DELETE_ON_CLOSE
,
NULL
);
ok
(
WriteFile
(
h
,
contents
,
sizeof
contents
-
1
,
&
size
,
NULL
),
"Cannot write test file: %x
\n
"
,
GetLastError
()
);
res
=
WriteFile
(
h
,
contents
,
sizeof
contents
-
1
,
&
size
,
NULL
);
ok
(
res
,
"Cannot write test file: %x
\n
"
,
GetLastError
()
);
ok
(
size
==
sizeof
contents
-
1
,
"Test file: partial write
\n
"
);
SetLastError
(
0xdeadbeef
);
...
...
@@ -472,8 +472,8 @@ static void test_profile_refresh(void)
h
=
CreateFile
(
testfile
,
GENERIC_WRITE
,
FILE_SHARE_READ
,
NULL
,
CREATE_ALWAYS
,
FILE_FLAG_DELETE_ON_CLOSE
,
NULL
);
ok
(
WriteFile
(
h
,
contents1
,
sizeof
contents1
-
1
,
&
size
,
NULL
),
"Cannot write test file: %x
\n
"
,
GetLastError
()
);
res
=
WriteFile
(
h
,
contents1
,
sizeof
contents1
-
1
,
&
size
,
NULL
);
ok
(
res
,
"Cannot write test file: %x
\n
"
,
GetLastError
()
);
ok
(
size
==
sizeof
contents1
-
1
,
"Test file: partial write
\n
"
);
SetLastError
(
0xdeadbeef
);
...
...
@@ -488,8 +488,8 @@ static void test_profile_refresh(void)
h
=
CreateFile
(
testfile
,
GENERIC_WRITE
,
FILE_SHARE_READ
,
NULL
,
CREATE_ALWAYS
,
FILE_FLAG_DELETE_ON_CLOSE
,
NULL
);
ok
(
WriteFile
(
h
,
contents2
,
sizeof
contents2
-
1
,
&
size
,
NULL
),
"Cannot write test file: %x
\n
"
,
GetLastError
()
);
res
=
WriteFile
(
h
,
contents2
,
sizeof
contents2
-
1
,
&
size
,
NULL
);
ok
(
res
,
"Cannot write test file: %x
\n
"
,
GetLastError
()
);
ok
(
size
==
sizeof
contents2
-
1
,
"Test file: partial write
\n
"
);
SetLastError
(
0xdeadbeef
);
...
...
dlls/kernel32/tests/virtual.c
View file @
0ba0f505
...
...
@@ -598,12 +598,14 @@ static void test_MapViewOfFile(void)
ptr
=
MapViewOfFile
(
mapping
,
FILE_MAP_WRITE
,
0
,
0
,
0
);
if
(
!
ptr
)
{
SIZE_T
size
;
ok
(
GetLastError
()
==
ERROR_ACCESS_DENIED
,
"Wrong error %d
\n
"
,
GetLastError
()
);
SetLastError
(
0xdeadbeef
);
ptr
=
MapViewOfFile
(
mapping
,
FILE_MAP_READ
,
0
,
0
,
0
);
ok
(
ptr
!=
NULL
,
"MapViewOfFile FILE_MAP_READ error %u
\n
"
,
GetLastError
()
);
SetLastError
(
0xdeadbeef
);
ok
(
VirtualQuery
(
ptr
,
&
info
,
sizeof
(
info
)
)
==
sizeof
(
info
),
size
=
VirtualQuery
(
ptr
,
&
info
,
sizeof
(
info
)
);
ok
(
size
==
sizeof
(
info
),
"VirtualQuery error %u
\n
"
,
GetLastError
()
);
ok
(
info
.
BaseAddress
==
ptr
,
"%p != %p
\n
"
,
info
.
BaseAddress
,
ptr
);
ok
(
info
.
AllocationBase
==
ptr
,
"%p != %p
\n
"
,
info
.
AllocationBase
,
ptr
);
...
...
@@ -623,12 +625,14 @@ static void test_MapViewOfFile(void)
ptr
=
MapViewOfFile
(
mapping
,
FILE_MAP_READ
,
0
,
0
,
0
);
if
(
!
ptr
)
{
SIZE_T
size
;
ok
(
GetLastError
()
==
ERROR_ACCESS_DENIED
,
"Wrong error %d
\n
"
,
GetLastError
()
);
SetLastError
(
0xdeadbeef
);
ptr
=
MapViewOfFile
(
mapping
,
FILE_MAP_WRITE
,
0
,
0
,
0
);
ok
(
ptr
!=
NULL
,
"MapViewOfFile FILE_MAP_WRITE error %u
\n
"
,
GetLastError
()
);
SetLastError
(
0xdeadbeef
);
ok
(
VirtualQuery
(
ptr
,
&
info
,
sizeof
(
info
)
)
==
sizeof
(
info
),
size
=
VirtualQuery
(
ptr
,
&
info
,
sizeof
(
info
)
);
ok
(
size
==
sizeof
(
info
),
"VirtualQuery error %u
\n
"
,
GetLastError
()
);
ok
(
info
.
BaseAddress
==
ptr
,
"%p != %p
\n
"
,
info
.
BaseAddress
,
ptr
);
ok
(
info
.
AllocationBase
==
ptr
,
"%p != %p
\n
"
,
info
.
AllocationBase
,
ptr
);
...
...
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