Alexandre Julliard : psapi/tests: Handle an error that happens on Win2k.

Alexandre Julliard julliard at winehq.org
Fri Feb 5 08:42:31 CST 2010


Module: wine
Branch: master
Commit: c7f7d1985eabf1fb31302b4c2c5d990aa2733d3a
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=c7f7d1985eabf1fb31302b4c2c5d990aa2733d3a

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Fri Feb  5 11:39:24 2010 +0100

psapi/tests: Handle an error that happens on Win2k.

---

 dlls/psapi/tests/psapi_main.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/dlls/psapi/tests/psapi_main.c b/dlls/psapi/tests/psapi_main.c
index 6ef5b04..21a3d1a 100644
--- a/dlls/psapi/tests/psapi_main.c
+++ b/dlls/psapi/tests/psapi_main.c
@@ -157,8 +157,12 @@ static void test_GetMappedFileName(void)
     
     w32_err(pGetMappedFileNameA(NULL, hMod, szMapPath, sizeof(szMapPath)), ERROR_INVALID_HANDLE);
     w32_err(pGetMappedFileNameA(hpSR, hMod, szMapPath, sizeof(szMapPath)), ERROR_ACCESS_DENIED);
-    if(!w32_suc(ret = pGetMappedFileNameA(hpQI, hMod, szMapPath, sizeof(szMapPath))))
-        return;
+
+    SetLastError( 0xdeadbeef );
+    ret = pGetMappedFileNameA(hpQI, hMod, szMapPath, sizeof(szMapPath));
+    ok( ret || broken(GetLastError() == ERROR_UNEXP_NET_ERR), /* win2k */
+        "GetMappedFileNameA failed with error %u\n", GetLastError() );
+    if (!ret) return;
     ok(ret == strlen(szMapPath), "szMapPath=\"%s\" ret=%d\n", szMapPath, ret);
     ok(szMapPath[0] == '\\', "szMapPath=\"%s\"\n", szMapPath);
     szMapBaseName = strrchr(szMapPath, '\\'); /* That's close enough for us */




More information about the wine-cvs mailing list