kernel32/tests: Allow failure when loading the 268 bytes minimal PE image.

Windows 10 1809+ rejects this minimal image so allow ERROR_BAD_EXE_FORMAT
as a valid result.
Also adjust the comment to reflect the range of Windows versions that
usually accept this image and note that there are some exceptions which
means there are other unidentified factors at play.

Wine-Bug: https://bugs.winehq.org//show_bug.cgi?id=51185
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Francois Gouget 2021-07-19 14:23:41 +02:00 committed by Alexandre Julliard
parent 7dc02dcd07
commit 542dc085c9
1 changed files with 5 additions and 2 deletions

View File

@ -860,7 +860,10 @@ static void test_Loader(void)
0,
{ ERROR_SUCCESS, ERROR_BAD_EXE_FORMAT } /* vista is more strict */
},
/* Minimal PE image that Windows7 is able to load: 268 bytes */
/* Minimal PE image initially created for Windows 7 and accepted from
* Vista up to Windows 10 1709 with some unexplained exceptions:
* 268 bytes
*/
{ 0x04,
0, 0xf0, /* optional header size just forces 0xf0 bytes to be written,
0 or another number don't change the behaviour, what really
@ -868,7 +871,7 @@ static void test_Loader(void)
0x04 /* also serves as e_lfanew in the truncated MZ header */, 0x04,
0x40, /* minimal image size that Windows7 accepts */
0,
{ ERROR_SUCCESS }
{ ERROR_SUCCESS, ERROR_BAD_EXE_FORMAT } /* rejected by win10 1809+ */
},
/* the following data mimics the PE image which 8k demos have */
{ 0x04,