Commit Graph

139 Commits

Author SHA1 Message Date
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
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
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
Michael Stefaniuc 80be3a460b kernel32/tests: Use the available ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-27 22:02:48 +02:00
Alexandre Julliard d108ff79d5 ntdll: NtQuerySection takes SIZE_T parameters.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-28 13:06:43 +01:00
Alexandre Julliard 5fa8713ddc ntdll: No longer store the mapping handle with the view.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-26 17:01:45 +02:00
Alexandre Julliard 6eec34a9ed kernel32/tests: Add more WRITECOPY tests.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-25 23:29:07 +02:00
Alexandre Julliard 0494f03649 kernel32/tests: Fix some confusing WRITECOPY tests.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-25 23:29:00 +02:00
Alexandre Julliard 51d348c8c2 ntdll: Add helpers to lock the user output buffer during file reads.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-22 15:10:42 +02:00
Alexandre Julliard a20c4e11df ntdll: Add a helper to lock the user output buffer during a server call.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-22 15:10:21 +02:00
Alexandre Julliard 2b0725f95a kernel32/tests: Add some more tests for write watches.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-21 19:50:21 +02:00
Alexandre Julliard f448be618b ntdll: Verify page protection against the mapping protections in VirtualAlloc and VirtualProtect.
This partially reverts 3a5ee02735.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-12 20:32:01 +02:00
Alexandre Julliard 94872cc84f ntdll: Fix access rights checks for mapping objects.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-12 20:32:01 +02:00
Alexandre Julliard d6b523e69f kernel32/tests: Also run mapping tests against an executable image.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-11 16:51:37 +02:00
Alexandre Julliard c88a858eca kernel32/tests: Also run mapping tests against an anonymous mapping.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-11 15:52:39 +02:00
Alexandre Julliard 1caf95d1ad kernel32/tests: Fix mapping protection tests to succeed on recent Windows versions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-11 15:52:39 +02:00
Alexandre Julliard 9b85cebf05 kernel32/tests: Retrieve the page size only once.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-11 11:20:23 +02:00
Alexandre Julliard 26c59d845e ntdll: Ignore attempts to commit pages in an already committed anonymous mapping.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-08 16:23:15 +02:00
Alexandre Julliard 08acac0864 ntdll: Disallow changing PAGE_NOCACHE flag for individual pages.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-08 16:23:15 +02:00
Alexandre Julliard e5c39a565a server: Enforce valid flags for file mappings.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-08 16:23:14 +02:00
Akihiro Sagawa 1afb369380 ntdll: Zero bits parameter must be less than 21.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-31 20:51:46 +02:00
Akihiro Sagawa 5bd58bb275 kernel32/tests: Add more tests related to the zero_bits parameter.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-31 20:51:46 +02:00
Michael Stefaniuc 3bc7549f42 kernel32/tests: Remove another identical if/else branch.
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-10 12:54:16 +09:00
Alexandre Julliard ef716e9d1e server: Don't grow the mapped file for read-only mappings.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-27 22:21:07 +09:00
Alexandre Julliard 32c7153fdb server: Avoid rounding mapping sizes on the server side.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-27 17:03:03 +09:00
Francois Gouget b54a8dda84 kernel32/tests: Remove a trailing space from an ok() call message.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-26 23:59:20 +09:00
Alexandre Julliard 6f0979b983 ntdll: Implement the SectionImageInformation class of NtQuerySection.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-26 20:33:16 +09:00
Alexandre Julliard 2602df14d8 ntdll: Implement the SectionBasicInformation class of NtQuerySection.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-26 20:32:10 +09:00
Alexandre Julliard 4832adf8f9 kernel32/tests: Remove some win9x compatibility cruft.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-25 23:15:49 +09:00
Michael Müller 1311c8157b ntdll: NtUnmapViewOfSection should succeed for all offsets within the mapped range.
Signed-off-by: Michael Müller <michael@fds-team.de>
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-19 22:03:21 +09:00
Michael Müller 38d4935007 kernel32/tests: Add tests for UnmapViewOfFile with unaligned pointer.
Signed-off-by: Michael Müller <michael@fds-team.de>
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-19 22:03:21 +09:00
Francois Gouget 2bd154d838 kernel32/tests: Fix a spelling typo in a virtual comment.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-16 15:33:07 +09:00
Sebastian Lackner 99130182ba kernel32/tests: Port stack commit tests to x86_64.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-15 17:57:04 +09:00
Sebastian Lackner 2aee9b1ee3 kernel32/tests: Use inline implementation of NtCurrentTeb for virtual tests.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-15 17:57:01 +09:00
Alexandre Julliard 2dd01087f2 kernel32/tests: Use Interlocked functions to avoid fault counters being optimized out.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-22 00:36:28 +09:00
Frédéric Delanoy 5da69565b5 kernel32/tests: Use todo_wine_if() in tests.
Signed-off-by: Frédéric Delanoy <frederic.delanoy@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-18 00:22:04 +09:00
Sebastian Lackner f94755f719 kernel32/tests: Fix flags passed to VirtualFree in multiple tests.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-14 12:39:13 +09:00
Sebastian Lackner 1e624c5aaa kernel32/tests: Ensure VirtualAlloc tests do not depend on previous memory allocations.
Following tests try to allocate memory at (char *)addr1 + 0x1000.
We expect that no memory is mapped at this location.

Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-14 12:38:55 +09:00
Sebastian Lackner 24641d8e44 kernel32/tests: Add a test to show that VirtualFree fails with type MEM_FREE.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-14 12:38:26 +09:00
Sebastian Lackner 0346040889 kernel32/tests: Add tests for committing stack guard pages.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-30 23:16:49 +09:00
Sebastian Lackner 536d7d98fe kernel32/tests: Add tests for triggering write watches in asynchronous ReadFile call.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-25 15:19:21 +09:00
Sebastian Lackner d082ea3eab ntdll: Implement support for AT_ROUND_TO_PAGE flag in NtMapViewOfSection. 2015-06-26 20:35:05 +09:00
Sebastian Lackner 7a8470ea94 ntdll: NtMapViewOfSection should fail if both addr_ptr and zero_bits is set. 2015-06-26 20:35:05 +09:00
Sebastian Lackner 8ddab2c2f4 ntdll: Fix status code when NtMapViewOfSection parameter check fails. 2015-06-08 15:34:04 +09:00
Sebastian Lackner 5204d89dc9 kernel32/tests: Add tests for virtual memory alignment behaviour.
AT_ROUND_TO_PAGE is only available on 32-bit non-wow64 systems.
2015-06-08 15:33:59 +09:00
Sebastian Lackner ee6a477cab ntdll: Return failure in NtProtectVirtualMemory when last argument is omitted. 2015-05-05 23:15:31 +09:00
Sebastian Lackner 152b575eed kernel32/tests: Add tests for calling VirtualProtect with NULL as last argument. 2015-05-04 20:07:51 +09:00
Francois Gouget ea932fbcc1 Assorted spelling fixes. 2014-12-05 20:47:45 +01:00