Hello,
I checked wine test errors, and found some errors for dlls/shell32/tests/shlexec.c[1]. I wanted to fix bugs in 'static void test_filename(void)'.
However, I can't understand the intention of previous code: All testcases are put into 'static filename_tests_t filename_tests[]', then they are tested via a while-loop. I think it is difficult to locate *which* testcase really fails.
Is re-factoring such code encouraged? If so, I'm glad to do it.
I really appreciate all finds of ideas.
Thank you.
[1]: http://test.winehq.org/data/aa22a3c4b2e772636163ea50e7245dba01fe7b34/win8_ne...
Zhenbo Li
On Sun, 16 Feb 2014, Zhenbo Li wrote: [...]
However, I can't understand the intention of previous code: All testcases are put into 'static filename_tests_t filename_tests[]', then they are tested via a while-loop. I think it is difficult to locate *which* testcase really fails.
Is re-factoring such code encouraged? If so, I'm glad to do it.
No. The goal of this test structure is to avoid lots of code duplication. To compensate with the line number being of little use, the failure message prints the full data on what was tested. For instance the first failure is:
shlexec.c:139: Test failed: ShellExecute(verb="", file="C:\Users\winetest\AppData\Local\Temp\wtD671.tmp\test file.noassoc") WaitForSingleObject returned 258
The verb is empty and the base filename 'test file.noassoc' so this corresponds to:
/* Test filenames with no association */ {NULL, "%s\test file.noassoc", 0x0, SE_ERR_NOASSOC},
It turns out I looked into this a bit and in fact all the 'returned 258' errors have the same cause: Windows 8 pops up a 'dialog' that asks whether to look for an app in the Microsoft Store to handle the unknown file extension.
shell_execute() has some code to deal with those which centers on:
HWND wnd = FindWindowA("#32770", "Windows");
That line is supposed to detect the dialog popped up by Windows, dismiss it and note to skip further tests that could trigger it.
The problem is that on Windows 8 the 'dialog' has changed: it's a window with no decoration that looks very much like the Metro apps. So it's too different and thus is not detected.
I tried to figure out what class or title that window has using Spy++ but any time I click outside it, it disappears.
That's where I got stuck. So if anyone wants to take over...
Zhenbo Li litimetal@gmail.com wrote:
I checked wine test errors, and found some errors for dlls/shell32/tests/shlexec.c[1]. I wanted to fix bugs in 'static void test_filename(void)'.
Probably you should explain first what bugs you want to fix.