[PATCH v2 2/8] ntdll/tests: Move several NtMapViewOfSection tests from kernel32/tests

Huw Davies huw at codeweavers.com
Mon Jun 17 05:07:15 CDT 2019


On Mon, Jun 17, 2019 at 11:52:15AM +0200, Rémi Bernon wrote:
> On Mon, 2019-06-17 at 10:41 +0100, Huw Davies wrote:
> > On Fri, Jun 14, 2019 at 03:11:11PM +0200, Rémi Bernon wrote:
> > > Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
> > > ---
> > >  dlls/kernel32/tests/virtual.c | 159 ----------------------------
> > >  dlls/ntdll/tests/virtual.c    | 188
> > > ++++++++++++++++++++++++++++++++++
> > >  2 files changed, 188 insertions(+), 159 deletions(-)
> > > 
> > > diff --git a/dlls/kernel32/tests/virtual.c
> > > b/dlls/kernel32/tests/virtual.c
> > > index 47e61566c9c..4b37dbcadc5 100644
> > > --- a/dlls/kernel32/tests/virtual.c
> > > +++ b/dlls/kernel32/tests/virtual.c
> > > @@ -1260,165 +1260,6 @@ static void test_NtMapViewOfSection(void)
> > >      ok( result == sizeof(buffer), "ReadProcessMemory didn't read
> > > all data (%lx)\n", result );
> > >      ok( !memcmp( buffer, data, sizeof(buffer) ), "Wrong data
> > > read\n" );
> > 
> > Let's move all of test_NtMapViewOfSection to the ntdll tests and keep
> > their
> > cross-process nature too.
> > 
> > Huw.
> 
> The idea was to keep ReadProcessMemory test in kernel32 as it belongs
> to it, and make all ntdll tests using ntdll functions only. Plus the
> zero bits tests don't really have anything to do with cross process.

The test is really about whether NtMapViewOfSection() can create a
cross-process view.  ReadProcessMemory() is used to test that.
Moving to ntdll and using NtReadVirtualMemory() will keep the
tests together.

Yes, if you want to make the zero_bits stuff process local, that's
ok, but once the cross-process stuff is in place it's almost easier
just to use it.

Huw.



More information about the wine-devel mailing list