msvcrt: Fixed (_w)fopen_s with test. (try 3)

Austin English austinenglish at gmail.com
Wed Nov 10 15:15:45 CST 2010


On Wed, Nov 10, 2010 at 11:49 AM, Marvin <testbot at testbot.winehq.org> wrote:
> Hi,
>
> While running your changed tests on Windows, I think I found new failures.
> Being a bot and all I'm not very good at pattern recognition, so I might be
> wrong, but could you please double-check?
> Full results can be found at
> http://testbot.winehq.org/JobDetails.pl?Key=6935
>
> Your paranoid android.
>
>
> === W98SE (32 bit file) ===
> file.c:999: Test failed: smaller size block: Wrong error data ()
> file.c:1007: Test failed: smaller size block: Stdout file shouldn't contain data

It's a difference in compiler version (the failed lines aren't
affected by this change). I can trigger the same failure with just:
diff --git a/dlls/msvcrt/tests/file.c b/dlls/msvcrt/tests/file.c
index ef7b28d..73c3484 100644
--- a/dlls/msvcrt/tests/file.c
+++ b/dlls/msvcrt/tests/file.c
@@ -36,6 +36,15 @@

 static HANDLE proc_handles[2];

+static int (__cdecl *p_fopen_s)(FILE**, const char*, const char*);
+
+static void init(void)
+{
+    HMODULE hmod = GetModuleHandleA("msvcrt.dll");
+
+    p_fopen_s = (void*)GetProcAddress(hmod, "fopen_s");
+}
+
 static void test_filbuf( void )
 {
     FILE *fp;

see https://testbot.winehq.org/JobDetails.pl?Key=6957

I also tried with Eryk's test changes, cross compiled with
austin at aw21 ~/wine-git/dlls/msvcrt/tests $ i686-pc-mingw32-gcc --version
i686-pc-mingw32-gcc (Gentoo 4.5.1 p1.2, pie-0.4.5) 4.5.1
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

and that worked fine:
https://testbot.winehq.org/JobDetails.pl?Key=6963

So if the only reason for rejecting was the test failures, please
apply the patch :-).

-- 
-Austin



More information about the wine-devel mailing list