Commit Graph

3767 Commits

Author SHA1 Message Date
Paul Gofman 35fa94e068 kernel32/tests: Fix test_GlobalMemoryStatus() for Win up to 8.1 and RAM size above 4GB.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-30 22:59:50 +02:00
Francois Gouget 660b32b81e kernel32/tests: Add a trailing linefeed to an ok() message.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-30 22:59:50 +02:00
Alexandre Julliard 734e3a91ac server: Only the first mapping needs to be an image in NtAreMappedFilesTheSame().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=37488
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-30 22:59:30 +02:00
Alexandre Julliard f3d41cc789 server: Don't bother queuing APC_NONE apcs.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-30 19:32:30 +02:00
Paul Gofman 96abde9eac kernel32: Add stub for SetThreadSelectedCpuSets().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-28 21:28:47 +02:00
Paul Gofman 72c562ce9c kernel32: Do not impose 32 bit limits on Win64 in GlobalMemoryStatus().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-27 16:52:30 +02:00
Giovanni Mascellani d1b80f4d63 kernel32/tests: Test for quirks in a few different time zones.
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-27 16:52:30 +02:00
Alex Henrie 1e9757778c kernel32: Print processor group in Get(Active|Maximum)ProcessorCount.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-26 21:34:02 +02:00
Gabriel Ivăncescu 01283ec6a6 kernel32/tests: Test hard linking a file to a different casing of itself.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-23 20:02:07 +02:00
Gabriel Ivăncescu b3553f0e5a kernel32/tests: Test renaming a file/directory to a different casing of itself or existing target.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-23 20:02:07 +02:00
Alexandre Julliard 191fd47e38 server: Get rid of the remaining PowerPC support.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-23 12:41:45 +02:00
Arkadiusz Hiler 04a8213ba9 kernel32: Update version to Win 10.
This fixes the game Evil Genius 2 complaining about unsupported OS.

Signed-off-by: Arkadiusz Hiler <ahiler@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-20 21:07:10 +02:00
Alexandre Julliard 8f3383f741 ntdll: Parse the loadFrom attribute in manifest dll elements.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-19 15:39:55 +02:00
Alexandre Julliard 2d519f5aa4 ntdll: Support MaxVersionTested in the manifest compatibility element.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-19 15:39:55 +02:00
Paul Gofman 61ca1128d1 kernel32: Implement VirtualAllocFromApp().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-15 10:34:31 +02:00
Zebediah Figura 80276752d1 kernel32/tests: Add a test for special characters in pipe names.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=28995
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-14 08:39:39 +02:00
Alexandre Julliard 8ffb9b31d0 ntdll: Initialize version and session id on the Unix side.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-13 13:05:29 +02:00
Paul Gofman b1e2780eac kernel32: Implement PackageIdFromFullName().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-12 19:32:15 +02:00
Esme Povirk 773161f84b kernel32: Add stub for GetMaximumProcessorGroupCount.
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-12 19:32:15 +02:00
Alexandre Julliard 1e1f110c99 kernel32: Return failure in GetBinaryType() for DLL files.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-06 22:46:12 +02:00
Alexandre Julliard 42de71c387 ntdll: Fail to load non-existent dlls, except during prefix bootstrap.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-31 21:01:31 +02:00
Paul Gofman f2ac82b866 kernel32: Implement GetSystemCpuSetInformation().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-30 17:10:03 +02:00
Alexandre Julliard f404e309df kernelbase: Don't fall back to dll loading for LOAD_LIBRARY_AS_DATAFILE.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-30 12:26:37 +02:00
Alexandre Julliard bb065801a6 ntdll: Map the builtin or fake dll from the Wine dirs if it's missing from the prefix.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-30 11:51:25 +02:00
Roman Pišl 33c6a6cb28 kernelbase: Convert DOS to NT path for FileRenameInfo in SetFileInformationByHandle.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50756
Signed-off-by: Roman Pišl <rpisl@seznam.cz>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-23 20:58:25 +01:00
Roman Pišl 0f84d30753 kernel32/tests: Add test for FileRenameInfo in SetFileInformationByHandle.
Signed-off-by: Roman Pišl <rpisl@seznam.cz>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-23 20:55:18 +01:00
Alexandre Julliard ab8f0c3e21 ntdll: Load builtin dlls through NtMapViewOfSection().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-22 20:38:45 +01:00
John Zourlios 0a366f7e4a kernelbase: Accept LINGUISTIC_IGNOREDIACRITIC & SORT_DIGITSASNUMBERS in CompareStringEx().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50362
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-22 18:52:57 +01:00
Gijs Vermeulen ed61ff43f4 kernelbase: Reject SORT_DIGITSASNUMBERS in CompareStringA().
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-22 18:52:57 +01:00
Alexandre Julliard 4ece7d409a server: Don't return image information for a terminated process.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-11 21:52:17 +01:00
Alexandre Julliard 3c9b5379d1 server: Store a copy of the image file name in the process.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-11 21:52:17 +01:00
Alexandre Julliard d316d548c2 server: Only keep the running processes in the global process list.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-11 18:10:42 +01:00
Alexandre Julliard fdf6d7de2e kernel32/tests: Add some tests for the behavior of queries on a dead process.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-11 18:10:42 +01:00
Rafał Harabień 45cd7ff487 kernel32: Add Wow64GetThreadSelectorEntry stub.
Signed-off-by: Rafał Harabień <rafalh92@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-09 21:33:43 +01:00
Paul Gofman 9396d3b342 kernel32/tests: Add tests for {Get|Set}UserDefaultGeoName().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-09 21:33:43 +01:00
Paul Gofman a430a69f8b kernel32: Implement SetUserGeoName().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-09 21:33:43 +01:00
Paul Gofman e610a56734 kernel32: Implement GetUserDefaultGeoName().
Fixes crash on launch in Outriders demo.

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-09 21:33:43 +01:00
Dmitry Timoshkov 050dc49b38 server: Set error to STATUS_UNSUCCESSFUL when the server fails to queue APC for a thread.
I've left another case of returning STATUS_PROCESS_IS_TERMINATING since
that's not covered by the tests.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50704
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-03 21:54:44 +01:00
Dmitry Timoshkov 816b588e04 kernel32/tests: Add a test for calling QueueUserAPC() on a terminated thread.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-03 21:54:44 +01:00
Alexandre Julliard 40e1000fc5 kernelbase: Use the correct machine type for ARM.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-03 21:54:44 +01:00
Zebediah Figura 4a384f4589 kernel32/tests: Add a test for Wow64Transition.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-01 21:13:00 +01:00
Zebediah Figura 44fc44880f server: Always set the async result when the APC object is destroyed.
This can happen if the async is terminated while there is no thread to queue
the APC to (as in the relevant test), or if the client dies before getting the
APC, or before transferring the APC results back to the server.

