[2/2] kernel32: Add a loader test using minimal PE image that Windows7 is able to load.

Dmitry Timoshkov dmitry at baikal.ru
Mon Jul 13 01:17:32 CDT 2015


---
 dlls/kernel32/tests/loader.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c
index abd17df..b844433 100644
--- a/dlls/kernel32/tests/loader.c
+++ b/dlls/kernel32/tests/loader.c
@@ -375,6 +375,16 @@ static void test_Loader(void)
           1,
           0,
           { ERROR_SUCCESS, ERROR_BAD_EXE_FORMAT } /* vista is more strict */
+        },
+        /* Minimal PE image that Windows7 is able to load: 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
+                      matters is file size regardless of values in the headers */
+          0x04 /* also serves as e_lfanew in the truncated MZ header */, 0x04,
+          0x40, /* minimal image size that Windows7 accepts */
+          0,
+          { ERROR_SUCCESS }
         }
     };
     int i;
-- 
2.4.5




More information about the wine-patches mailing list