Commit Graph

2228 Commits

Author SHA1 Message Date
Zebediah Figura 8acf35b154 kernel32/tests: Relax a timing test.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-27 23:28:16 +02:00
Jacek Caban 716bdfcbfa kernel32/tests: Add more console output tests.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-23 22:30:49 +02:00
Jacek Caban e613d81d81 kernelbase: Use NtCreateFile in CreateConsoleScreenBuffer.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-21 15:18:44 +02:00
Zebediah Figura 4ea4289253 kernel32/tests: Add tests for profile registry mapping.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-15 22:55:44 +02:00
Jacek Caban 48a23dbd43 kernelbase: Use IOCTL_CONDRV_GET_MODE in GetConsoleMode.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-13 21:22:13 +02:00
Zebediah Figura 39f59eb020 kernel32/tests: Avoid testing that WaitCommEvent() doesn't return immediately.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-10 13:19:27 +02:00
Jacek Caban eeb1f2b0f0 kernel32/tests: Add more invalid handle tests.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-09 19:41:50 +02:00
Myah Caron f2a804b9ea msvcrt: Don't reset MXCSR status in __control87_2 if control information is not changed.
Signed-off-by: Myah Caron <qsniyg@protonmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-07 19:24:27 +02:00
Zebediah Figura 7ee7953c54 kernel32/tests: Call NtQuerySystemInformation(SystemProcessInformation) until it returns STATUS_SUCCESS.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-07 13:10:13 +02:00
Rémi Bernon ceeb11d2a6 kernel32: Catch process creation breakpoint exceptions.
Metal Gear Solid V: Ground Zeroes attaches itself and continues this
specific breakpoint with DBG_EXCEPTION_NOT_HANDLED. It crashes the
child process and the game terminates.

It is correct for old Windows versions, but more recent versions are
apparently catching exceptions here, and the process should continue.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=44127
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-03 11:58:05 +02:00
Jacek Caban e43f51640a kernel32: Return standard input handle in GetConsoleInputWaitHandle.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-01 20:33:07 +02:00
Alexandre Julliard 8a169390c9 ntdll: Build with msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-30 12:25:08 +02:00
Alexandre Julliard 64731a8e9f ntdll: Fix a few more thread information access rights.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-30 11:05:53 +02:00
Dmitry Timoshkov c70a303cd4 kernel32: Implement IsWow64Process2.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-30 11:05:53 +02:00
Dmitry Timoshkov 51ff9aa7cc kernel32/tests: Fix compilation with PSDK.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-30 09:15:46 +02:00
Changping Yu 59ce4e3eb8 kernel32: Adjust thread creation insertion order.
Signed-off-by: Changping Yu <dead.ash@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-29 21:07:43 +02:00
Changping Yu ab7485bb4b kernel32/tests: Add test for thread enumeration order in toolhelp.
Signed-off-by: Changping Yu <dead.ash@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-29 21:07:38 +02:00
Jacek Caban 0556d9e6f1 kernelbase: Use NtCreateFile for console handles in CreateFileW.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-26 21:52:21 +02:00
Jacek Caban 9bdfb1a29a kernel32/tests: Add more tests for opening console.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-26 21:50:56 +02:00
Zebediah Figura 22a6c60e18 kernel32/tests: Add tests for profile struct functions.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-22 19:22:03 +02:00
André Hentschel d96fe8e1f7 kernel32/tests: Remove support for PPC32.
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-17 16:46:14 +02:00
Nikolay Sivov 72d055854b ntdll: Use single field for misc flags in ComClass redirection section.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-11 21:03:34 +02:00
Derek Lesho d8d6a6b2e6 server: Partially implement JobObjectBasicAccountingInformation.
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-09 21:23:33 +02:00
Brendan Shanks 7ac949a101 kernel32/tests: Add RegisterWaitForSingleObject() WT_EXECUTEINWAITTHREAD tests.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47843
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-09 12:12:35 +02:00
Brendan Shanks 08abbf091b kernel32/tests: Fix handle leak.
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-09 12:12:30 +02:00
Alexandre Julliard 20a9ec6c4f kernel32/tests: Avoid some more compiler warning for HeapAlloc() invalid parameter tests.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-08 14:59:30 +02:00
Alex Henrie e851e747bb kernel32/tests: Fix GetNLSVersion test failure on Windows Server 2003.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-04 11:59:26 +02:00
Jacek Caban 0a3a2556c1 kernel32/tests: Avoid using abs on ULONGLONG values.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-28 20:10:53 +02:00
Jacek Caban 90f81e6198 kernel32/tests: Remove workaround for NT4.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-28 20:10:53 +02:00
Alexandre Julliard 6bed2b427b kernel32: Move the *PreferredUILanguages functions to kernelbase and ntdll.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-22 14:31:55 +02:00
Vladimir Panteleev c4ef987429 kernelbase: Fix GetEnvironmentVariableW return for empty variables.
Do the same thing as Vista and up.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48471
Signed-off-by: Vladimir Panteleev <git@vladimir.panteleev.md>
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-15 14:08:51 +02:00
Vladimir Panteleev 4c06599c1f kernelbase: Don't return ERROR_INSUFFICIENT_BUFFER from GetEnvironmentVariableW.
Windows doesn't do this (except XP, and then only for empty variables,
where it returns ERROR_MORE_DATA).

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48471
Signed-off-by: Vladimir Panteleev <git@vladimir.panteleev.md>
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-15 14:08:51 +02:00
Vladimir Panteleev 7ad5e1bc8a kernelbase: Preserve last error when GetEnvironmentVariableA succeeds.
Avoid clobbering last error with NO_ERROR when GetEnvironmentVariableA
succeeds, matching the behavior of GetEnvironmentVariableW and
Windows.

