Piotr Caban : msvcp140: Fix _Winerror_map test failures.
Alexandre Julliard
julliard at winehq.org
Fri Nov 19 15:45:32 CST 2021
Module: wine
Branch: master
Commit: c90d72588e65916f29694f9b56f060281e3ee276
URL: https://source.winehq.org/git/wine.git/?a=commit;h=c90d72588e65916f29694f9b56f060281e3ee276
Author: Piotr Caban <piotr at codeweavers.com>
Date: Fri Nov 19 13:26:25 2021 +0100
msvcp140: Fix _Winerror_map test failures.
Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/msvcp140/tests/msvcp140.c | 5 +++--
dlls/msvcp90/misc.c | 2 +-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/dlls/msvcp140/tests/msvcp140.c b/dlls/msvcp140/tests/msvcp140.c
index 31c8cfc4f59..c79e425190b 100644
--- a/dlls/msvcp140/tests/msvcp140.c
+++ b/dlls/msvcp140/tests/msvcp140.c
@@ -1270,6 +1270,7 @@ static void test__Winerror_map(void)
static struct {
int winerr, doserr;
BOOL broken;
+ int broken_doserr;
} tests[] = {
{ERROR_INVALID_FUNCTION, ENOSYS}, {ERROR_FILE_NOT_FOUND, ENOENT},
{ERROR_PATH_NOT_FOUND, ENOENT}, {ERROR_TOO_MANY_OPEN_FILES, EMFILE},
@@ -1285,7 +1286,7 @@ static void test__Winerror_map(void)
{ERROR_FILE_EXISTS, EEXIST}, {ERROR_CANNOT_MAKE, EACCES},
{ERROR_INVALID_PARAMETER, EINVAL, TRUE}, {ERROR_OPEN_FAILED, EIO},
{ERROR_BUFFER_OVERFLOW, ENAMETOOLONG}, {ERROR_DISK_FULL, ENOSPC},
- {ERROR_INVALID_NAME, EINVAL}, {ERROR_NEGATIVE_SEEK, EINVAL},
+ {ERROR_INVALID_NAME, ENOENT, TRUE, EINVAL}, {ERROR_NEGATIVE_SEEK, EINVAL},
{ERROR_BUSY_DRIVE, EBUSY}, {ERROR_DIR_NOT_EMPTY, ENOTEMPTY},
{ERROR_BUSY, EBUSY}, {ERROR_ALREADY_EXISTS, EEXIST},
{ERROR_LOCKED, ENOLCK}, {ERROR_DIRECTORY, EINVAL},
@@ -1313,7 +1314,7 @@ static void test__Winerror_map(void)
for(i=0; i<ARRAY_SIZE(tests); i++)
{
ret = p__Winerror_map(tests[i].winerr);
- ok(ret == tests[i].doserr || broken(tests[i].broken && !ret),
+ ok(ret == tests[i].doserr || broken(tests[i].broken && ret == tests[i].broken_doserr),
"_Winerror_map(%d) returned %d, expected %d\n",
tests[i].winerr, ret, tests[i].doserr);
}
diff --git a/dlls/msvcp90/misc.c b/dlls/msvcp90/misc.c
index 5376d4f2da1..2d309911f10 100644
--- a/dlls/msvcp90/misc.c
+++ b/dlls/msvcp90/misc.c
@@ -216,7 +216,7 @@ static const struct {
{ERROR_FILE_EXISTS, EEXIST}, {ERROR_CANNOT_MAKE, EACCES},
{ERROR_INVALID_PARAMETER, EINVAL}, {ERROR_OPEN_FAILED, EIO},
{ERROR_BUFFER_OVERFLOW, ENAMETOOLONG}, {ERROR_DISK_FULL, ENOSPC},
- {ERROR_INVALID_NAME, EINVAL}, {ERROR_NEGATIVE_SEEK, EINVAL},
+ {ERROR_INVALID_NAME, ENOENT}, {ERROR_NEGATIVE_SEEK, EINVAL},
{ERROR_BUSY_DRIVE, EBUSY}, {ERROR_DIR_NOT_EMPTY, ENOTEMPTY},
{ERROR_BUSY, EBUSY}, {ERROR_ALREADY_EXISTS, EEXIST},
{ERROR_LOCKED, ENOLCK}, {ERROR_DIRECTORY, EINVAL},
More information about the wine-cvs
mailing list