How can I debug winetest under Windows XP

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
lahmbi5678
Level 7
Level 7
Posts: 823
Joined: Thu Aug 27, 2009 6:23 am

How can I debug winetest under Windows XP

Post by lahmbi5678 »

I'm especially interested in the ntdll:file test, which usually crashes on my intel945 machine. Unfortunately, when a winetest test crashes, you don't get any information where it crashed, something like a line number would probably be helpful. I tried to get some information with Process Explorer (Procmon) from www.sysinternals.com, but with procmon running, it didn't crash anymore, so there maybe some kind of race condition.

Is there a simple way to get the builtin TRACEs to output, or do I have to compile the ntdll:file test with MingW? I've got some programming eperience, but I have very little knowledge, when it comes to Windows API or internals like services/drivers.
jeffz
Level 5
Level 5
Posts: 345
Joined: Thu Mar 13, 2008 10:03 pm

Re: How can I debug winetest under Windows XP

Post by jeffz »

lahmbi5678 wrote:I'm especially interested in the ntdll:file test, which usually crashes on my intel945 machine. Unfortunately, when a winetest test crashes, you don't get any information where it crashed, something like a line number would probably be helpful. I tried to get some information with Process Explorer (Procmon) from www.sysinternals.com, but with procmon running, it didn't crash anymore, so there maybe some kind of race condition.

Is there a simple way to get the builtin TRACEs to output, or do I have to compile the ntdll:file test with MingW? I've got some programming eperience, but I have very little knowledge, when it comes to Windows API or internals like services/drivers.
The builtin TRACEs are not printed because you are not running on Wine.

To debug the crash on windows, you would need to setup a system debugger so that it is launched automatically I think. Also, I think I've noticed that the ntdll file test only crashes when run as part of winetest, standalone it does not crash.

There seems to be some strange behavior from running all the tests together, some circumstances only appear to occur as a side effect of other tests.
lahmbi5678
Level 7
Level 7
Posts: 823
Joined: Thu Aug 27, 2009 6:23 am

Post by lahmbi5678 »

Hello Jeffz,

to clarify, I copied the ntdll_test.exe file from the temp directory used by winetest and put it into another directory and ran it from there, something like "ntdll_test.exe file". It conistently crashes, but if I run it with procmon in the background, it won't crash. So I assume that there is some race. I have to delete the folder "ntdeletefile" after every crash, otherwise the test would only print something like "fil", "file", "fi" as output.

I will try to build the tests at the weekend, probably under linux. I'd try to run e.g. the first half of the tests in file.c, then the second half, etc, maybe some culprit can be found. I had difficulties to compile the tests with VC++ 6, I followed the instructions under http://www.winehq.org/docs/winedev-guid ... ng-windows, something with RPC header files doesn't work, you probably need newer versions of them. I may try mingw again, but I don't like it, the msys stuff is really annoying, you have to fetch everything like flex on your own, maybe I missed something, but I found it really uncomfortable.
lahmbi5678
Level 7
Level 7
Posts: 823
Joined: Thu Aug 27, 2009 6:23 am

Post by lahmbi5678 »

Ok, I just ran winetest-latest.exe with procmon in the background, the ntdll test didn't crash for me, and I didn't have to click away the usual (for me, at least) message boxes during msi tests, though the msi tests now produce more failing tests. Procmon is significantly slowing down the tests, at some point it will even start to use the page file. I've uploaded the results at the test.winehq.com page, labelled 'sp3pro-i945-*'.
Locked