Instead of naively saving and restoring the last error, call
RtlQueryEnvironmentVariable_U directly to avoid unnecessarily setting
it in the first place.

Signed-off-by: Vladimir Panteleev <git@vladimir.panteleev.md>
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-15 14:08:51 +02:00
Dmitry Timoshkov 1a7dd7cdbe kernel32/tests: Add a PE test image that resembles format of some of 8k demos.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-15 11:42:28 +02:00
Alexandre Julliard 8a1656bdf0 kernel32/tests: Add some tests for FormatMessageA/W buffer sizes.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-13 22:05:31 +02:00
Alexandre Julliard 7b01281745 kernelbase: Reimplement FormatMessageA/W using RtlFormatMessage().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-13 22:05:31 +02:00
Alexandre Julliard f00b88eabd kernel32/tests: Fix some incorrect FormatMessage() tests.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-07 19:59:25 +02:00
Alexandre Julliard a946e7fbbe kernel32/tests: Use wide character string literals in FormatMessage() tests.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-07 12:46:48 +02:00
Zebediah Figura 877bf2a7a0 kernelbase: Implement SetEnvironmentStrings().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48308
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-07 11:30:15 +02:00
Zebediah Figura 6849be3ffa kernel32/tests: Fix failures in test_GetThreadSelectorEntry() on 32-bit machines.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-05 10:52:02 +02:00
Zebediah Figura 42a18cf5fa kernel32/tests: Account for unsupported NLSVERSIONINFOEX.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-05 10:52:00 +02:00
Jacek Caban c3fac6e36c server: Fix setting context flags in get_thread_context.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49011
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-27 11:30:30 +02:00
Zebediah Figura ea753c384e include: Rename the other In*OrderModuleList fields to In*OrderLinks for consistency.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-24 10:13:49 +02:00
Zebediah Figura 4b3e820e07 include: Rename InMemoryOrderModuleList to InMemoryOrderLinks.
To match Microsoft's public definition.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-24 10:13:43 +02:00
Zebediah Figura feeb1c7c24 include: Rename LDR_MODULE to LDR_DATA_TABLE_ENTRY.
This name is used in Microsoft's public winternl.h.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-24 10:13:39 +02:00
Paul Gofman a789548502 kernel32/tests: Mark ERROR_HANDLE_EOF result as broken for async file read.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-23 12:55:40 +02:00
Jacek Caban bffd57d1d2 kernel32/tests: Use DECLSPEC_ALIGN in MSVC compatible way.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-20 20:55:12 +02:00
Jacek Caban 25ed1d9e82 kernel32/tests: Avoid arithmetic on pointer to stack variable.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-20 17:19:11 +02:00
Zebediah Figura a6e70c6074 ntdll: Handle unaligned SRW locks when using futexes.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-14 11:23:04 +02:00
Zebediah Figura aceff21022 ntdll: Handle unaligned condition variables when using futexes.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48389
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-14 11:22:59 +02:00
Serge Gautherie 930ff8786f winapi_test: Add DYNAMIC_TIME_ZONE_INFORMATION to tests.dat.
Signed-off-by: Serge Gautherie <winehq-git_serge_180711@gautherie.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-13 21:33:30 +02:00
Serge Gautherie 867a0bd6cd winapi_test: Tests.dat needs timezoneapi.h.
Signed-off-by: Serge Gautherie <winehq-git_serge_180711@gautherie.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-13 21:33:30 +02:00
Piotr Caban 2df67d56f3 kernel32/tests: Test timeout behaviour on system clock change.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-09 21:04:04 +02:00
Zebediah Figura 928d1e6447 kernel32: Implement GetVolumeInformationByHandleW().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-09 09:12:03 +02:00
Andrew Eikum 2cd776fffd kernel32/tests: Actually run OpenFile tests.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-06 21:21:42 +02:00
Alexandre Julliard 6169cacd0d ntdll: Move support for getting LDT entries to the platform-specific files.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-01 12:33:29 +02:00
Zebediah Figura bae4776c57 kernel32: Don't fail ReplaceFile() if unable to delete a generated backup.
Windows will just leave the file if unable to delete it.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-30 12:09:09 +02:00
Zebediah Figura faebd0ce14 kernel32/tests: Add more tests for deleting and replacing open files.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-30 12:09:09 +02:00
Rémi Bernon e2a1f00a38 server: Implement DBG_REPLY_LATER handling.
This flag causes the debug event to be replayed after the target thread
continues. It can be used, after suspending the thread, to resume other
threads and later return to the breaking.

