kernel32: Skip the PE loader test under a Win9x platform

Dmitry Timoshkov dmitry at codeweavers.com
Fri Dec 1 04:09:56 CST 2006


Hello,

according to
http://test.winehq.org/data/200611301000/98_PV-W98SE-Full/kernel32:loader.txt
the PE loader test is meaningless under a Win9x platform since the PE loader
behaviour is very different there in comparison to NT based platforms.

Changelog:
    kernel32: Skip the PE loader test under a Win9x platform.

--- a/dlls/kernel32/tests/loader.c	Tue Nov 28 12:28:54 2006
+++ b/dlls/kernel32/tests/loader.c	Fri Dec 01 10:03:42 2006
@@ -321,7 +321,7 @@ todo_wine {
             ok(FreeLibrary(hlib), "FreeLibrary error %d\n", GetLastError());
         }
         else
-        {
+        {   /* LoadLibrary has failed */
             if (hlib) /* remove completely once Wine is fixed */
             {
                 todo_wine ok(!hlib, "%d: LoadLibrary should fail\n", i);
@@ -331,6 +331,13 @@ todo_wine {
             }
 
             ok(!hlib, "%d: LoadLibrary should fail\n", i);
+
+            if (GetLastError() == ERROR_GEN_FAILURE) /* Win9x, broken behaviour */
+            {
+                trace("skipping the loader test on Win9x\n");
+                DeleteFile(dll_name);
+                return;
+            }
 
             ok(td[i].error == GetLastError(), "%d: expected error %d, got %d\n",
                i, td[i].error, GetLastError());





More information about the wine-patches mailing list