Commit Graph

2319 Commits

Author SHA1 Message Date
Francois Gouget 0016df0fb1 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>
2022-02-14 21:20:42 +01:00
Hugh McMaster 27df7f518c kernelbase: Implement SetCurrentConsoleFontEx.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-10 10:47:05 +01:00
Fabian Maurer d37028ae54 kernel32/tests: Avoid "misleading indentation" warnings.
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-27 21:09:19 +01:00
Alexandre Julliard f0cd33c69e include: Add support for defining Win32 types as 'long' where possible.
Add -DWINE_NO_LONG_TYPES to modules that still have compilation
warnings with long types.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-27 20:38:22 +01:00
Alex Henrie 566c0653f2 kernel32/tests: Drop change test workarounds for Windows <= 2000.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-05 17:16:18 +01:00
Alex Henrie c43ce509d2 kernel32/tests: Drop path test workarounds for Windows <= 2000.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-04 11:49:31 +01:00
Paul Gofman 8eacd3e507 server: Store PE image info in process structure.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51829
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-02 13:53:08 +01:00
André Zwing a6bf1a5ffb kernel32/tests: Don't test functions directly when reporting GetLastError().
Signed-off-by: André Zwing <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-29 13:43:25 +01:00
Alex Henrie 04097b4f92 kernel32/tests: Check return value of NtGetNlsSectionPtr in test_GetCPInfo (Coverity).
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-27 15:00:45 +01:00
Alex Henrie b7223aff36 kernel32/tests: Ensure auto_value.data is initialized in test_ExitCode (Coverity).
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-27 15:00:38 +01:00
Alex Henrie b3166ff31e kernel32/tests: Remove unused variable size from test_process_info (Coverity).
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-27 15:00:08 +01:00
Eric Pouech 508e97a249 kernel32/tests: Test resetting ctrl-c handlers on some console APIs.
AllocConsole(), AttachConsole() and FreeConsole() should reset ctrl
handlers' list.

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-23 22:56:59 +01:00
Paul Gofman aee405e2cb ntdll: Always try searching apiset DLLs in the default directories.
This is a temporary workaround until we have a correct apisets
implementation.

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-23 10:55:30 +01:00
Keno Fischer d96975d649 kernel32: Fix CancelIoEx return value.
In commit 27ecc6ba5 ("ntdll: Fix iosb handling in NtCancelIoFile()"),
NtCancelIoFile(Ex) was updated to return its status rather than
unconditionally setting it in io_status->u.Status (though the write
was retained in the success case). As a result, in the error case,
the kernelbase wrappers now interpret unitialized memory as an error
code, since io_status->u.Status is never written.