This will help implementing gdb continue/step packets correctly.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-27 21:16:13 +01:00
Rémi Bernon a96393fe26 kernel32/tests: Add tests for ContinueDebugEvent with DBG_REPLY_LATER.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-25 19:25:25 +01:00
Jacek Caban 1a05b7da63 ntdll: Support device paths in LdrGetDllPath.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48698
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-25 15:26:33 +01:00
Francois Gouget 405fd5927a kernel32/tests: Fix the grammar and formatting of a process comment.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-24 20:31:18 +01:00
Francois Gouget 7e1b131a85 kernel32/tests: Add a couple of process helper functions.
wait_and_close_child_process() simplifies waiting for the child process
and closing its handles. And because it uses wait_child_process() this
ensures that any error happening in the child process is detected.
reload_child_dump() wraps a cryptic WritePrivateProfileStringA() call
and avoids having to add a comment every time.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-24 20:31:18 +01:00
Zebediah Figura 9b80443a8f kernel32: Reimplement GetVolumePathName() using NtQueryInformationFile(FileAttributeTagInformation).
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-23 12:14:07 +01:00
Zebediah Figura 54bda2991e kernel32/tests: Fix some test failures when run from a mounted folder.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-23 12:13:41 +01:00
Francois Gouget f08abe0811 kernel32/tests: Remove an unneeded sprintf() in the process tests.
The buffer content is not used before being overwritten again.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-23 11:36:40 +01:00
Francois Gouget 9d38c4864c kernel32/tests: Fix a race condition in test_QueryInformationJobObject().
The process must still be running for AssignProcessToJobObject() to
succeed.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-23 11:36:34 +01:00
Serge Gautherie be3cda6ec0 tests: Remove now useless forced _WIN32_WINNT defines.
Signed-off-by: Serge Gautherie <winehq-git_serge_180711@gautherie.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-23 11:30:25 +01:00
Francois Gouget dd4fad93e4 kernel32/test: Fix the semaphore handling in test_WaitForJobObject().
Don't include 'sync ' in the semaphore name because it will end up as
a separate argument in the child process, causing it to not find the
semaphore.  Switch the child to OpenSemaphoreA() to reduce the risk of
accidentally create a new semaphore instead of opening the parent's
one.  Use wait_child_process() instead of a raw
WaitForSingleObject(). The timeout is longer but the process is
expected to exit immediately anyway and this allows proper handling of
child failures (such as if there is a bug with the semaphore
handling).

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-20 19:33:11 +01:00
Alexandre Julliard 84cca2baae kernelbase: Implement IsValidNLSVersion().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-20 14:49:36 +01:00
Alexandre Julliard 86522976c9 kernelbase: Implement GetNLSVersion/GetNLSVersionEx().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-20 14:43:55 +01:00
Zebediah Figura 7c6222838c kernel32/tests: Remove a test for Unix-style paths.
Wine intentionally treats these specially, so there is no point in testing them.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-19 20:36:07 +01:00
Zebediah Figura 5885c70b18 kernel32/tests: Add some tests for mounted folders.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-19 20:36:04 +01:00
Gabriel Ivăncescu 543209eb23 kernel32: Implement compatibility mode for VerifyVersionInfo.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-19 13:31:56 +01:00
Gabriel Ivăncescu 6719bf2e03 kernelbase: Implement compatibility mode for GetVersionEx.
Since Windows 8.1, these functions have been deprecated and run in a sort
of compatibility mode, reporting Windows 8 unless the application supplies a
manifest that specifies compatibility with newer Windows versions explicitly
(by listing their GUIDs).

