Commit Graph

3890 Commits

Author SHA1 Message Date
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
André Zwing 34841c0148 kernel32: Fix GetCompressedFileSize[AW] spec file entries.
Signed-off-by: André Zwing <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-10 11: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
Francois Gouget 652d94d34b kernel32: Store the ILANGUAGE values in uppercase.
Some APIs (e.g. GetSystemPreferredUILanguages()) return them as a string
so the case should match the one used by Windows in case developers used
case sensitive string comparisons (e.g. as in advapi32:lsa)

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-07 16:19:48 +01:00
Mohamad Al-Jaf a866e9150e kernelbase: Add CreateBoundaryDescriptorW stub.
Needed for IE11 iertutil.dll.

Signed-off-by: Mohamad Al-Jaf <mohamadaljaf@gmail.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
Mohamad Al-Jaf 04d1cab16a kernelbase: Add SetCachedSigningLevel stub.
Needed for Microsoft Edge offline installer.

Signed-off-by: Mohamad Al-Jaf <mohamadaljaf@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-02 20:20:39 +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
Paul Gofman db7cdf99b0 kernel32: Use uppercase ntdll name in forwarded exports.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-01 09:58:16 +01:00
Paul Gofman bf8b185b91 kernelbase: Add stub for PrefetchVirtualMemory().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-24 15:37:24 +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
Mohamad Al-Jaf d5c998770e kernel32: Forward AppPolicyGetMediaFoundationCodecLoading to kernelbase.
Signed-off-by: Mohamad Al-Jaf <mohamadaljaf@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-11 21:06:08 +01:00
Martin Storsjö bdb3608811 ntdll: Implement stack unwinding on arm.
This is a very close copy of the arm64 implementation.

Signed-off-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-09 22:02:56 +01:00
Martin Storsjö dd1c560752 ntdll: Implement RtlVirtualUnwind for arm.
Signed-off-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-09 22:02:55 +01:00
Martin Storsjö eeb18e4913 kernel32: Update arch availability for Rtl* forwards to ntdll.
Some functions aren't available in real kernel32.dll on i386, even if
they are available in ntdll (and thus are available on x86_64,arm,arm64),
some should be available on more architectures but aren't implemented
in ntdll yet.

Signed-off-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-09 22:02:55 +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
Paul Gofman 3be3f0c0f8 kernel32: Correctly restore protection in set_entry_point().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-02 20:32:51 +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
Alexandre Julliard 97479d3d32 ntdll: Move some exception definitions to winternl.h.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-07 13:52:42 +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