[Wine-devel] Eter's patch is applied to winehq repo 04/13/12

builder на builder.office.etersoft.ru builder на builder.office.etersoft.ru
Пт Апр 13 20:20:38 MSK 2012


New Etersoft's patches since last build time:
commit e01643af9c2d6ee61905585d1ae44436efbfbb1b
Author: Alexander Morozov <amorozov на etersoft.ru>

    kernel32/tests: Add a test for creating named mapping after closing without unmapping.

---

commit e01643af9c2d6ee61905585d1ae44436efbfbb1b
Author: Alexander Morozov <amorozov на etersoft.ru>
Date:   Thu Apr 12 20:14:14 2012 +0400

    kernel32/tests: Add a test for creating named mapping after closing without unmapping.

diff --git a/dlls/kernel32/tests/virtual.c b/dlls/kernel32/tests/virtual.c
index d502bbf..2c3f22d 100644
--- a/dlls/kernel32/tests/virtual.c
+++ b/dlls/kernel32/tests/virtual.c
@@ -780,6 +780,38 @@ static void test_MapViewOfFile(void)
        "got %u, expected ERROR_INVALID_ADDRESS\n", GetLastError());
 
     ok( VirtualFree(addr, 0, MEM_RELEASE), "VirtualFree failed\n" );
+
+    /* close named mapping handle without unmapping */
+    name = "Foo";
+    SetLastError(0xdeadbeef);
+    mapping = CreateFileMappingA(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, MAPPING_SIZE, name);
+    ok( mapping != 0, "CreateFileMappingA failed with error %d\n", GetLastError() );
+    SetLastError(0xdeadbeef);
+    ptr = MapViewOfFile(mapping, FILE_MAP_WRITE, 0, 0, 0);
+    ok( ptr != NULL, "MapViewOfFile failed with error %d\n", GetLastError() );
+    SetLastError(0xdeadbeef);
+    map2 = OpenFileMappingA(FILE_MAP_READ, FALSE, name);
+    ok( map2 != 0, "OpenFileMappingA failed with error %d\n", GetLastError() );
+    CloseHandle(map2);
+    CloseHandle(mapping);
+
+    SetLastError(0xdeadbeef);
+    map2 = OpenFileMappingA(FILE_MAP_READ, FALSE, name);
+    todo_wine
+    ok( map2 == 0, "OpenFileMappingA succeeded\n" );
+    todo_wine
+    ok( GetLastError() == ERROR_FILE_NOT_FOUND, "OpenFileMappingA set error %d\n", GetLastError() );
+    CloseHandle(map2);
+    SetLastError(0xdeadbeef);
+    mapping = CreateFileMappingA(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, MAPPING_SIZE, name);
+    ok( mapping != 0, "CreateFileMappingA failed\n" );
+    todo_wine
+    ok( GetLastError() == ERROR_SUCCESS, "CreateFileMappingA set error %d\n", GetLastError() );
+    CloseHandle(mapping);
+
+    SetLastError(0xdeadbeef);
+    ret = UnmapViewOfFile(ptr);
+    ok( ret, "UnmapViewOfFile failed with error %d\n", GetLastError() );
 }
 
 static void test_NtMapViewOfSection(void)


Подробная информация о списке рассылки Wine-devel