Some applications have bad non-forward-compatible checks based
on GetVersionEx, and depend on this behavior (they do not supply a
manifest). Currently, they break on Wine if we use a Windows 10 prefix for
example, since we always report the real version. One example is the game
Rock of Ages.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-19 13:28:58 +01:00
Gabriel Ivăncescu caff74f369 include/winnt: Add more ACTCTX_COMPATIBILITY_ELEMENT_TYPE definitions and fix typo.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-19 13:18:02 +01:00
Alexandre Julliard b780e5f5b1 kernelbase: Use linguistic case table for LCMAP_LINGUISTIC_CASING.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-18 12:02:53 +01:00
Francois Gouget a909baeb4e tests: Report all errors when failing to wait for a child process.
Report the line number where the test failed to wait for the child so
one can identify which child process did not behave as expected.
Also wait_child_process() is meant for the general case so report
all non-crash error cases as test failures so they are accounted for.
Omit the "winetest_" prefix to match the other Wine test functions and
so the underlying winetest_wait_child_process() function can be wrapped
with the usual line-capturing macros.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48651
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-17 10:51:44 +01:00
Francois Gouget 435b41ec7c kernel32/tests: Clean up the argv[0] tests and improve coverage.
The argv[0] tests mostly care about the value of argvA0 in the child
process. So remove most of the extra arguments and use the remaining
ones to check other aspects.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-16 21:42:05 +01:00
Serge Gautherie aa384d3642 tools: Remove 0x0501 API versions forced by winapi_test.
Signed-off-by: Serge Gautherie <winehq-git_serge_180711@gautherie.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-13 20:10:44 +01:00
Zebediah Figura 8ca5d4af90 kernel32: Reimplement MoveFileWithProgress() on top of NtSetInformationFile(FileRenameInformation).
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-12 21:18:18 +01:00
Francois Gouget 496100b9a7 kernel32/tests: Remove a 100 ms sleep in 'process exit' children.
Such a short pause cannot serve any purpose and this shaves off 1 to 2
seconds of run time.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-12 10:11:44 +01:00
Francois Gouget 5a66e3e0d8 kernel32/tests: Fix a race condition in test_WaitForJobObject().
Synchronize with the child process to ensure it does not exit before
being added to the test job.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48642
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-11 15:58:19 +01:00
Zebediah Figura 2eacc45de3 kernel32/tests: Add more tests for MoveFile[Ex]().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-09 12:10:52 +01:00
Aaro Altonen b21881f53c kernelbase: Implement SetConsoleScreenBufferInfoEx().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47288
Signed-off-by: Aaro Altonen <a.altonen@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-05 19:58:42 +01:00
Aaro Altonen 723506ef48 kernel32/tests: Add tests for SetConsoleScreenBufferInfoEx().
Signed-off-by: Aaro Altonen <a.altonen@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-05 19:57:56 +01:00
Zebediah Figura ee31a622b8 kernel32/tests: Add some tests for hard links.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-04 09:53:00 +01:00
Francois Gouget e4c15b5bbd kernel32/tests: Fix test_Toolhelp()'s nested process lookup.
On Windows, processes are not reassigned to pid 1 when their parent
dies. This means many processes could have the same ppid despite being
started by unrelated processes. It also means test_Toolhelp() cannot
reliably look up the nested process by its ppid.
So look up for the nested process by its pid and only then check its
ppid, executable file, etc.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48664
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-03 14:20:26 +01:00
Alexandre Julliard ab9fe967f1 ntdll: Reimplement IdnToUnicode() using the normalization table and the ntdll helpers.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-03 13:20:24 +01:00
Alexandre Julliard 01237d0896 ntdll: Reimplement IdnToAscii() using the normalization table and the ntdll helpers.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-03 13:20:24 +01:00
Alexandre Julliard cd13557f48 ntdll: Reimplement IdnToNameprepUnicode() using the NLS normalization table.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-03 13:20:24 +01:00
Dmitry Timoshkov 081737379a kernel32: Get[*]PreferredUILanguages should return buffer size when setting ERROR_INSUFFICIENT_BUFFER.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-02 13:05:32 +01:00
Dmitry Timoshkov cac0465163 kernel32/tests: Add more tests for Get[*]PreferredUILanguages APIs.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-02 13:05:29 +01:00
Dmitry Timoshkov 9870f9325a kernel32/tests: Fix initialization of parameters in Get[*]PreferredUILanguages tests.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-02 13:05:24 +01:00
Dmitry Timoshkov 7c461d6302 kernel32/tests: Fix locale.c compilation with Visual Studio 14.0.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-02 13:05:13 +01:00
Serge Gautherie a59d6387b6 include: COMMCONFIG.wcProviderData is WCHAR, not DWORD.
Signed-off-by: Serge Gautherie <winehq-git_serge_180711@gautherie.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-02 13:04:17 +01:00
Alexandre Julliard 4aebd6a95f ntdll: Allow final null in RtlNormalizeString() even if 0 is an invalid character.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-28 16:39:01 +01:00
Alexandre Julliard 5d270e592d kernel32/tests: Add some tests for Idn functions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-28 16:39:01 +01:00
Zebediah Figura 3641983714 kernel32: Reimplement DefineDosDevice() on top of NT symbolic links.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-27 23:34:51 +01:00
Zebediah Figura 4ab43e28d0 kernel32/tests: Add more tests for DefineDosDevice().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-27 23:34:51 +01:00
Francois Gouget 8adca32727 kernel32/tests: Check if CreateProcess() resets STARTUPINFO/PROCESS_INFORMATION.
Our test framework depends on CreateProcess() initializing the
hProcess field in case of a failure.  The process tests depend on it
not modifying the STARTUPINFO fields.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-24 18:50:19 +01:00
Francois Gouget 1d8ee10064 kernel32/test: Simplify a couple of calls to 'process exit'.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-24 18:50:19 +01:00
Francois Gouget 995b44fe61 kernel32/tests: Avoid a race in test_WaitForJobObject().
Waiting for and closing the job object does not kill the child process
which then may print its 'tests executed' line at the same time as the
parent traces, sometimes mangling failure messages.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-24 18:41:45 +01:00
Nikolay Sivov f1ff96cf5a kernel32/tests: Link to activation context API directly.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-21 13:48:44 +01:00
Alexandre Julliard 3e6b15c7b5 ntdll: Implement RtlIsNormalizedString().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-21 13:48:44 +01:00
Alexandre Julliard 64dc42e34f ntdll: Use external NLS files for Unicode normalization.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-21 13:48:44 +01:00
Alexandre Julliard f9f3e57cf8 unicode: Generate the NLS files for normalization forms.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-21 13:48:44 +01:00
Francois Gouget cd523f3049 kernel32/tests: Simplify the name of the test unit for child processes.
The official name (shown by --list) has no path nor extension.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-21 09:13:00 +01:00
Nikolay Sivov e7c735b825 kernel32/tests: Link to activation context API directly.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-21 00:55:44 +01:00
Francois Gouget eec3ad5e7c kernel32/tests: Clarify the process's quotes handling comment.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-19 20:26:53 +01:00
Michael Stefaniuc ec3589730a kernel/tests: Get rid of strcmp_aw() / strlen_aw().
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-19 09:14:37 +01:00
Alexandre Julliard 84b05383bb kernel32/tests: Add more normalization tests.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-18 20:05:44 +01:00
Alexandre Julliard c658731975 unicode: Add support for high Unicode planes in decomposition tables.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-17 15:04:59 +01:00
Fabian Maurer 043f6521e7 kernel32/tests: Make sure test doesn't depend on previous state.
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-12 20:36:26 +01:00
Paul Gofman c28225fe5a kernel32: Add semi-stub for LoadPackagedLibrary().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48229
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-12 20:25:27 +01:00
Rémi Bernon c2b81e8dfd kernel32/tests: Fix some format-overflow warnings.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-11 22:39:59 +01:00
Alexandre Julliard 269c372c09 kernel32/tests: Optionally test the entire NormalizationTest.txt file.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-04 21:30:26 +01:00
Alexandre Julliard 8d11c0871e kernelbase: Fix NormalizeString() return value and last error.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-03 20:48:03 +01:00
Alexandre Julliard a7cc191aa8 ntdll: Fix estimated buffer sizes in RtlNormalizeString().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-03 20:48:03 +01:00
Alexandre Julliard dcd195e0f1 ntdll: Add parameter checking in RtlNormalizeString().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-03 19:20:39 +01:00
Alexandre Julliard 77f58afd3b kernel32/tests: Add some NormalizeString() tests.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-03 19:20:39 +01:00
Zebediah Figura c7019a8887 kernelbase: Implement ReOpenFile().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47668
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-28 19:33:06 +01:00
Vladimir Panteleev b0acb5982a kernel32/tests: Fix GetLastError() checks in environment tests.
Lack of SetLastError() calls caused tests to compare stale errors,
instead of the effects of the tested (immediately previously called)
functions.