Signed-off-by: Keno Fischer <keno@juliacomputing.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-23 10:50:10 +01:00
Alexandre Julliard 3f80ea69fb kernel32/tests: Remove an unreliable test.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-16 18:15:52 +01:00
Alexandre Julliard 1431702f5a kernel32/tests: Fix some test failures on Windows.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-16 18:15:35 +01:00
Alex Henrie d7161a8576 kernel32/tests: Split up checks in flush_proc function.
This test is failing intermittently on the testbot but not enough
information is output to tell why.

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-13 11:32:20 +01:00
Paul Gofman d2e35b04fb ntdll: Remove a special case for entry point not in executable section in map_image_into_view().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-08 22:14:44 +01:00
Francois Gouget 68dc3d4116 kernel32/tests: Check that the preferred UI languages are in uppercase.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-07 16:19:48 +01:00
Alexandre Julliard 3c715f14c7 kernel32/tests: Use the correct scanf format for a handle.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52155
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-03 16:50:02 +01:00
Brendan Shanks e7afddd2c1 ntdll: Rename THREAD_DESCRIPTION_INFORMATION to THREAD_NAME_INFORMATION.
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-02 20:20:40 +01:00
Brendan Shanks 65dd060a67 ntdll: Rename ThreadDescription to ThreadNameInformation.
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-02 20:20:40 +01:00
Jinoh Kang 9c5fa40ebd kernelbase: Fix infinite loop in Internal_EnumCalendarInfo.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52129
Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-01 18:13:54 +01:00
Jinoh Kang 4010876a42 kernel32/tests: Add tests for EnumCalendarInfo(Ex).
Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-01 18:13:54 +01:00
Hugh McMaster 4b9010d538 kernelbase: Write NUL bytes to CPINFO.LeadByte for the CP_UTF7 and CP_UTF8 code pages.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-22 22:20:51 +01:00
Hugh McMaster 381ea5413c kernel32/tests: Test whether every element of the CPINFO.LeadByte array is NUL.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-22 22:20:51 +01:00
Nick Fox ef26f7bd5c ntdll: Fix LdrGetDllPath with LOAD_WITH_ALTERED_SEARCH_PATH without a path.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=26350
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51821
Signed-off-by: Nick Fox <nick@foxsec.net>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-22 22:20:50 +01:00
Nick Fox 85723b9208 kernel32: Add tests for LdrGetDllPath with LOAD_WITH_ALTERED_SEARCH_PATH.
Signed-off-by: Nick Fox <nick@foxsec.net>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-22 22:20:50 +01:00
Hugh McMaster 4e351b47bf kernel32: Return font size, not screen buffer size, from GetCurrentConsoleFontEx.
GetCurrentConsoleFontEx currently returns the screen buffer size when
maxwindow is FALSE. It should return the current console font size.

Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-15 19:58:51 +01:00
Hugh McMaster e4f3d78776 kernel32/tests: Add tests for the current console font size.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-15 19:58:44 +01:00
Dmitry Timoshkov 33bc90e687 ntdll: Return correct status when manifest could not be loaded from file.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-12 22:42:51 +01:00
Dmitry Timoshkov 6e754202bf kernel32/tests: Add a test for loading manifest from resources.
To confirm that 2d764e90dd does the right thing.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-12 22:42:51 +01:00
Paul Gofman aa234f3a58 ntdll: Don't add dependencies for system dlls.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-03 21:06:48 +01:00
Paul Gofman 0dd37b02f9 ntdll: Store module dependencies in DDAG structure.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-03 21:06:48 +01:00
Paul Gofman 41c7652bbe ntdll: Allocate DDAG node for module.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-03 21:06:48 +01:00
Alexandre Julliard b1d5649b5c kernel32/tests: Use the standard va_list instead of __ms_va_list.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-22 11:11:48 +02:00
Paul Gofman 231542b39e kernel32/tests: Add test for DDAG node dependencies structure.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-21 20:30:38 +02:00
Zebediah Figura 80b35103df kernel32/tests: Add a couple of tests for error handling when reading past EOF.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-18 10:45:53 +02:00
Paul Gofman 7c523f4867 kernelbase: Fix string size variable overflow in GetModuleFileNameW().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51833
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-04 15:52:16 +02:00
Paul Gofman 39a3549093 ntdll: Implement LdrGetDllFullName() function.
Based on a patch by Alex Henrie.

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-29 08:52:46 +02:00
Paul Gofman 50bc449a74 ntdll/tests: Add test for LdrGetDllFullName().
Based on a patch by Alex Henrie.

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-29 08:52:24 +02:00
Paul Gofman 7ddd79b8f5 kernelbase: Sanitize flags in GetModuleHandleExW().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-27 17:40:15 +02:00
Paul Gofman cf0a828b02 ntdll: Implement LdrGetDllHandleEx() function.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-27 17:40:15 +02:00
Nikolay Sivov b68b08b5de kernel32/tests: Fix sprintf() arguments (Coverity).
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-14 21:41:32 +02:00
Gabriel Ivăncescu 2fe70331d9 ntdll: Implement JobObjectBasicProcessIdList for NtQueryInformationJobObject.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-14 21:24:14 +02:00
Zebediah Figura 5af74129bd ntdll: Do not fill the IOSB if a device IRP failed synchronously.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-14 18:30:17 +02:00
Giovanni Mascellani 3e370f761a tzres: Regenerate TZ data from de facto standard sources.
The sources used to regenerate data are:

 * The Olson database, tracing all world time zone changes since 1970,
   widely used under Unix systems and dedicated to the public domain.

 * Unicode CLDR's windowsZones.xml, used by Windows itself as source
   for naming timezones and providing the correspondance with the
   Olson zones. It is licensed under a MIT-styled license.

Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-07 23:19:22 +02:00
Paul Gofman 03c297b1c1 kernelbase: Mind OS version in the PE header when reporting OS version.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-01 09:00:22 +02:00
Zebediah Figura a200c47c32 mountmgr: Return STATUS_BUFFER_OVERFLOW if an insufficient buffer is passed to IOCTL_MOUNTMGR_QUERY_POINTS.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-31 10:57:16 +02:00
Zebediah Figura 17ebac8482 mountmgr: Validate the output size for IOCTL_MOUNTMGR_QUERY_POINTS.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-31 10:57:11 +02:00
Zebediah Figura c342afeff8 kernel32/tests: Add some tests for IOCTL_MOUNTMGR_QUERY_POINTS.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-31 10:56:55 +02:00
Francois Gouget eae25715f5 kernel32/tests: Fix a couple of ASCII / ANSI mixups in ok() messages.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-27 20:25:05 +02:00
Francois Gouget 463850baa6 kernel32/tests: Fix ASCII / ANSI mixups in comments.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-27 20:25:05 +02:00
Francois Gouget c388453184 kernel32: Fix NLS_GetDateTimeFormatA() Unicode to ANSI conversion.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-26 21:49:09 +02:00
Francois Gouget 263157a03d kernel32/tests: Test GetDateFormatA()'s Unicode to ANSI conversion.
The ANSI string may be longer than the Unicode one and
GetDateFormatA()'s return value should reflect that.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-26 21:49:09 +02:00
Francois Gouget 10db4147dd kernel32/tests: Test GetTimeFormatA()'s Unicode to ANSI conversion.
The ANSI string may be longer than the Unicode one and the return
value should reflect that.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-26 21:49:09 +02:00
Francois Gouget 3144fbc347 kernel32/tests: Remove the macros from the GetNumberFormatEx() tests.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-25 18:28:50 +02:00
Francois Gouget b020ab629d kernel32/tests: Remove the macros from the GetDateFormatW() tests.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-25 18:28:47 +02:00
Francois Gouget 6e2a4a6762 kernel32/tests: Remove the macros from the GetDateFormatEx() tests.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-25 18:28:43 +02:00
Francois Gouget 2ee1399786 kernel32/tests: Remove the macros from the GetTimeFormatEx() tests.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-24 12:13:55 +02:00
Francois Gouget f0ec42c879 kernel32/tests: Remove the macros from the GetDateFormatA() tests.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-24 12:13:53 +02:00
Francois Gouget 01309cc020 kernel32/tests: Remove the macros from the GetNumberFormatA() tests.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-24 12:13:51 +02:00
Francois Gouget b8f1435a53 kernel32/tests: Remove the macros from the GetCurrencyFormatA() tests.
Also simplify testing all the NegativeOrder values.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-24 12:13:49 +02:00
Francois Gouget 68a3863470 kernel32/tests: Remove the macros from the GetTimeFormatA() tests.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-23 12:08:14 +02:00
Francois Gouget 6c58776d0d kernel32/tests: Don't allow the pre-Vista locale results.
This simplifies the Get*Format() tests.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-23 12:08:05 +02:00
Francois Gouget 2e89691bb6 kernel32/tests: Don't skip the CompareStringA() tests on Windows.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-23 12:06:20 +02:00
Hugh McMaster ec25eeab4c kernel32/tests: Add tests for SetCurrentConsoleFontEx.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-17 20:59:49 +02:00
Francois Gouget 01d513da8f kernel32/tests: Don't skip the sorting tests on Windows.
Only skip them in Wine since it's missing a compatible collation table.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-17 18:30:30 +02:00
Jacek Caban da86e50e29 conhost: Use message window to return a window for windowless consoles.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=38640
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-17 18:16:49 +02:00
Hugh McMaster 9ce8aafdae kernel32/tests: Fix rounding error when calculating console font size.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-09 21:40:48 +02:00
Alexandre Julliard 0bce76d830 ntdll: Move the loading of the global options to the Unix side.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-04 11:45:51 +02:00
Alexandre Julliard c6373abc10 ntdll: Update the MEMORY_INFORMATION_CLASS enumeration.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-03 23:41:05 +02:00
Paul Gofman 90d3b9a313 kernelbase: Don't allow converting thread to fiber more than once.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-29 10:16:25 +02:00
Hugh McMaster f1023b4b52 conhost: Popup Attributes should match Character Attributes when creating a new screen buffer.
Popup Attributes should match Character Attributes when a new screen
buffer is created. The existing Popup Attributes are copied when
using a pseudo console.

Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-26 21:44:25 +02:00
Hugh McMaster b17eb27112 conhost: Copy Character Attributes (colors) to the new screen buffer.
CreateConsoleScreenBuffer() copies the Character Attributes (colors)
to the new screen buffer when called.

Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-23 16:43:50 +02:00
Hugh McMaster b6e707ee60 kernel32/tests: Test whether font information and window size are copied to the new screen buffer.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-21 17:44:34 +02:00
Hugh McMaster 0a6d0e689b kernel32/tests: Test whether console color attributes are copied to the new screen buffer.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-21 17:44:34 +02:00
Francois Gouget 542dc085c9 kernel32/tests: Allow failure when loading the 268 bytes minimal PE image.
Windows 10 1809+ rejects this minimal image so allow ERROR_BAD_EXE_FORMAT
as a valid result.
Also adjust the comment to reflect the range of Windows versions that
usually accept this image and note that there are some exceptions which
means there are other unidentified factors at play.

