From e23904ceb9fae21f7c6d4819be27dd52e90fa8bf Mon Sep 17 00:00:00 2001 From: Paul Vriens Date: Sat, 20 Sep 2008 16:49:32 +0200 Subject: [PATCH] kernel32/tests: Fix tests on NT4. --- dlls/kernel32/tests/file.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dlls/kernel32/tests/file.c b/dlls/kernel32/tests/file.c index 1686a4a82c9..70b2c0b52e8 100644 --- a/dlls/kernel32/tests/file.c +++ b/dlls/kernel32/tests/file.c @@ -1560,12 +1560,16 @@ static void test_MapFile(void) ok( GetLastError() == ERROR_FILE_INVALID, "not ERROR_FILE_INVALID\n"); hmap = CreateFileMapping( handle, NULL, PAGE_READWRITE, 0x80000000, 0, NULL ); - ok( hmap == NULL, "mapping should fail\n"); + ok( hmap == NULL || broken(hmap != NULL) /* NT4 */, "mapping should fail\n"); /* GetLastError() varies between win9x and WinNT and also depends on the filesystem */ + if ( hmap ) + CloseHandle( hmap ); hmap = CreateFileMapping( handle, NULL, PAGE_READWRITE, 0x80000000, 0x10000, NULL ); - ok( hmap == NULL, "mapping should fail\n"); + ok( hmap == NULL || broken(hmap != NULL) /* NT4 */, "mapping should fail\n"); /* GetLastError() varies between win9x and WinNT and also depends on the filesystem */ + if ( hmap ) + CloseHandle( hmap ); /* On XP you can now map again, on Win 95 you cannot. */ -- 2.11.4.GIT