Add SetLastError calls, and fix a broken test (copy check from A to W
tests).

Signed-off-by: Vladimir Panteleev <git@vladimir.panteleev.md>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-23 22:41:29 +01:00
Alexandre Julliard 4b5c67ee0b unicode: Remove case mappings that don't round-trip.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-23 21:11:29 +01:00
Jacek Caban 9b44422a49 kernel32/tests: Skip instruction pointer check of the last exception in exception race tests.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-14 19:05:06 +01:00
Alexandre Julliard 21876b998c kernel32: Catch stack overflow faults in IsBad*Ptr() functions.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48444
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-13 19:41:02 +01:00
Nikolay Sivov 05061846c1 kernel32/tests: Remove GetLongPathName() workarounds.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-07 22:26:08 +01:00
Alexandre Julliard d6022964cb kernel32/tests: Remove some workarounds for old Windows versions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-06 19:28:45 +01:00
Zebediah Figura f692d9e7bc kernel32/tests: Fix some codepage test failures with Windows 10.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-05 17:34:22 +01:00
Jacek Caban 1d556188a7 kernel32/tests: Avoid function pointers for functions present since XP.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-03 21:40:59 +01:00
Jacek Caban 79d58362c7 kernel32/tests: Don't use blackbox for crashing process.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-03 21:40:59 +01:00
Jacek Caban f4e232430b kernel32/tests: Use WAIT_EVENT_TIMEOUT in wait_for_breakpoint.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-03 21:40:59 +01:00
Jacek Caban 313fc40a97 kernel32/tests: Get rid of no longer needed win9x checks.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-02 17:40:39 +01:00
Zebediah Figura 741b8f9504 kernel32/tests: Fix a test failure on Windows 10.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-01 19:15:37 +01:00
Alexandre Julliard c8f3383696 include: Allow using debug.h in tests.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-17 16:55:15 +01:00
Akihiro Sagawa a85bc781d3 kernelbase: Use translated Unicode default char to check invalid chars.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48288
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-16 18:45:01 +01:00
Akihiro Sagawa 3bb92d7773 kernel32/tests: Refactor MB_ERR_INVALID_CHARS tests.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-16 18:44:59 +01:00
Alexandre Julliard 8b0a7b2503 ntdll: Fix RtlQueryUnbiasedInterruptTime() prototype.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48239
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-16 18:44:57 +01:00
Paul Gofman 3a47598bb3 kernel32/tests: Test invalid parent handle in test_parent_process_attribute().
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-13 13:16:00 +01:00
Paul Gofman 74a74556dd server: Support creating processes with specified parent.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47817
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-13 13:13:36 +01:00
Alexandre Julliard f2e5b80707 kernel32: Use the Get/SetComputerName functions from kernelbase.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-12 23:17:05 +01:00
Francois Gouget 7eb54616ff kernel32/tests: Trace LastError when GetPhysicallyInstalledSystemMemory() fails.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-09 23:47:46 +01:00
Mathew Hodson df94a9a450 kernel32/tests: Add broken result for Windows XP and 2003.
Signed-off-by: Mathew Hodson <mathew.hodson@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-09 23:47:45 +01:00
Mathew Hodson 356513ef2d kernel32/tests: Trace the mapped string when FoldStringW fails.
Signed-off-by: Mathew Hodson <mathew.hodson@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-09 23:47:45 +01:00
Jeff Smith 7cbabed51f kernel32/tests: Allow for differing fpu_cw returned on Windows XP.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-06 22:30:23 +01:00
Alexandre Julliard 117dbfa2cf ntdll: Fix DBCS mappings in RtlCustomCPToUnicodeN().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-06 19:50:06 +01:00
Paul Gofman 52d8ea3aa8 kernel32/tests: Add a basic test for PROC_THREAD_ATTRIBUTE_PARENT_PROCESS process creation attribute.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-05 23:36:23 +01:00
João Diogo Ferreira c93aa1095e kernel32: Properly handle GEO_NATION and GEO_ID in GetGeoInfoW().
Signed-off-by: João Diogo Craveiro Ferreira <devilj@outlook.pt>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-04 09:36:44 +01:00
Nikolay Sivov 7082ebc608 ntdll: Use better type for thread description info structure.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-03 21:27:14 +01:00
Andrey Gusev a9bf1ad81e kernel32/tests: Reorder the WINAPI with the void.
Signed-off-by: Andrey Gusev <andrey.goosev@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-02 22:02:56 +01:00
Zebediah Figura 216530f230 kernelbase: Implement GetOverlappedResultEx().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=38830
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-29 08:26:30 +01:00
Alexandre Julliard e89bbd5244 kernel32: Reimplement FoldStringW() to support composition.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-28 09:04:33 +01:00
Alexandre Julliard 4901386892 kernel32/tests: Add tests for NtGetNlsSectionPtr() and RtlInitCodePageTable().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-26 22:49:03 +01:00
Nikolay Sivov 179cd78f82 kernel32: Implement higher level API to access thread description.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-26 16:33:55 +01:00
Gijs Vermeulen a507126ac4 kernel32/tests: Add GetCurrentConsoleFontEx tests.
Signed-off-by: Gijs Vermeulen <gijsvrm@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-25 20:47:43 +01:00
Nikolay Sivov 602eb52ce9 kernel32/tests: Add some tests for thread description API.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-25 20:47:43 +01:00
Francois Gouget af638bc117 kernel32/tests: Fix the lcid and expected value in a codepage ok() call.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-21 21:00:59 +01:00
Francois Gouget fb037132fd kernel32/tests: Remove an unused assignment in the comm test.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-21 19:01:10 +01:00
Alexandre Julliard fd588a22b7 kernel32: Move string normalization functions to ntdll.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-21 10:43:46 +01:00
John Chadwick 9021cca65d kernelbase: Fix GetSystemFirmwareTable regression.
Regression caused by 71aba33fc6.

