Commit Graph

1771 Commits

Author SHA1 Message Date
André Hentschel 19d96f99c6 kernel32/tests: Don't test functions directly when reporting GetLastError().
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-02 10:52:03 +02:00
Nikolay Sivov fdf8d7176f kernel32: Support FileBasicInfo case in SetFileInformationByHandle().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-31 20:48:57 +02:00
Serge Gautherie 7e0acf14cc kernel32/tests: Test QueryFullProcessImageNameW() flags.
Signed-off-by: Serge Gautherie <winehq-git_serge_180711@gautherie.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-31 09:28:38 +02:00
Jacek Caban 4ee629a3ba kernel32: Use DebugBreakProcess in DebugActiveProcess.
Fixes attaching to a process with VS remote debugger. It expects the
first break exception address to be DbgBreakPoint.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-05 17:42:25 +02:00
Jacek Caban dc3623f57f winternl.h: Remove inline DbgBreakPoint version.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-05 17:42:19 +02:00
Jacek Caban a679f965c8 kernel32: Reimplement DebugBreakProcess on top of DbgUiIssueRemoteBreakin.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-05 17:42:16 +02:00
Jacek Caban 4f1185d21e kernel32: Terminate process in unhandled exception handler.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-04 21:14:54 +02:00
Jacek Caban 3fded30a10 server: Fix debug event order in generate_startup_debug_events.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-04 21:14:54 +02:00
Jacek Caban 6aaa2b23a3 kernel32/tests: Add more debugger tests.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-04 21:14:54 +02:00
Fabian Maurer 6525a16673 ntdll: Check the activation context before looking for the module basename.
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-24 10:50:53 +02:00
Alexandre Julliard 91bbc46c99 ntdll: Try to use the name of the PE file also when loading .so builtin.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-24 10:50:53 +02:00
Fabian Maurer aa97c30b01 kernel32/tests: Add sxs tests.
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-24 10:50:53 +02:00
Rémi Bernon d1b7e01e5e ntdll/tests: Move NtMapViewOfSection tests from kernel32/tests.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-20 22:32:40 +02:00
Rémi Bernon d6bc3830e4 kernel32/tests: Fix some NtMapViewOfSection tests expectations, and add results for w1064v1809.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-20 22:32:05 +02:00
Huw Davies 2706b94dd0 kernel32/tests: Add a test for GetTickCount().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-14 18:23:55 +02:00
Alexandre Julliard f59d05223d server: Fix the returned error code for an invalid NT header offset.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47359
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-13 20:55:35 +02:00
Rémi Bernon f39c1eee49 ntdll/tests: Move NtAllocateVirtualMemory tests that were in kernel32.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-11 18:18:39 +02:00
Rémi Bernon 4d5c874f42 kernel32/tests: Fix NtAllocateVirtualMemory tests results on w1064v1809.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-05 23:06:52 +02:00
Alexandre Julliard 0d9d816fc3 kernel32: Fix handling of LOAD_WITH_ALTERED_SEARCH_PATH when other search flags are specified.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46809
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-05 21:40:55 +02:00
Sven Baars c340890146 kernel32/tests: Open and close the right file handle (Coverity).
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-27 14:39:14 +02:00
Michael Stefaniuc 260e66ee8b kernel32/tests: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-24 21:56:07 +02:00
Piotr Caban 4a6e69ad3a libwine: Ignore 0 weights as described in Unicode collation algorithm.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-22 19:16:05 +02:00
Piotr Caban 40a1a9e9a2 libwine: Decompose characters before comparing in wine_compare_string.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-22 19:16:05 +02:00
Piotr Caban 344057ef34 kernel32: Add more CompareStringW tests.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-20 22:12:30 +02:00
Hans Leidekker 4872747b27 ntdll: Fix breakpoint exception address on 64-bit Linux.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-15 22:04:39 +02:00
Huw Davies 71dc2514c3 kernel32: Forward GetSystemTimeAsFileTime() to NtQuerySystemTime().
This relies on FILETIME and LARGE_INTEGER having the same layout.

