Commit Graph

31 Commits

Author SHA1 Message Date
Alexandre Julliard 0907d8cc6d ntdll/tests: Fix a test failure on older Windows versions.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52069
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-22 22:20:50 +01:00
Alexandre Julliard 7d2a7b94aa ntdll: Fix handling of zero size with MEM_DECOMMIT.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52023
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-19 11:17:24 +01:00
Francois Gouget dc94b03799 ntdll/tests: Fix the XState AllFeatureSize check on old CPUs.
On old CPUs lacking XSAVEC, Windows 8+ does not set AllFeatureSize and
AllFeatures.

Wine-Bug: https://bugs.winehq.org//show_bug.cgi?id=51188
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-28 21:54:03 +02:00
Paul Gofman eefce9dcb9 ntdll/tests: Don't consider zero 'AllFeatures' value in USD broken.
Both variants are observed on different computers with Win10.

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-27 16:14:47 +02:00
Paul Gofman 2fac2e6b32 ntdll/tests: Do not test old xstate structure details in test_user_shared_data().
Fixes test failures on 32 bit Testbot machines.

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-26 21:29:37 +02:00
Rémi Bernon b44fb883b0 ntdll/tests: Check that creating huge thread stacks works.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-07 22:22:49 +02:00
Alexandre Julliard 40165dfa58 ntdll: RtlCreateUserThread() also takes a zero_bits parameter.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-07 22:22:49 +02:00
Alexandre Julliard 87b7132b37 ntdll: Implement RtlFindExportedRoutineByName().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-05 21:52:22 +02:00
Rémi Bernon 94dcca8a0e ntdll/tests: Add committed / reserved thread stack sizes tests.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-21 09:35:04 +02:00
Alexandre Julliard 043489456c ntdll: Make x86_64 syscall thunks position independent.
Based on a patch by Paul Gofman.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-25 21:39:19 +01:00
Myah Caron d453db5ba2 ntdll: Stub NtAllocateVirtualMemoryEx.
Signed-off-by: Myah Caron <qsniyg@protonmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-26 20:34:19 +01:00
Paul Gofman 7ec069d85f ntdll/tests: Fix virtual test failures on win10pro.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-07 21:09:36 +02:00
Paul Gofman a4af2b2b70 kernel32: Implement GetEnabledXStateFeatures().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-20 21:14:15 +02:00
Paul Gofman 97b5ad7597 wineboot: Initialize XState features in user_shared_data.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-20 18:50:02 +02:00
Paul Gofman ca56ef6739 ntdll: Fill ActiveGroupCount field in _KUSER_SHARED_DATA.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-25 20:23:31 +02:00
Paul Gofman 1306bd941b ntdll: Fill ActiveProcessorCount field in _KUSER_SHARED_DATA.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-25 20:23:29 +02:00
Paul Gofman fc8e9bac5f ntdll: Report rdtsc processor feature if supported.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48386
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-17 20:26:56 +01:00
Paul Gofman 9689d07740 ntdll: Fill NumberOfPhysicalPages field in user shared data area.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48387
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-17 20:26:45 +01:00
Rémi Bernon 8a765533d6 ntdll: Implement zero_bits parameter in virtual alloc functions.
Use alloc_area.limit field to limit the search in reserved areas to the
desired memory range, or call find_free_area to get a pointer to a free
memory region which matches the zero_bits constraint, then mmap it with
MAP_FIXED flag.

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:29:45 +02:00
Rémi Bernon f172dd03ff ntdll/tests: Update zero_bits > 31 test case to validate bitmask behavior.
Only the leading zeroes are taken into account, so 0x1aaaaaaa zero_bits
behaves as 0x1fffffff

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:46 +02:00
Rémi Bernon 54ba6b0ce5 ntdll/tests: Use MEM_TOP_DOWN parameter to consistently fail zero_bits tests.
The todo_wine_if made the tests not really test anything, and one test
was succeeding when it shouldn't. Now we can actually remove the todo
when 1 zero_bits handling is implemented.

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:33 +02:00
Rémi Bernon 3cdb5072e8 ntdll/tests: Factor WoW64 checks and add is_win64 constant.
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:27 +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
Rémi Bernon be48a56e70 ntdll: Clarify NtMapViewOfSection zero_bits parameter semantics.
See 00451d5edf.

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:42 +02:00
Rémi Bernon bec9a63f7a ntdll/tests: Add more NtMapViewOfSection tests with zero_bits.
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:42 +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 3acc123ed3 ntdll/tests: Cleanup NtAllocateVirtualMemory related 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:23:03 +02:00
Zebediah Figura 16eb17bb0a ntdll/tests: Add tests for RtlCreateUserStack().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-17 20:52:34 +02:00
Rémi Bernon 00451d5edf ntdll: Clarify NtAllocateVirtualMemory zero_bits parameter semantics.
This parameter was misinterpreted as an alignment parameter for the
lower bits of the allocated memory region, although it is a constraint
on the higher bits.

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-13 20:55:35 +02:00
Rémi Bernon 8878492d3b ntdll/tests: Add NtAllocateVirtualMemory tests for zero_bits behavior.
The zero_bits parameter doesn't behave as expected, and some 64bit code
use it to allocate memory in the lower 32bit address space.

The expected full behaviour is:

* zero_bits == 0: no constraint on address range
* 0 < zero_bits <= 15: returned address should have as many upper bits
                       set to 0, starting at bit 31. In 64bit mode,
                       upper 32bits should all be 0 as well.
* 15 < zero_bits <= 31: unsure, but probably same as zero_bits == 15.
* zero_bits > 31: (64bit/WoW64 only) zero_bits behaves as a bitmask, as
                  if it was set to the number of leading 0 in the
                  bitmask, works in the whole 64bit range.

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:49 +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