[Bug 17417] New: winetest causes msvcrt:file test to fail
http://bugs.winehq.org/show_bug.cgi?id=17417 Summary: winetest causes msvcrt:file test to fail Product: Wine Version: unspecified Platform: Other OS/Version: other Status: UNCONFIRMED Severity: normal Priority: P2 Component: testcases AssignedTo: wine-bugs(a)winehq.org ReportedBy: austin.lund(a)gmail.com Running the following command: $ ./programs/winetest/winetest -c -o out msvcrt:file && cat out causes msvcrt:file tests to function correctly. However if one runs: $ ./programs/winetest/winetest -c -o out msvcrtd:debug msvcrt:file && cat out Then I get one failure: file.c:1057: Test failed: fstat(stdin) failed: errno=2 file.c:1066: Tests skipped: stdin is not a char device? st_mode=100666 I've had this on many recent versions. Tested with 1.1.15, 1.1.14 and 1.1.13. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=17417 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|testcases |msvcrt Keywords| |download, source, testcase Version|unspecified |1.1.13 -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=17417 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 --- Comment #1 from Austin English <austinenglish(a)gmail.com> 2009-02-16 00:47:02 --- Confirming. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=17417 --- Comment #2 from Austin Lund <austin.lund(a)gmail.com> 2009-02-16 20:22:25 --- I found that on much eariler version this failure didn't happen. The first failing commit is: commit 5f8c3b4a3883c0042ac987d7375e99f5116e009d Author: Francois Gouget <fgouget(a)free.fr> Date: Tue Dec 9 15:18:16 2008 +0100 msvcrt/tests: Stricter fstat() tests. Don't allow fstat() to fail for no reason. Better check the st_mode field. The offending code section is at "static void test_stat(void)" in "dlls/msvcrt/tests/file.c": if (_dup2(0, 10) == 0) { ok(fstat(10, &buf) == 0, "fstat(stdin) failed: errno=%d\n", errno); (duh, the test failure message tells you this too). -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=17417 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |austinenglish(a)gmail.com Keywords| |regression -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=17417 --- Comment #3 from Austin Lund <austin.lund(a)gmail.com> 2009-02-18 00:05:22 --- I've done some more testing on this. $ WINEDEBUG="trace+msvcrt,warn+msvcrt" ./programs/winetest/winetest -o out -c msvcrt:file 2>&1 | grep -A 5 dup trace:msvcrt:MSVCRT__dup2 (od=0, nd=10) trace:msvcrt:msvcrt_alloc_fd_from fdstart is 3, fdend is 11 trace:msvcrt:MSVCRT__fstat64 :fd (10) stat (0x33fc68) trace:msvcrt:MSVCRT__fstat64 :dwFileAttributes = 0x0, mode set to 0x2000 trace:msvcrt:MSVCRT__close :fd (10) handle (0x34) trace:msvcrt:msvcrt_free_fd :fd (10) freed $ WINEDEBUG="trace+msvcrt,warn+msvcrt" ./programs/winetest/winetest -o out -c msvcrtd:debug msvcrt:file 2>&1 | grep -A 5 dup trace:msvcrt:MSVCRT__dup2 (od=0, nd=10) trace:msvcrt:msvcrt_alloc_fd_from fdstart is 3, fdend is 11 trace:msvcrt:MSVCRT__fstat64 :fd (10) stat (0x33fc68) warn:msvcrt:MSVCRT__fstat64 :failed-last error (6) trace:msvcrt:pf_vsnprintf format is L"%s:%d: Test failed" trace:msvcrt:pf_vsnprintf format is L": " Having a look at the code for fstat64, it seems that type = GetFileType(hand); is not returning a type of FILE_TYPE_CHAR. When having a look at the code for GetFileType if (is_console_handle( hFile )) return FILE_TYPE_CHAR; it would seem necessary that a console fd should return FILE_TYPE_CHAR. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=17417 --- Comment #4 from Austin Lund <austin.lund(a)gmail.com> 2009-02-18 00:35:10 --- OK. I was wrong. The handle for the duplicated fd is not a console handle. However, in the failure case NtQueryVolumeInformationFile in GetFileType does not return STATUS_SUCCESS and in the succeeding case it does. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=17417 --- Comment #5 from Austin English <austinenglish(a)gmail.com> 2009-02-18 11:29:42 --- Looks like AJ committed a possible fix: http://source.winehq.org/git/wine.git/?a=commitdiff;h=1c91d54503f9b2afa513dc... -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=17417 --- Comment #6 from Austin Lund <austin.lund(a)gmail.com> 2009-02-18 16:39:04 --- Fixes my test case. (That was quick). -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=17417 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #7 from Alexandre Julliard <julliard(a)winehq.org> 2009-02-18 16:52:01 --- Fixed. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=17417 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC|austinenglish(a)gmail.com | --- Comment #8 from Austin English <austinenglish(a)gmail.com> 2009-02-18 17:20:54 --- (In reply to comment #7)
Fixed.
Yep, passing everywhere today: http://test.winehq.org/data/tests/msvcrt:file.html -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=17417 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #9 from Alexandre Julliard <julliard(a)winehq.org> 2009-02-27 16:31:46 --- Closing bugs fixed in 1.1.16. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
participants (1)
-
wine-bugs@winehq.org