Wine-Bug: https://bugs.winehq.org//show_bug.cgi?id=51185
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-20 18:47:06 +02:00
Francois Gouget 566a98800d kernel32/tests: Use WineTest contexts to simplify test_Loader().
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-19 12:33:09 +02:00
Alexandre Julliard 649f70aba7 server: Don't generate dll load event for native binaries on Wow64.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-09 22:15:30 +02:00
Qian Hong be55038f3d server: Forbid shrinking files which are mapped to memory.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-29 12:39:35 +02:00
Zebediah Figura 08c5e0106b kernel32/tests: Add some tests for SetEndOfFile().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-29 12:34:32 +02:00
Alexandre Julliard 0ffbec44f3 ntdll: Initialize the RealClientId field in the TEB.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-25 22:48:47 +02:00
Zhiyi Zhang f77d42471e kernel32/tests: Test GetFileAttributesExW() with a NT path not in canonical form.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-02 20:16:08 +02:00
Paul Gofman e1c3ee6d51 server: Do not allow parenting non-empty job.
Fixes a regression introduced by 21f5597de4

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-27 21:24:59 +02:00
Francois Gouget 6c39e731f4 kernel32/tests: Fix the spelling of an ok() message.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-25 21:13:00 +02:00
Alexandre Julliard 8e01e8763b ntdll: Implement NtTestAlert().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-25 21:13:00 +02:00
Paul Gofman d430efb64a server: Support process job lists.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-20 21:48:57 +02:00
Paul Gofman ddd161f339 ntdll: Validate job handles at process creation.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-20 21:48:57 +02:00
Paul Gofman 0986c8a35f kernelbase: Support PROC_THREAD_ATTRIBUTE_JOB_LIST in UpdateProcThreadAttribute().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-20 21:48:57 +02:00
Paul Gofman de0dc0e8ac server: Send completions for existing job processes when adding completion port.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-19 10:40:41 +02:00
Paul Gofman 21f5597de4 server: Support nested jobs.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-19 10:40:21 +02:00
Paul Gofman 45a48b5a84 kernel32/tests: Use sizeof(STARTUPINFOEX) for STARTUPINFOEX.STARTUPINFO.cb in process tests.
Fixes some test failures on a few Testbot machines when the process attributes are
just ignored.

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-14 20:57:34 +02:00
Francois Gouget e1821ddcae kernel32/tests: Fix the spelling of a comment.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-14 20:57:03 +02:00
Jacek Caban 058e9c773c kernel32/tests: Add syscall context handling tests.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-07 22:22:49 +02:00
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 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
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 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
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
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
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
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
Alexandre Julliard 7163c78234 ntdll: Close the debug port on thread exit.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-11 16:31:30 +01:00
Alexandre Julliard ea33192660 server: Report load dll events upon mapping a SEC_IMAGE view.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-11 16:31:30 +01:00
Michael Müller 3b3dfda599 kernel32: Update sr-Latn locale definition.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-04 15:41:02 +01:00
Zebediah Figura db3e08770f ntdll: Map LANG_SERBIAN_NEUTRAL in RtlLocaleNameToLcid().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-04 15:41:02 +01:00
Zebediah Figura f51e44c180 kernelbase: Map LANG_SERBIAN_NEUTRAL in ConvertDefaultLocale().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-04 15:41:01 +01:00
Zebediah Figura f73dc32e6e kernel32/tests: Add some more tests for wildcards.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-03 09:14:23 +01:00
Zebediah Figura f349e567ea kernel32/tests: Correctly check for failure from FindFirstFile().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-03 09:14:06 +01:00
Alexandre Julliard 2b6426da65 server: Don't store the debug object in the debugger thread.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-01 16:48:09 +01:00
Alexandre Julliard 7999af8244 ntdll: Implement NtWaitForDebugEvent().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-01 16:48:09 +01:00
Alexandre Julliard 7bebf7db8c ntdll: Implement NtSetInformationDebugObject().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-01 11:10:06 +01:00
Alexandre Julliard 11e6f1007c ntdll: Pass a debug object in the new_process request.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-01 11:08:44 +01:00
Alexandre Julliard 964772bc8e ntdll: Support the NtCreateDebugObject() flags.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-29 12:34:46 +01:00
Alexandre Julliard 7250f9a95b ntdll: Add some more section information data.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-22 18:33:23 +01:00
Zebediah Figura 9bc3a9f78b kernel32/tests: Add a regression test for a deadlock calling FLS callbacks on process exit.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-07 21:21:17 +01:00
André Hentschel 63f205df89 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>
2020-12-21 11:57:23 +01:00
Alex Henrie d91e951445 kernel32/tests: Add tests for Get(Active|Maximum)ProcessorCount.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-17 22:21:59 +01:00