On an i7-8700 CPU @ 3.20GHz with HZ=1000 it cuts the call cost from
~18ns to ~12ns.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-15 19:23:48 +02:00
Francois Gouget 6a20bb2daf kernel32/tests: Use ok_() so the TestBot can correctly detect the line.
Otherwise the messages appear to change every time the line count
changes, which making old errors new again.

Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-09 08:20:38 -05:00
Erich E. Hoover 690a9003b3 kernel32: Add SearchPath test demonstrating the priority of the working directory.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-01 11:28:58 +02:00
Nikolay Sivov fe0f8a150f ntdll: Initialize critical section debug info with correct pointer value.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-30 20:08:04 +02:00
Jactry Zeng 642919382f kernel32/tests: Avoid a crash on WinXP and Win2K.
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-29 09:37:09 +02:00
Detlef Riekenberg f5636dea60 kernel32/pipe: Avoid a crash in a test.
Signed-off-by: Detlef Riekenberg <wine.dev@web.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-26 21:07:58 +02:00
Nikolay Sivov bf174815ba kernel32/tests: Add a test for critical section DebugInfo initial value.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-25 17:28:10 +02:00
Alexandre Julliard d4ef782db7 makefiles: Build all tests with msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-24 12:10:51 +02:00
Fabian Maurer 28e6fe3782 kernel32: Stub FindFirstStreamW/FindNextStreamW.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46934
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-22 19:48:28 +02:00
Zhiyi Zhang 04ccd995b1 kernel32: Open replaced file without GENERIC_WRITE in ReplaceFileW().
As MSDN says, the replaced file is opened with the GENERIC_READ, DELETE,
and SYNCHRONIZE access rights. If GENERIC_WRITE is added, then it will
fail with previous file opens without FILE_SHARE_WRITE.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=33845
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-11 19:29:42 +02:00
Zhiyi Zhang 57e8e2d59c kernel32/tests: Add more tests for ReplaceFileA().
Also remove residue test files and remove no effect tests.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-11 19:29:42 +02:00
Zhiyi Zhang 304fb43aaa kernel32/tests: Test readonly file access.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-11 19:29:42 +02:00
Detlef Riekenberg c26a3a0116 kernel32/tests: Fix FormatMessage test failures on recent win10 (ERROR_NO_WORK_DONE).
FormatMessageA/W sets last error to ERROR_NO_WORK_DONE when nothing
was done, after Sep 2015, but before or with Win10 v1709.

Signed-off-by: Detlef Riekenberg <wine.dev@web.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-05 22:16:31 +02:00
Alexandre Julliard 35d202fc09 kernel32: Validate handle before freeing a LOAD_LIBRARY_AS_DATAFILE module.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46019
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-05 22:16:30 +02:00
Claudio Fontana be678a52e1 kernel32: Allow empty profile section and key name strings.
Consider "" a normal section, and fix calculation for zero
length section name string and key name string.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=8036
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=18099
Signed-off-by: Claudio Fontana <claudio.fontana@gmail.com>
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-28 19:12:28 +01:00
Jon Doron be25d225ad kernel32: Make GetEnvironmentStringsW returns a copy of the environment.
There are certain applications which try to traverse the environement
being returned, but this is problematic since they cannot acquire the
PEB Lock (i.e cl.exe on Visual Studio 14.15) .

Signed-off-by: Jon Doron <arilou@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-20 08:57:33 +01:00
Francois Gouget 193df74fde kernel32/tests: A spelling fix in a win_skip() message.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-18 10:11:27 +01:00
Jacek Caban c8b50c98a3 server: Wake waiters when new pipe server instance is created.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-11 19:29:36 +01:00
Jacek Caban be3ae0131e server: Connect pipe servers in order that they enter listening state.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-11 19:29:36 +01:00
Piotr Caban 2ee8554a0a kernel32/tests: Show that PAGE_WRITECOPY permission changes only on modified pages.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-05 21:22:15 +01:00
Brendan McGrath 5d577ae9ea libwine: get_sortkey to return consistent length with and without dstlen.
Signed-off-by: Brendan McGrath <brendan@redmandi.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-05 20:42:41 +01:00
Brendan McGrath 7c1e0ef736 kernel32/tests: Length of sort keys must be equal with and without dest.
Signed-off-by: Brendan McGrath <brendan@redmandi.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-05 20:42:18 +01:00
Brendan McGrath 87917df887 kernel32: Allow double quote style escape in argv.
Two quotes together (within outer quotes) represents a single
quote (with the first quote acting as an escape character)

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46721
Signed-off-by: Brendan McGrath <brendan@redmandi.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-04 13:13:29 +01:00
Alexandre Julliard c525d7ab98 kernel32/tests: Use GetTempFileName() instead of hardcoding directory names.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-28 21:37:30 +01:00
Huw Davies e4ca5dbec0 server: Add new pipe servers to the end of the servers list.
This ensures instances created first will be connected to first.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=41670
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-26 20:48:37 +01:00