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
f399e903
Commit
f399e903
authored
Nov 01, 2013
by
Francois Gouget
Committed by
Alexandre Julliard
Nov 01, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Fix some module tests on Windows 8.
Windows 8 and 8.1 return some different error codes and GetDllDirectory() handles buffer termination a bit differently.
parent
59dd66df
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
module.c
dlls/kernel32/tests/module.c
+8
-7
No files found.
dlls/kernel32/tests/module.c
View file @
f399e903
...
...
@@ -261,7 +261,8 @@ static void testLoadLibraryEx(void)
hmodule
=
LoadLibraryExA
(
""
,
NULL
,
0
);
ok
(
hmodule
==
0
,
"Expected 0, got %p
\n
"
,
hmodule
);
ok
(
GetLastError
()
==
ERROR_MOD_NOT_FOUND
||
GetLastError
()
==
ERROR_DLL_NOT_FOUND
,
/* win9x */
GetLastError
()
==
ERROR_DLL_NOT_FOUND
/* win9x */
||
GetLastError
()
==
ERROR_INVALID_PARAMETER
/* win8 */
,
"Expected ERROR_MOD_NOT_FOUND or ERROR_DLL_NOT_FOUND, got %d
\n
"
,
GetLastError
());
...
...
@@ -438,7 +439,8 @@ static void testGetDllDirectory(void)
bufferA
[
length
]
=
'A'
;
bufferA
[
length
+
1
]
=
'A'
;
ret
=
pGetDllDirectoryA
(
length
+
1
,
bufferA
);
ok
(
ret
==
length
,
"i=%d, Expected %u, got %u
\n
"
,
i
,
length
,
ret
);
ok
(
ret
==
length
||
broken
(
ret
+
1
==
length
)
/* win8 */
,
"i=%d, Expected %u(+1), got %u
\n
"
,
i
,
length
,
ret
);
ok
(
bufferA
[
length
+
1
]
==
'A'
,
"i=%d, Buffer overflow
\n
"
,
i
);
ok
(
strcmp
(
bufferA
,
dll_directories
[
i
])
==
0
,
"i=%d, Wrong path returned: '%s'
\n
"
,
i
,
bufferA
);
...
...
@@ -450,13 +452,11 @@ static void testGetDllDirectory(void)
ok
(
cmpStrAW
(
dll_directories
[
i
],
bufferW
,
length
,
length
),
"i=%d, Wrong path returned: %s
\n
"
,
i
,
wine_dbgstr_w
(
bufferW
));
/* zero size buffer
* the A version always null-terminates the buffer,
* the W version doesn't do it on some platforms */
/* Zero size buffer. The buffer may or may not be terminated depending
* on the Windows version and whether the A or W API is called. */
bufferA
[
0
]
=
'A'
;
ret
=
pGetDllDirectoryA
(
0
,
bufferA
);
ok
(
ret
==
length
+
1
,
"i=%d, Expected %u, got %u
\n
"
,
i
,
length
+
1
,
ret
);
ok
(
bufferA
[
0
]
==
0
,
"i=%d, Buffer not null terminated
\n
"
,
i
);
bufferW
[
0
]
=
'A'
;
ret
=
pGetDllDirectoryW
(
0
,
bufferW
);
...
...
@@ -468,7 +468,8 @@ static void testGetDllDirectory(void)
bufferA
[
0
]
=
'A'
;
ret
=
pGetDllDirectoryA
(
length
,
bufferA
);
ok
(
ret
==
length
+
1
,
"i=%d, Expected %u, got %u
\n
"
,
i
,
length
+
1
,
ret
);
ok
(
bufferA
[
0
]
==
0
,
"i=%d, Buffer not null terminated
\n
"
,
i
);
if
(
length
!=
0
)
ok
(
bufferA
[
0
]
==
0
,
"i=%d, Buffer not null terminated
\n
"
,
i
);
bufferW
[
0
]
=
'A'
;
ret
=
pGetDllDirectoryW
(
length
,
bufferW
);
...
...
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