[Bug 52620] New: Failed test of `win32_arrays` from `windows-rs`
https://bugs.winehq.org/show_bug.cgi?id=52620 Bug ID: 52620 Summary: Failed test of `win32_arrays` from `windows-rs` Product: Wine Version: 7.2 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs(a)winehq.org Reporter: mikrutrafal(a)protonmail.com Distribution: --- This test pass on Windows 10 Failures ``` failures: ---- keyboard_state stdout ---- thread 'keyboard_state' panicked at 'assertion failed: state != zeroed', crates\tests\win32_arrays\tests\ fixed.rs:9:9 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ---- temp_file stdout ---- thread 'temp_file' panicked at 'assertion failed: `(left == right)` left: `[46, 92, 116, 101, 115, 55, 98, 46, 116, 109, 112, 0]`, right: `[46, 92, 116, 101, 115, 55, 66, 46, 116, 109, 112, 0]`', crates\tests\win32_arrays\tests\fixed.r s:20:9 failures: keyboard_state temp_file ``` Rust for Windows can be installed via https://forge.rust-lang.org/infra/other-installation-methods.html or directly https://static.rust-lang.org/dist/rust-1.59.0-x86_64-pc-windows-gnu.msi Steps to reproduce git clone https://github.com/microsoft/windows-rs.git cd windows-rs cd crates/tests/win32_arrays/ wine cargo test -- 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.
https://bugs.winehq.org/show_bug.cgi?id=52620 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, source, testcase -- 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=52620 Tobi L <tobil4sk@outlook.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tobil4sk@outlook.com --- Comment #1 from Tobi L <tobil4sk@outlook.com> --- The temp_file failure should be fixed with the linked merge request [0]. For the keyboard_state failure, the problem that windows-rs assumes the default state returned by GetKeyboardState will have some non-zero bytes. Running a small sample program in the Compiler Explorer environment [1] gives a few non-zero bytes:
Non-zero bytes: F0: 01 F3: 01 F6: 01 FB: 01
Which are two OEM specific keys, VK_ATTN and VK_ZOOM [2]. I don't know how reliable these non-zero values are. It would probably be difficult to upstream a fix for this. [0] https://gitlab.winehq.org/wine/wine/-/merge_requests/12011 [1] https://godbolt.org/#g:!((g:!((g:!((h:codeEditor,i:(filename:'1',fontScale:14,fontUsePx:'0',j:1,lang:c%2B%2B,selection:(endColumn:1,endLineNumber:25,positionColumn:1,positionLineNumber:25,selectionStartColumn:1,selectionStartLineNumber:25,startColumn:1,startLineNumber:25),source:'%23include+%3Cwindows.h%3E%0A%23include+%3Cstdio.h%3E%0A%23include+%3Cstring.h%3E%0A%0Aint+main()+%7B%0A++++BYTE+zeroed%5B256%5D+%3D+%7B0%7D%3B%0A++++BYTE+state%5B256%5D+%3D+%7B0%7D%3B%0A%0A++++if+(!!GetKeyboardState(state))+%7B%0A++++++++fprintf(stderr,+%22GetKeyboardState+failed.+Error+code:+%25lu%5Cn%22,+GetLastError())%3B%0A++++++++return+1%3B%0A++++%7D%0A%0A++++if+(memcmp(state,+zeroed,+sizeof(state))+%3D%3D+0)+%7B%0A++++++++puts(%22Note:+The+state+array+is+entirely+zeroed+out.%22)%3B%0A++++%7D+else+%7B%0A++++++++puts(%22Non-zero+bytes:%22)%3B%0A++++++++for+(int+i+%3D+0%3B+i+%3C+256%3B+i%2B%2B)+%7B%0A++++++++++++if+(state%5Bi%5D+!!%3D+0)+%7B%0A++++++++++++++++printf(%22%2502X:+%2502X%5Cn%22,+i,+state%5Bi%5D)%3B%0A++++++++++++%7D%0A++++++++%7D%0A++++%7D%0A%7D%0A'),l:'5',n:'0',o:'C%2B%2B+source+%231',t:'0')),k:40.60279432726667,l:'4',n:'0',o:'',s:0,t:'0'),(g:!((h:compiler,i:(compiler:mingw64_ucrt_gcc_1620,filters:(b:'0',binary:'1',binaryObject:'1',commentOnly:'0',debugCalls:'1',demangle:'0',directives:'0',execute:'0',intel:'0',libraryCode:'0',trim:'1',verboseDemangling:'0'),flagsViewOpen:'1',fontScale:14,fontUsePx:'0',j:1,lang:c%2B%2B,libs:!(),options:'',overrides:!(),selection:(endColumn:1,endLineNumber:1,positionColumn:1,positionLineNumber:1,selectionStartColumn:1,selectionStartLineNumber:1,startColumn:1,startLineNumber:1),source:1),l:'5',n:'0',o:'+MinGW+gcc+16.2.0+(Editor+%231)',t:'0')),k:29.72552813358912,l:'4',n:'0',o:'',s:0,t:'0'),(g:!((h:output,i:(editorid:1,fontScale:14,fontUsePx:'0',j:1,wrap:'1'),l:'5',n:'0',o:'Output+of+MinGW+gcc+16.2.0+(Compiler+%231)',t:'0')),k:29.671677539144216,l:'4',n:'0',o:'',s:0,t:'0')),l:'2',n:'0',o:'',t:'0')),version:4 [2] https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes -- 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 (2)
-
WineHQ Bugzilla -
WineHQ Bugzilla