comctl32/tests/updown failures on xp?

James Hawkins truiken at gmail.com
Fri Jan 19 02:28:50 CST 2007


On 1/19/07, Dan Kegel <dank at kegel.com> wrote:
> While getting ready for cs130 (thanks to Lei and James for all the help),
> I tried building and running comctl32/tests/updown.c standalone on
> winxp using Visual C++ Express 2005 (the freely downloadable one)
> and the Platform SDK (also freely downloadable, needed for e.g. user32.lib and
> .h files).
>
> First I tried building it by starting cmd with the visual studio environment
> vars defined (using the handy Start/Programs/Visual C++/Visual Studio
> Tools/Visual Studio Command Prompt start menu entry installed by
> visual C++):
>   cl -DSTANDALONE -D_X86_ -I../../../include updown.c user32.lib
> gdi32.lib comctl32.lib
> This failed to compile, complaining about redefinitions in rpc.h.
>
> I worked around that as suggested by Lei Zhang by avoiding letting cl see
> any of the Wine headers but wine/test.h, by doing
>  mkdir wine
>  copy ..\..\..\include\wine\test.h wine
>   cl -DSTANDALONE -D_X86_  updown.c user32.lib gdi32.lib comctl32.lib
> This failed to compile, complaining about WM_QUERYVISTATE being undefined.
>
> I worked around that as suggested by Lei Zhang by defining _WIN32_WINNT to
> the right value:
>   cl -DSTANDALONE -D_X86_  -D_WIN32_WINNT=0x502 updown.c user32.lib
> gdi32.lib comctl32.lib
>
> That failed to link, complaining it couldn't find user32.lib.
>
> I worked around that by doing
>   echo setenv LIB=%LIB% > setenv.bat
> editing that batch file to append
>   ;C:\Program Files\Microsoft Platform SDK\Lib
> and running it.
>
> That worked (whew), but running the test found two failures:
>
> updown.c:509: Test failed: create parent window: the msg 0x0281 was
> expected, but got msg 0x0007 instead
> updown.c:522: Test failed: add updown control with edit: in msg 0x0005
> expecting lParam 0x4b005b got 0x440065
> updown: 133 tests executed (0 marked as todo, 2 failures), 0 skipped.
>
> I guess it needs a bit of tweaking.  The system I tested it on is
> running Win XP Professional Version 2002 Service Pack 2.
> - Dan
>

It sounds like your build environment isn't set up correctly.  The
easiest way to work on and compile the tests is to run
wine/tools/winapi/msvcmaker under cygwin in Windows.  This will create
several project files, one for each dll etc, and a winetest project
that can be opened with Visual C++ (and converted to a solution).  No
matter which method you use to compile the tests, you should have the
latest Windows SDK installed (not the Platform SDK, which the Windows
SDK is replacing).  I edit and compile the tests in Visual C++, then
run the tests from cmd.

The tests run flawlessly for me in Windows XP SP2 with IE7 installed.

updown: 172 tests executed (0 marked as todo, 0 failures), 0 skipped.

0x0281 is WM_IME_SETCONTEXT and this is what msdn has to say about it:

"Sent to an application when a window is activated. A window receives
this message through its WindowProc function. "

Also, I added the optional flag for the IME messages, because not all
versions of Windows send this message, and we don't send it in Wine.
It's not pertinent to the updown control tests, but the message
sequence will fail on those systems that do send the message if it's
not in the tests.

> Oh, and it fails on Wine from git, too:
> updown.c:509: Test failed: create parent window: the msg 0x0046 was
> expected, but got msg 0x030f instead
> updown.c:521: Test failed: add updown control to parent: the msg
> 0x0055 was expected, but got msg 0x0210 instead
> updown.c:522: Test failed: add updown control with edit: in msg 0x0005
> expecting lParam 0x4b005b got 0x4b0050
> updown: 85 tests executed (0 marked as todo, 3 failures), 0 skipped.

It should fail in Wine, because our implementation isn't completely
correct :)  The failing sequences have the last parameter (todo) of
ok_sequence as TRUE because the tests fail, so they are essentially
todo_wine.  If you run 'make test', you shouldn't see the errors
(because they're wrapped by todo_wine).

-- 
James Hawkins



More information about the wine-devel mailing list