Signed-off-by: John Chadwick <john@jchw.io>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-20 23:03:21 +01:00
John Chadwick 2acbe4f096 kernel32/tests: Add test for GetSystemFirmwareTable.
This adds a test to ensure that a typical usage of
GetSystemFirmwareTable with a preflight call works correctly.

Signed-off-by: John Chadwick <john@jchw.io>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-20 23:03:21 +01:00
João Diogo Ferreira 2a03c0958b kernel32: Handle GEOCLASS_ALL in EnumSystemGeoID().
Signed-off-by: João Diogo Craveiro Ferreira <devilj@outlook.pt>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-19 23:15:04 +01:00
Alexandre Julliard e8ef4c0f53 kernel32/tests: Get rid of Unicode helper functions. 2019-11-19 23:15:04 +01:00
Alexandre Julliard 9f0983ddfc kernel32: Use RtlLocaleNameToLcid(). 2019-11-19 23:15:04 +01:00
Alexandre Julliard 7ac7a902c8 ntdll: Implement RtlLocaleNameToLcid().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-19 23:15:04 +01:00
Alexandre Julliard 4b1a8d6361 kernel32: Add more special cases in ConvertDefaultLocale(). 2019-11-19 23:15:04 +01:00
Francois Gouget da238dc1d1 kernel32: Match the Windows 10 1709+ SetConsoleFont() implementation.
That is return the same 'E_NOTIMPL' error code.
Remove the todo_wine-s but keep the tests in case we want to implement
the API for compatibility with old Windows versions.

Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-14 09:40:36 +01:00
Francois Gouget ba4cfbd448 kernel32/tests: Windows 10 dropped support for SetConsoleFont().
Windows 10 1507 still supports it but not 1607+.

Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-14 09:40:33 +01:00
Francois Gouget 31046449e6 kernel32: Match the Windows 10 1709+ GetConsoleFontInfo().
That is return the same 'E_NOTIMPL' error code.
Remove the todo_wine-s but keep the tests in case we want to implement
the API for compatibility with older Windows versions.

Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-08 18:19:17 +01:00
Francois Gouget 2f30f28b04 kernel32/tests: Windows 10 dropped support for GetConsoleFontInfo().
Windows 10 1507 still supports it but not 1607+.

Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-08 18:19:17 +01:00
Alexandre Julliard 007f1b9a82 kernel32/tests: Add more tests for FPU control registers.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-04 09:58:45 +01:00
Alex Henrie b0635c9b20 kernel32/tests: Add tests for GetSystemPowerStatus.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-31 19:38:46 +01:00
Alexandre Julliard fea66c2884 kernel32/tests: Enable the ExitProcess() test on ARM64.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-29 23:30:47 +01:00
Brendan Shanks aa51aee1a9 ntdll: Enable WoW64 filesystem redirection when loading libraries.
This matches the behavior seen on Windows 7/2008R2 and newer.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47912
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-28 21:11:48 +01:00
Zebediah Figura a7269a1035 kernel32/tests: Fix some codepage tests under Windows 10.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-28 21:09:58 +01:00
Nikolay Sivov dbd765e2bd kernel32/tests: Fix some test failures on Win10.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-23 10:26:17 +02:00
Brendan Shanks de9406bccd kernel32/tests: Test loading system DLLs with WoW64 redirection disabled.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47912
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-21 20:41:37 +02:00
Sven Baars aaaaec8642 kernel32/tests: Remove a test that shows inconsistent results.
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-18 18:05:32 +02:00
Jacek Caban c0724e56ac kernel32/tests: Add message mode non-blocking pipe test.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-17 21:04:54 +02:00
Brendan Shanks 41374ef196 server: Don't block ConnectNamedPipe for pipe in PIPE_NOWAIT mode.
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-16 16:03:36 +02:00
Brendan Shanks 91c4e9bf9a server: Don't block when writing to named pipes in PIPE_NOWAIT mode.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-16 16:03:35 +02:00
Brendan Shanks abb1ce1087 server: Don't block when reading from named pipes in PIPE_NOWAIT mode.
Fixes Rockstar Games Launcher hanging for some users.

Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-16 16:03:11 +02:00
Brendan Shanks 11a554eecc kernel32/tests: Add tests for named pipes in PIPE_NOWAIT mode.
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-16 16:03:10 +02:00
Sven Baars 71e96bd3b7 kernel32/tests: Skip some tests when NtSetInformationProcess is denied access.
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-09 21:30:37 +02:00
Piotr Caban 37d2b5843f kernel32: Add write watch test on OVERLAPPED structure.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-03 22:58:07 +02:00
Akihiro Sagawa aade0bf7e3 ntdll: Add exception handling around DbgBreakPoint.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47509
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-03 22:58:07 +02:00
Alexandre Julliard a5d45e9ae5 kernel32: Move exe path functions to ntdll.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-03 22:58:06 +02:00
Alexandre Julliard 619bd16e7a kernel32: Move dll path functions to ntdll.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-03 22:56:14 +02:00
Alexandre Julliard a0a2b25a44 kernel32: Move Get/SetDllDirectory() implementation to ntdll.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-01 15:14:08 +02:00
Alexandre Julliard 5f938bb51b ntdll: Implement RtlGetSearchPath().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-01 15:14:08 +02:00
Gijs Vermeulen b03a4b8902 kernel32/tests: Fix some console tests on newer Win10.
Signed-off-by: Gijs Vermeulen <gijsvrm@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-30 22:24:27 +02:00
Sven Baars a892bf5909 kernel32/tests: Fix a test failure on Windows XP.
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-30 11:49:02 +02:00
Francois Gouget 98093939d6 kernel32/tests: Fix the spelling of three ok() messages and comments.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-23 19:44:17 +02:00
Francois Gouget 17fbd837e2 kernel32/tests: Fix the spelling of the exerciseServer() function name.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-23 19:44:17 +02:00
Alex Henrie 7c5ea436af include: Rename Reserved1 to SystemStatusFlag in SYSTEM_POWER_STATUS.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-23 19:44:17 +02:00
Jacek Caban 27da4fa449 kernel32/tests: Enable debug break exception race tests on i386 Wine.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-20 21:31:34 +02:00
Jacek Caban 649be380b1 ntdll: Call send_debug_event from debug handler on x86_64.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-04 20:03:30 +02:00
Francois Gouget d504332b1c kernel32/tests: Avoid unneeded strlen*() calls.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-04 17:11:29 +02:00
Jacek Caban 42a9b58b06 kernel32/tests: Add exception handling race test.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-27 21:53:03 +02:00
Alexandre Julliard 505be3a0a2 kernelbase: Implement SetThreadStackGuarantee().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-24 11:39:07 +02:00
Jacek Caban 0f4ef1c3df kernel32/tests: Add single step and debug service tests.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-14 17:41:01 +02:00
Rémi Bernon d1a7b681ea ntdll: Change zero_bits parameter type to ULONG_PTR for NtMapViewOfSection and NtAllocateVirtualMemory.
It can be a pointer mask, eventually 64bit, and ULONG_PTR is what can be
found in several documentation of these functions.

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-08-13 12:11:15 +02:00
Nikolay Sivov 2a15f77b49 ntdll: Ignore -1 time value same as 0 when setting file times.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-09 10:03:19 +02:00
Nikolay Sivov 70189853e2 kernel32/tests: Add some tests for setting file times.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-09 10:03:14 +02:00
Francois Gouget 8080e204bf kernel32/tests: A couple of spelling fixes in ok() call messages.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-08 17:53:36 +02:00
Jacek Caban c1a32a080f server: Report only one debug event per process at the time.
Instead of one per thread.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-07 00:12:26 +02:00
Jacek Caban 6b46a4d24a kernel32/tests: Improve timeout handling in debugger tests.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-07 00:12:25 +02:00
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
Paul Gofman ba42efdb14 ntdll: Pass async parameter to add_fd_completion server call.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-21 16:07:07 +01:00
Paul Gofman 41b221ff82 kernel32/tests: Test ReadFileScatter() completion status with FILE_SKIP_COMPLETION_PORT_ON_SUCCESS.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Jacek Caban<jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-21 16:06:57 +01:00
Paul Gofman 7ce2a8e0ae ntdll: Return STATUS_PENDING from NtReadFile() for async read in case of no buffering.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=31954
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-19 13:10:22 +01:00
Paul Gofman 3117370acc kernel32/tests: Add test for overlapped file read.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-19 13:10:22 +01:00
Daniel Lehman 8acdd597d0 kernel32/tests: Add tests for SpecialCasing.
Signed-off-by: Daniel Lehman <dlehman25@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-19 13:10:22 +01:00
Alexandre Julliard 3ba4901134 kernel32/tests: Add a test to check some fields in fake dlls.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45377
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-18 21:11:17 +01:00
Piotr Caban 864919a2ea kernel32/tests: Test that copy-on-write file mapping is not modifying the file.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-13 19:45:24 +01:00
Piotr Caban 43a4401ebd kernel32/tests: Add file mapping tests on readonly file.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-13 19:45:24 +01:00
Jacek Caban 5bb4212397 kernel32: Support MUI_LANGUAGE_ID flag in EnumUILanguages.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-13 19:45:24 +01:00
Alexandre Julliard 9839bb7691 ntdll: Skip dlls of the wrong machine type when searching through the load path.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-11 12:31:40 +01:00
Alexandre Julliard c946922a9c ntdll: Directly try to open the dll file instead of checking for existence first.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-11 11:52:00 +01:00
Huw Davies 2d2e935190 kernel32: Implement canonical composing.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-11 11:52:00 +01:00
Huw Davies db3ae2ca9f libport: Add support for singleton decomposition.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-11 11:52:00 +01:00
Huw Davies eceb69e172 libport: Add support for compatibility decomposition.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-11 11:52:00 +01:00
Huw Davies dc919db2bf kernel32: Implement canonical reordering.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-11 11:52:00 +01:00
Huw Davies e4a9e2ff2e kernel32: Initial support for canonical decomposition in NormalizeString().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-11 11:52:00 +01:00
Huw Davies aa2f12900b kernel32/tests: Move the tests to a per-test todo.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-11 11:52:00 +01:00
Alexandre Julliard 6fb00db51e ntdll: Don't use current directory for libraries unless explicitly specified in the search path.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-06 19:57:27 +01:00
Alexandre Julliard b1dbe76d7a kernel32/tests: Add tests for dll fallback when image type doesn't match current platform.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-28 18:35:46 +01:00
Alexandre Julliard 5613526bd4 kernel32/tests: Try loading the dll also for matching platform type.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-28 18:35:46 +01:00
Alexandre Julliard 27193d36af kernel32/tests: Add helper function for machine type manipulations.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-28 18:35:46 +01:00
Gijs Vermeulen 9b7113bcec kernel32/tests: Add CopyFile[Ex]A NULL handling tests.
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-28 10:28:01 +01:00
Alexandre Julliard c87aa2b9fc ntdll: Support loading old runtime versions of IL-only images.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-25 15:29:53 +01:00
Gabriel Ivăncescu ec89a93028 kernel32/tests: Test partially overlapping buffers for MultiByteToWideChar.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-24 17:33:38 +01:00
Sven Baars b012281cc9 kernel32/tests: Fix a memory leak (Valgrind).
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-23 18:23:42 +01:00
Jacek Caban 0a41f5b0a2 kernel32/tests: Initialize input buffer in test_overlapped_transport.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46341
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-07 10:47:21 -06:00
Dmitry Timoshkov c26b6afad3 kernel32: CreateDirectory shouldn't return ERROR_ACCESS_DENIED for the root of the drive.
According to the testbot results CreateDirectory("C:\\", NULL) fails
with ERROR_ACCESS_DENIED for not administrators. However with UAC enabled
and not and administrator account I get ERROR_ALREADY_EXISTS in that case
with Windows 7 64-bit running on real hardware. Moreover, Wine doesn't
really perform any access checks in that case and blindly assumes that
returning STATUS_ACCESS_DENIED is correct behaviour for the drive's root:
dlls/ntdll/directory.c,lookup_unix_name().

