https://git.reactos.org/?p=reactos.git;a=commitdiff;h=96960b6e182beed8d18e3…
commit 96960b6e182beed8d18e38c4d8150840ed7e010b
Author: Amine Khaldi <amine.khaldi(a)reactos.org>
AuthorDate: Fri Jan 19 12:30:38 2018 +0100
Commit: Amine Khaldi <amine.khaldi(a)reactos.org>
CommitDate: Fri Jan 19 12:30:38 2018 +0100
[MPR_WINETEST] Sync with Wine 3.0. CORE-14225
---
modules/rostests/winetests/mpr/mpr.c | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/modules/rostests/winetests/mpr/mpr.c b/modules/rostests/winetests/mpr/mpr.c
index 19097b8a28..330e66bf89 100644
--- a/modules/rostests/winetests/mpr/mpr.c
+++ b/modules/rostests/winetests/mpr/mpr.c
@@ -55,7 +55,7 @@ static void test_WNetGetUniversalName(void)
ret = WNetGetUniversalNameA(driveA, UNIVERSAL_NAME_INFO_LEVEL,
buffer, &fail_size);
if(drive_type == DRIVE_REMOTE)
- todo_wine ok(ret == WN_BAD_VALUE, "WNetGetUniversalNameA failed:
%08x\n", ret);
+ todo_wine ok(ret == WN_BAD_VALUE || ret == WN_MORE_DATA,
"WNetGetUniversalNameA failed: %08x\n", ret);
else
ok(ret == WN_NOT_CONNECTED || ret == WN_NO_NET_OR_BAD_PATH,
"(%s) WNetGetUniversalNameW gave wrong error: %u\n", driveA,
ret);
@@ -101,23 +101,25 @@ static void test_WNetGetRemoteName(void)
info_size = sizeof(buffer);
ret = WNetGetUniversalNameA(driveA, REMOTE_NAME_INFO_LEVEL,
buffer, &info_size);
+ todo_wine{
if(drive_type == DRIVE_REMOTE)
- todo_wine
ok(ret == WN_NO_ERROR, "WNetGetUniversalNameA failed: %08x\n",
ret);
else
ok(ret == WN_NOT_CONNECTED || ret == WN_NO_NET_OR_BAD_PATH,
"(%s) WNetGetUniversalNameA gave wrong error: %u\n", driveA,
ret);
+ }
ok(info_size == sizeof(buffer), "Got wrong size: %u\n", info_size);
fail_size = 0;
ret = WNetGetUniversalNameA(driveA, REMOTE_NAME_INFO_LEVEL,
buffer, &fail_size);
+ todo_wine{
if(drive_type == DRIVE_REMOTE)
- todo_wine
- ok(ret == WN_BAD_VALUE, "WNetGetUniversalNameA failed: %08x\n",
ret);
+ ok(ret == WN_BAD_VALUE || ret == WN_MORE_DATA, "WNetGetUniversalNameA
failed: %08x\n", ret);
else
ok(ret == WN_NOT_CONNECTED || ret == WN_NO_NET_OR_BAD_PATH,
"(%s) WNetGetUniversalNameA gave wrong error: %u\n", driveA,
ret);
+ }
ret = WNetGetUniversalNameA(driveA, REMOTE_NAME_INFO_LEVEL,
buffer, NULL);
todo_wine ok(ret == WN_BAD_POINTER, "WNetGetUniversalNameA failed:
%08x\n", ret);
@@ -125,12 +127,13 @@ static void test_WNetGetRemoteName(void)
ret = WNetGetUniversalNameA(driveA, REMOTE_NAME_INFO_LEVEL,
NULL, &info_size);
+ todo_wine {
if(drive_type == DRIVE_REMOTE)
- todo_wine
- ok(ret == WN_BAD_POINTER, "WNetGetUniversalNameA failed: %08x\n",
ret);
+ ok(ret == WN_BAD_POINTER || ret == WN_BAD_VALUE, "WNetGetUniversalNameA
failed: %08x\n", ret);
else
ok(ret == WN_NOT_CONNECTED || ret == WN_BAD_VALUE,
"(%s) WNetGetUniversalNameA gave wrong error: %u\n", driveA,
ret);
+ }
fail_size = sizeof(driveA) / sizeof(char) - 1;
ret = WNetGetUniversalNameA(driveA, REMOTE_NAME_INFO_LEVEL,
@@ -281,8 +284,9 @@ static void test_WNetUseConnection(void)
strcpy(netRes->lpRemoteName, "\\\\127.0.0.1\\c$");
bufSize = 0;
ret = pWNetUseConnectionA(NULL, netRes, NULL, NULL, 0, NULL, &bufSize,
&outRes);
- if (ret == ERROR_ALREADY_ASSIGNED) continue;
+ if (ret != ERROR_ALREADY_ASSIGNED) break;
}
+ if (ret == ERROR_ALREADY_ASSIGNED) goto end; /* no drives available */
todo_wine ok(ret == WN_SUCCESS, "Unexpected return: %u\n", ret);
ok(bufSize == 0, "Unexpected buffer size: %u\n", bufSize);
if (ret == WN_SUCCESS) WNetCancelConnectionA(drive, TRUE);
@@ -307,6 +311,7 @@ static void test_WNetUseConnection(void)
ok(bufSize == 4, "Unexpected buffer size: %u\n", bufSize);
if (ret == WN_SUCCESS) WNetCancelConnectionA(drive, TRUE);
+end:
HeapFree(GetProcessHeap(), 0, netRes);
}