Piotr Caban : ucrtbase: Fix fopen x mode test failures.
Alexandre Julliard
julliard at winehq.org
Fri Feb 25 07:30:26 CST 2022
Module: wine
Branch: oldstable
Commit: 56b6abd5ea9cff53d1fd06e6aacb8173bc48c5cb
URL: https://source.winehq.org/git/wine.git/?a=commit;h=56b6abd5ea9cff53d1fd06e6aacb8173bc48c5cb
Author: Piotr Caban <piotr at codeweavers.com>
Date: Mon Oct 18 14:57:29 2021 +0200
ucrtbase: Fix fopen x mode test failures.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51894
Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit 658473332756991b2db05dd3fa70ea6dcc520750)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
---
dlls/ucrtbase/tests/misc.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/dlls/ucrtbase/tests/misc.c b/dlls/ucrtbase/tests/misc.c
index 8dc1a1b2f8e..876b0f7b989 100644
--- a/dlls/ucrtbase/tests/misc.c
+++ b/dlls/ucrtbase/tests/misc.c
@@ -1377,17 +1377,18 @@ static void test_fopen_exclusive( void )
DWORD len;
FILE *fp;
- if (!GetProcAddress(GetModuleHandleA("ucrtbase.dll"), "__std_terminate"))
- {
- win_skip("skipping fopen x mode tests.\n");
- return;
- }
-
len = GetTempPathA(MAX_PATH, path);
ok(len, "GetTempPathA failed\n");
strcat(path, "\\fileexcl.tst");
+ SET_EXPECT(global_invalid_parameter_handler);
fp = fopen(path, "wx");
+ if(called_global_invalid_parameter_handler)
+ {
+ win_skip("skipping fopen x mode tests.\n");
+ return;
+ }
+ expect_global_invalid_parameter_handler = FALSE;
ok(fp != NULL, "creating file with mode wx failed\n");
fclose(fp);
@@ -1414,7 +1415,7 @@ static void test_fopen_exclusive( void )
ok(!fp, "creating file with mode xw succeeded\n");
fp = fopen(path, "wbx");
- ok(fp != NULL, "creating file with mode wx failed\n");
+ ok(fp != NULL, "creating file with mode wbx failed\n");
fclose(fp);
unlink(path);
}
More information about the wine-cvs
mailing list