This patch fixes an application that can't find its data files because
after it receives ERROR_ACCESS_DENIED it stops further directory traversing.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-28 17:42:23 +01:00
Andrey Gusev bf8eb24913 kernel32/tests: Fix typos in ok() messages.
Signed-off-by: Andrey Gusev <andrey.goosev@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-29 15:55:17 +01:00
André Hentschel ee9f2c62d5 kernel32: Implement GetCurrentThreadStackLimits.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46179
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-26 16:41:47 +01:00
Greg Smith f4b07ee8ec kernel32: Ignore FileIoPriorityHintInfo in SetFileInformationByHandle().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46130
Signed-off-by: Greg Smith <codedonewell@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-20 16:26:04 +01:00
Zhiyi Zhang 33de7fb7a8 mountmgr: Add IOCTL_STORAGE_QUERY_PROPERTY stub.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-20 16:26:04 +01:00
André Hentschel 95fa795fa1 ntdll: Call system hook in LdrResolveDelayLoadedAPI when dll hook is missing.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46089
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-12 10:30:07 +01:00
Nikolay Sivov 982b93148c kernel32/tests: Fix skips for implemented functions.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-12 10:21:51 +01:00
Dmitry Timoshkov c055a274e9 kernel32/tests: Add more directory change notification tests.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-05 19:12:12 +01:00
Jacek Caban 9050b58f07 ntdll: Correctly return result of blocking NtFlushBuffersFile.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-30 19:00:35 +01:00
Zhiyi Zhang 3ebd2f0be3 kernel32: Implement FindStringOrdinal.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46035
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-30 10:53:50 +01:00
Nikolay Sivov d75f2fc3c7 kernel32/tests: Add SearchPath() test for file name with multiple extension delimiters.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-22 11:14:32 +02:00
Nikolay Sivov 6a106ac9bf kernel32/tests: Remove workarounds for SearchPath().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-22 11:14:31 +02:00
Dmitry Timoshkov ccf9b18ea0 kernel32: GetLongPathName should fail when called with a wildcard.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-22 09:55:02 +02:00
Dmitry Timoshkov 3a78ec672a kernel32: GetShortPathName should fail when called with a wildcard.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-22 09:55:01 +02:00
Dmitry Timoshkov 9bc6068843 kernel32/tests: Add some tests for GetLongPathName/GetShortPathName called with a wildcard.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-22 09:54:59 +02:00
Jacek Caban dd1769a16a server: Improve error handling of disconnected named pipe clients.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-22 09:53:43 +02:00
Jacek Caban 0fe08b794d kernel32/tests: Add more PeekNamedPipe tests.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-22 09:53:31 +02:00