Bug for beginners

James Mckenzie jjmckenzie51 at earthlink.net
Fri Aug 21 10:25:48 CDT 2009

>On Fri, Aug 21, 2009 at 12:58 AM, Andrew Eikum
><andrew at brightnightgames.com>wrote:
>> Alexandros Dermenakis wrote:
>>> Hi all,
>>> I studied the wine developer's guide and went a bit through the code. I
>>> would like a suggestion, a bug to start understanding better the structure
>>> of wine and familiarize myself with it in order to be able to contribute
>>> more in the future.
>>> thank you
>> Hi Alexandros,
>> When I began working on Wine, I found that the easiest way for me was to
>> implement parts of Wine that have no implementation yet.  Implementing new
>> functions means you don't have to worry about breaking old tests or
>> re-arranging and understanding someone else's code.  It also gives you the
>> opportunity to write new tests from the ground up, so you get used to
>> exactly what the unit tests are for and how they work.
>> Look around in Wine for functions that are labeled with FIXMEs indicating
>> that they are stubs, or look in the .spec files for functions declared as
>> stubs.  Find a function that has an easy to understand purpose: a very clear
>> input and output.  Then, write unit tests in that DLL's test suite that
>> prove all of the important features of that function.  Run your tests on an
>> actual Windows OS (look into "crosstests") and verify that they are correct.
>>  Finally, implement that function in Wine to make it also pass your tests.
>> If you want a suggestion for where to look for small stubs, take a look at
>> gdi32 and gdiplus.  I know they still have some smallish, unimplemented or
>> half-implemented functions.  If graphics don't interest you, there are
>> plenty of stubs elsewhere.
>> Once you've got the hang of how the unit tests work (I mean it, the test
>> cases are the most important part of getting patches into Wine), try looking
>> into bugs on WineHQ until you find one you think you might be able to
>> handle.  Then gear up for the most fun you'll ever have reading pages and
>> pages debug logs :)
>> No matter where you begin your work, remember that Wine is a difficult
>> project to work on.  Because even very subtle changes can cause breakages in
>> seemingly unrelated parts of Wine, the standard for patches is very high.
>>  You will need to prove that your patch is correct using the test suites.
>>  No provable tests means it's not getting in.
>> Good luck and thanks for your interest,
>> Andrew
>As I understand from Wine's policies, functions should only be implemented
>if an application requires them. If that's correct, a random search for
>stubs isn't a good idea, because the follow up question would be "which
>application requires this function?".
One idea is to look at Bugzilla for a problem report that exists because a specific function does not exist.  For instance, I have been working on a bug with EM_FORMATRANGE and trying to update the fix included to work with the current Wine version as several programs rely on the ability to change fonts in specific windows.  I have a working fix for 0.9.59 and my time was and continues to be diverted to other efforts, not necessarily this fix.  However, I would like assistance in moving the patch forward and into Wine.  There are other bug reports where the fix is 'hacky' and needs to be cleaned up so, in many cases a conformance/compliance test is all that is needed.  This would be a great place to start where you can look at the current Wine code base, what someone came up with as a fix and what needs to make the fix workable.  You don't have to look for an application that requires a certain function that works in a specific manner.

James McKenzie

More information about the wine-devel mailing list