[Bug 52995] New: shell32:shelllink crashes in Wine cause shell32:shellpath's test_PathResolve() to fail (test.bat file)
https://bugs.winehq.org/show_bug.cgi?id=52995 Bug ID: 52995 Summary: shell32:shelllink crashes in Wine cause shell32:shellpath's test_PathResolve() to fail (test.bat file) Product: Wine Version: unspecified Hardware: x86-64 OS: Linux Status: NEW Severity: normal Priority: P2 Component: shell32 Assignee: wine-bugs(a)winehq.org Reporter: fgouget(a)codeweavers.com Distribution: --- shell32:shellpath's test_PathResolve() fails seemingly randomly: shellpath.c:3049: Test failed: test 4: expected L"C:\\users\\winetest\\Temp\\test.lnk", got L"C:\\users\\winetest\\Temp\\test.bat" shellpath.c:3049: Test failed: test 8: expected L"C:\\users\\winetest\\Temp\\test.lnk", got L"C:\\users\\winetest\\Temp\\test.bat" shellpath.c:3048: Test failed: test 14: expected 0, got 1 shellpath.c:3049: Test failed: test 14: expected L"C:\\users\\winetest\\Temp\\test", got L"C:\\users\\winetest\\Temp\\test.bat" shellpath.c:3049: Test failed: test 16: expected L"C:\\users\\winetest\\Temp\\test.lnk", got L"C:\\users\\winetest\\Temp\\test.bat" shellpath.c:3049: Test failed: test 19: expected L"C:\\users\\winetest\\Temp\\test.lnk", got L"C:\\users\\winetest\\Temp\\test.bat" shellpath.c:3049: Test failed: test 20: expected L"C:\\users\\winetest\\Temp\\test.lnk", got L"C:\\users\\winetest\\Temp\\test.bat" shellpath.c:3049: Test failed: test 24: expected L"C:\\users\\winetest\\Temp\\test.lnk", got L"C:\\users\\winetest\\Temp\\test.bat" shellpath.c:3048: Test failed: test 26: expected 0, got 1 shellpath.c:3049: Test failed: test 26: expected L"C:\\users\\winetest\\Temp\\test", got L"C:\\users\\winetest\\Temp\\test.bat" https://test.winehq.org/data/patterns.html#shell32:shellpath But it turns out the dates when shell32:shellpath failures all match dates when shell32:shelllink crashed: https://test.winehq.org/data/patterns.html#shell32:shelllink What happens is that shell32:shellpath looks for a "test.lnk" file. But if one creates a "c:\users\...\Temp\test.bat" file before starting the test, that's what gets returned instead, thus causing the failures. shell32:shelllink just happens to use a file by that name. Normally it gets cleaned up but that just does not happen when shell32:shelllink crashes! So I think the right fix would be to make shell32:shellpath more resilient: * Delete "test.*" before checking for test.lnk. But that runs the risk of deleting files dear to the person running the test (they are in a Temp directory but still). * Use some GetTempFileName() or some similar API to generate a unique filename. * Or just use a name that's less likely to be a leftover from a previous test, "shellpath.lnk" for instance. Very basic but maybe sufficient. -- 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=52995 François Gouget <fgouget(a)codeweavers.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gijsvrm(a)gmail.com Keywords| |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.
https://bugs.winehq.org/show_bug.cgi?id=52995 --- Comment #1 from François Gouget <fgouget(a)codeweavers.com> --- Note: The shell32:shelllink crashes are the subject of bug 28290. -- 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=52995 Gijs Vermeulen <gijsvrm(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|wine-bugs(a)winehq.org |gijsvrm(a)gmail.com CC|gijsvrm(a)gmail.com | --- Comment #2 from Gijs Vermeulen <gijsvrm(a)gmail.com> --- Thanks for the report François, I'll have a look at this. -- 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=52995 --- Comment #3 from Gijs Vermeulen <gijsvrm(a)gmail.com> --- This commit should hopefully help: <https://source.winehq.org/git/wine.git/commit/8ee96cff6c13c92b0a9cba0a805ddf47084ef766> I tried going the GetTempFileName route, but encountered a few problems as outlined in <https://gitlab.winehq.org/wine/wine/-/merge_requests/67> -- 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=52995 François Gouget <fgouget(a)codeweavers.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |8ee96cff6c13c92b0a9cba0a805 | |ddf47084ef766 Resolution|--- |FIXED Status|NEW |RESOLVED --- Comment #4 from François Gouget <fgouget(a)codeweavers.com> --- Yep, shell32:shellpath no longer fails. Thanks for the patch. Now what remains is fixing shell32:shelllink bug that's bug 28290. -- 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=52995 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #5 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 7.11. -- 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)
-
WineHQ Bugzilla