[4/5] ntdll: Remove an invalid test.

Dmitry Timoshkov dmitry at baikal.ru
Tue Nov 22 04:03:11 CST 2011


The test initializers that call GetProcAddress() do write to the same section
where the static buffer resides, which leads to the image section protection
change.
---
 dlls/ntdll/tests/info.c |   13 -------------
 1 files changed, 0 insertions(+), 13 deletions(-)

diff --git a/dlls/ntdll/tests/info.c b/dlls/ntdll/tests/info.c
index ec1ce3d..45d54c1 100644
--- a/dlls/ntdll/tests/info.c
+++ b/dlls/ntdll/tests/info.c
@@ -1220,7 +1220,6 @@ static void test_queryvirtualmemory(void)
     SIZE_T readcount;
     static const char teststring[] = "test string";
     static char datatestbuf[42] = "abc";
-    static char rwtestbuf[42];
     MEMORY_BASIC_INFORMATION mbi;
     char stackbuf[42];
     HMODULE module;
@@ -1284,18 +1283,6 @@ static void test_queryvirtualmemory(void)
     ok (mbi.State == MEM_COMMIT, "mbi.State is 0x%x, expected 0x%X\n", mbi.State, MEM_COMMIT);
     ok (mbi.Protect == PAGE_READWRITE || mbi.Protect == PAGE_WRITECOPY,
         "mbi.Protect is 0x%x\n", mbi.Protect);
-
-    trace("Check flags of read-write uninitialized data (.bss) at %p\n", rwtestbuf);
-    status = pNtQueryVirtualMemory(NtCurrentProcess(), rwtestbuf, MemoryBasicInformation, &mbi, sizeof(MEMORY_BASIC_INFORMATION), &readcount);
-    ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status);
-    ok( readcount == sizeof(MEMORY_BASIC_INFORMATION), "Expected to read %d bytes, got %ld\n",(int)sizeof(MEMORY_BASIC_INFORMATION),readcount);
-    if (mbi.AllocationBase == module)
-    {
-        ok (mbi.AllocationProtect == PAGE_EXECUTE_WRITECOPY, "mbi.AllocationProtect is 0x%x, expected 0x%x\n", mbi.AllocationProtect, PAGE_EXECUTE_WRITECOPY);
-        ok (mbi.State == MEM_COMMIT, "mbi.State is 0x%x, expected 0x%X\n", mbi.State, MEM_COMMIT);
-        ok (mbi.Protect == PAGE_READWRITE, "mbi.Protect is 0x%x, expected 0x%X\n", mbi.Protect, PAGE_READWRITE);
-    }
-    else skip( "bss is outside of module\n" );  /* this can happen on Mac OS */
 }
 
 static void test_affinity(void)
-- 
1.7.7.2




More information about the wine-patches mailing list