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
e2cbe25b
Commit
e2cbe25b
authored
Aug 09, 2011
by
Austin English
Committed by
Alexandre Julliard
Aug 22, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Remove win9x hacks.
parent
2d8ad31e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
53 deletions
+17
-53
atom.c
dlls/kernel32/tests/atom.c
+10
-29
debugger.c
dlls/kernel32/tests/debugger.c
+3
-7
sync.c
dlls/kernel32/tests/sync.c
+4
-17
No files found.
dlls/kernel32/tests/atom.c
View file @
e2cbe25b
...
@@ -192,26 +192,16 @@ static void test_get_atom_name(void)
...
@@ -192,26 +192,16 @@ static void test_get_atom_name(void)
else
else
ok
(
!
len
,
"bad length %d
\n
"
,
len
);
ok
(
!
len
,
"bad length %d
\n
"
,
len
);
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
len
=
GlobalGetAtomNameA
(
(
ATOM
)
i
,
buf
,
2
);
len
=
GlobalGetAtomNameA
(
(
ATOM
)
i
,
buf
,
2
);
if
(
!
len
)
/* the NT way */
ok
(
!
len
,
"bad length %d
\n
"
,
len
);
{
ok
(
GetLastError
()
==
ERROR_MORE_DATA
||
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
ok
(
GetLastError
()
==
(
i
?
ERROR_MORE_DATA
:
ERROR_INVALID_PARAMETER
)
||
"wrong error conditions %u for %u
\n
"
,
GetLastError
(),
i
);
GetLastError
()
==
0xdeadbeef
,
/* the Win 9x way */
"wrong error conditions %u for %u
\n
"
,
GetLastError
(),
i
);
}
else
/* the Win 9x way */
{
ok
(
GetLastError
()
==
0xdeadbeef
,
"wrong error conditions %u for %u
\n
"
,
GetLastError
(),
i
);
}
}
}
memset
(
buf
,
'.'
,
sizeof
(
buf
)
);
memset
(
buf
,
'.'
,
sizeof
(
buf
)
);
len
=
GlobalGetAtomNameA
(
atom
,
buf
,
6
);
len
=
GlobalGetAtomNameA
(
atom
,
buf
,
6
);
ok
(
len
==
0
||
ok
(
len
==
0
,
"bad length %d
\n
"
,
len
);
len
==
5
,
/* win9x */
"bad length %d
\n
"
,
len
);
ok
(
!
memcmp
(
buf
,
"fooba
\0
...."
,
10
),
"bad buffer contents
\n
"
);
ok
(
!
memcmp
(
buf
,
"fooba
\0
...."
,
10
),
"bad buffer contents
\n
"
);
if
(
unicode_OS
)
if
(
unicode_OS
)
{
{
...
@@ -238,14 +228,8 @@ static void test_get_atom_name(void)
...
@@ -238,14 +228,8 @@ static void test_get_atom_name(void)
memset
(
out
,
'.'
,
sizeof
(
out
));
memset
(
out
,
'.'
,
sizeof
(
out
));
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
len
=
GlobalGetAtomNameA
(
atom
,
out
,
10
);
len
=
GlobalGetAtomNameA
(
atom
,
out
,
10
);
if
(
!
len
)
/* the NT way */
ok
(
!
len
,
"bad length %d
\n
"
,
len
);
{
ok
(
GetLastError
()
==
ERROR_MORE_DATA
,
"wrong error code (%u instead of %u)
\n
"
,
GetLastError
(),
ERROR_MORE_DATA
);
ok
(
GetLastError
()
==
ERROR_MORE_DATA
,
"wrong error code (%u instead of %u)
\n
"
,
GetLastError
(),
ERROR_MORE_DATA
);
}
else
/* the Win9x way */
{
ok
(
GetLastError
()
==
0xdeadbeef
,
"wrong error code (%u instead of %u)
\n
"
,
GetLastError
(),
0xdeadbeef
);
}
for
(
i
=
0
;
i
<
9
;
i
++
)
for
(
i
=
0
;
i
<
9
;
i
++
)
{
{
ok
(
out
[
i
]
==
"abcdefghij"
[
i
%
10
],
"wrong string at %i (%c instead of %c)
\n
"
,
i
,
out
[
i
],
"abcdefghij"
[
i
%
10
]);
ok
(
out
[
i
]
==
"abcdefghij"
[
i
%
10
],
"wrong string at %i (%c instead of %c)
\n
"
,
i
,
out
[
i
],
"abcdefghij"
[
i
%
10
]);
...
@@ -487,13 +471,11 @@ static void test_local_get_atom_name(void)
...
@@ -487,13 +471,11 @@ static void test_local_get_atom_name(void)
/* ERROR_MORE_DATA is on nt3.51 sp5 */
/* ERROR_MORE_DATA is on nt3.51 sp5 */
if
(
i
)
if
(
i
)
ok
(
GetLastError
()
==
ERROR_INSUFFICIENT_BUFFER
||
ok
(
GetLastError
()
==
ERROR_INSUFFICIENT_BUFFER
||
GetLastError
()
==
ERROR_MORE_DATA
||
GetLastError
()
==
ERROR_MORE_DATA
,
GetLastError
()
==
0xdeadbeef
,
/* the Win 9x way */
"wrong error conditions %u for %u
\n
"
,
GetLastError
(),
i
);
"wrong error conditions %u for %u
\n
"
,
GetLastError
(),
i
);
else
else
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
||
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
||
GetLastError
()
==
ERROR_MORE_DATA
||
GetLastError
()
==
ERROR_MORE_DATA
,
GetLastError
()
==
0xdeadbeef
,
/* the Win 9x way */
"wrong error conditions %u for %u
\n
"
,
GetLastError
(),
i
);
"wrong error conditions %u for %u
\n
"
,
GetLastError
(),
i
);
}
}
/* test string limits & overflow */
/* test string limits & overflow */
...
@@ -522,8 +504,7 @@ static void test_local_get_atom_name(void)
...
@@ -522,8 +504,7 @@ static void test_local_get_atom_name(void)
/* ERROR_MORE_DATA is on nt3.51 sp5 */
/* ERROR_MORE_DATA is on nt3.51 sp5 */
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
||
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
||
GetLastError
()
==
ERROR_MORE_DATA
||
GetLastError
()
==
ERROR_MORE_DATA
,
GetLastError
()
==
0xdeadbeef
,
/* the Win 9x way */
"wrong error code (%u)
\n
"
,
GetLastError
());
"wrong error code (%u)
\n
"
,
GetLastError
());
if
(
unicode_OS
)
if
(
unicode_OS
)
...
...
dlls/kernel32/tests/debugger.c
View file @
e2cbe25b
...
@@ -337,14 +337,12 @@ static void crash_and_debug(HKEY hkey, const char* argv0, const char* dbgtasks)
...
@@ -337,14 +337,12 @@ static void crash_and_debug(HKEY hkey, const char* argv0, const char* dbgtasks)
*/
*/
ok
(
exit_code
==
STATUS_DEBUGGER_INACTIVE
||
ok
(
exit_code
==
STATUS_DEBUGGER_INACTIVE
||
broken
(
exit_code
==
STATUS_ACCESS_VIOLATION
)
||
/* Intermittent Vista+ */
broken
(
exit_code
==
STATUS_ACCESS_VIOLATION
)
||
/* Intermittent Vista+ */
broken
(
exit_code
==
0xffffffff
)
||
/* Win9x */
broken
(
exit_code
==
WAIT_ABANDONED
),
/* NT4, W2K */
broken
(
exit_code
==
WAIT_ABANDONED
),
/* NT4, W2K */
"wrong exit code : %08x
\n
"
,
exit_code
);
"wrong exit code : %08x
\n
"
,
exit_code
);
}
}
else
else
ok
(
exit_code
==
STATUS_ACCESS_VIOLATION
||
ok
(
exit_code
==
STATUS_ACCESS_VIOLATION
||
broken
(
exit_code
==
WAIT_ABANDONED
)
||
/* NT4, W2K, W2K3 */
broken
(
exit_code
==
WAIT_ABANDONED
),
/* NT4, W2K, W2K3 */
broken
(
exit_code
==
0xffffffff
),
/* Win9x, WinME */
"wrong exit code : %08x
\n
"
,
exit_code
);
"wrong exit code : %08x
\n
"
,
exit_code
);
CloseHandle
(
info
.
hProcess
);
CloseHandle
(
info
.
hProcess
);
...
@@ -478,10 +476,8 @@ static void test_ExitCode(void)
...
@@ -478,10 +476,8 @@ static void test_ExitCode(void)
crash_and_debug
(
hkey
,
test_exe
,
"dbg,none"
);
crash_and_debug
(
hkey
,
test_exe
,
"dbg,none"
);
else
else
skip
(
"
\"
none
\"
debugger test needs user interaction
\n
"
);
skip
(
"
\"
none
\"
debugger test needs user interaction
\n
"
);
if
(
disposition
==
REG_CREATED_NEW_KEY
)
ok
(
disposition
==
REG_OPENED_EXISTING_KEY
,
"expected REG_OPENED_EXISTING_KEY, got %d
\n
"
,
disposition
);
win_skip
(
"'dbg,event,order' test doesn't finish on Win9x/WinMe
\n
"
);
crash_and_debug
(
hkey
,
test_exe
,
"dbg,event,order"
);
else
crash_and_debug
(
hkey
,
test_exe
,
"dbg,event,order"
);
crash_and_debug
(
hkey
,
test_exe
,
"dbg,attach,event,code2"
);
crash_and_debug
(
hkey
,
test_exe
,
"dbg,attach,event,code2"
);
if
(
pDebugSetProcessKillOnExit
)
if
(
pDebugSetProcessKillOnExit
)
crash_and_debug
(
hkey
,
test_exe
,
"dbg,attach,event,nokill"
);
crash_and_debug
(
hkey
,
test_exe
,
"dbg,attach,event,nokill"
);
...
...
dlls/kernel32/tests/sync.c
View file @
e2cbe25b
...
@@ -149,16 +149,12 @@ static void test_mutex(void)
...
@@ -149,16 +149,12 @@ static void test_mutex(void)
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
hOpened
=
OpenMutex
(
READ_CONTROL
,
FALSE
,
"WINETESTMUTEX"
);
hOpened
=
OpenMutex
(
READ_CONTROL
,
FALSE
,
"WINETESTMUTEX"
);
ok
(
!
hOpened
,
"OpenMutex succeeded
\n
"
);
ok
(
!
hOpened
,
"OpenMutex succeeded
\n
"
);
ok
(
GetLastError
()
==
ERROR_FILE_NOT_FOUND
||
ok
(
GetLastError
()
==
ERROR_FILE_NOT_FOUND
,
"wrong error %u
\n
"
,
GetLastError
());
GetLastError
()
==
ERROR_INVALID_NAME
,
/* win9x */
"wrong error %u
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
hOpened
=
OpenMutex
(
READ_CONTROL
,
FALSE
,
"winetestmutex"
);
hOpened
=
OpenMutex
(
READ_CONTROL
,
FALSE
,
"winetestmutex"
);
ok
(
!
hOpened
,
"OpenMutex succeeded
\n
"
);
ok
(
!
hOpened
,
"OpenMutex succeeded
\n
"
);
ok
(
GetLastError
()
==
ERROR_FILE_NOT_FOUND
||
ok
(
GetLastError
()
==
ERROR_FILE_NOT_FOUND
,
"wrong error %u
\n
"
,
GetLastError
());
GetLastError
()
==
ERROR_INVALID_NAME
,
/* win9x */
"wrong error %u
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
hOpened
=
CreateMutex
(
NULL
,
FALSE
,
"WineTestMutex"
);
hOpened
=
CreateMutex
(
NULL
,
FALSE
,
"WineTestMutex"
);
...
@@ -328,9 +324,7 @@ static void test_event(void)
...
@@ -328,9 +324,7 @@ static void test_event(void)
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
handle2
=
OpenEventA
(
EVENT_ALL_ACCESS
,
FALSE
,
__FILE__
": TEST EVENT"
);
handle2
=
OpenEventA
(
EVENT_ALL_ACCESS
,
FALSE
,
__FILE__
": TEST EVENT"
);
ok
(
!
handle2
,
"OpenEvent succeeded
\n
"
);
ok
(
!
handle2
,
"OpenEvent succeeded
\n
"
);
ok
(
GetLastError
()
==
ERROR_FILE_NOT_FOUND
||
ok
(
GetLastError
()
==
ERROR_FILE_NOT_FOUND
,
"wrong error %u
\n
"
,
GetLastError
());
GetLastError
()
==
ERROR_INVALID_NAME
,
/* win9x */
"wrong error %u
\n
"
,
GetLastError
());
CloseHandle
(
handle
);
CloseHandle
(
handle
);
}
}
...
@@ -366,9 +360,7 @@ static void test_semaphore(void)
...
@@ -366,9 +360,7 @@ static void test_semaphore(void)
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
handle2
=
OpenSemaphoreA
(
SEMAPHORE_ALL_ACCESS
,
FALSE
,
__FILE__
": TEST SEMAPHORE"
);
handle2
=
OpenSemaphoreA
(
SEMAPHORE_ALL_ACCESS
,
FALSE
,
__FILE__
": TEST SEMAPHORE"
);
ok
(
!
handle2
,
"OpenSemaphore succeeded
\n
"
);
ok
(
!
handle2
,
"OpenSemaphore succeeded
\n
"
);
ok
(
GetLastError
()
==
ERROR_FILE_NOT_FOUND
||
ok
(
GetLastError
()
==
ERROR_FILE_NOT_FOUND
,
"wrong error %u
\n
"
,
GetLastError
());
GetLastError
()
==
ERROR_INVALID_NAME
,
/* win9x */
"wrong error %u
\n
"
,
GetLastError
());
CloseHandle
(
handle
);
CloseHandle
(
handle
);
}
}
...
@@ -938,11 +930,6 @@ static void test_WaitForSingleObject(void)
...
@@ -938,11 +930,6 @@ static void test_WaitForSingleObject(void)
DWORD
ret
;
DWORD
ret
;
signaled
=
CreateEventW
(
NULL
,
TRUE
,
TRUE
,
NULL
);
signaled
=
CreateEventW
(
NULL
,
TRUE
,
TRUE
,
NULL
);
if
(
signaled
==
0
&&
GetLastError
()
==
ERROR_CALL_NOT_IMPLEMENTED
)
{
win_skip
(
"Handles work differently on win9x
\n
"
);
return
;
}
nonsignaled
=
CreateEventW
(
NULL
,
TRUE
,
FALSE
,
NULL
);
nonsignaled
=
CreateEventW
(
NULL
,
TRUE
,
FALSE
,
NULL
);
invalid
=
(
HANDLE
)
0xdeadbee0
;
invalid
=
(
HANDLE
)
0xdeadbee0
;
...
...
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