This also fixes a leak of async objects present since 61abc500f5. If a process
dies while accept asyncs are pending, the asyncs will be terminated but will
not find a valid thread to queue the APC to, and thus async_set_result() and
the completion callback are never called.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-25 08:54:41 +01:00
Zebediah Figura 4eddeff18a kernel32/tests: Add a test for async cancellation due to process exit.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-25 08:54:34 +01:00
Erich E. Hoover 50903a1504 kernelbase: Reimplement GetVolumeInformation on top of GetVolumeInformationByHandle.
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-17 11:44:05 +01:00
Alexandre Julliard e11f6e0eb3 kernel32: Don't use wine/server.h.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-16 23:01:37 +01:00
Alexandre Julliard 584427fc89 server: Avoid redefining the DuplicateHandle() constants.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-16 21:20:47 +01:00
Francois Gouget 5007f6fa35 kernel32/tests: Ignore exceptions while testing winedbg.
test_ExitCode() has one test that makes sure winedbg is non-interactive
when ShowCrashDialog is 0. This causes winedbg to output an "unhandled
exception" message which should not be counted as a test failure.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-15 21:11:28 +01:00
Alexandre Julliard 75030285da kernel32/tests: Load GetMappedFileNameW() dynamically.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-12 18:20:29 +01:00
Rémi Bernon b922b5aeef kernel32: Write the wait handle before executing the callback.
Otherwise we may execute the callback before the value is actually
returned from RegisterWaitForSingleObject.

Gears Tactics shares a pointer to the returned handle with its callbacks
and calls UnregisterWait from there. This creates a race condition that
sometimes causes a double free.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47843
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-11 22:26:36 +01:00
Rémi Bernon 26ee9134d5 ntdll: Re-implement RtlRegisterWait using TpSetWait.
This adds several internal flags to TP_WAIT object to support the
implementation:

* WT_EXECUTEONLYONCE: waits are re-queued unless it is set.

* WT_EXECUTEINWAITTHREAD: call the callback in the wait thread when set.

* WT_EXECUTEINIOTHREAD: call alertable NtWaitForMultipleObjects in wait
  thread when set, as well the callback in the wait thread, as for
  WT_EXECUTEINWAITTHREAD. The worker threads use non-alertable waits
  otherwise.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47843
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-11 22:26:36 +01:00