mscms: check an appropriate registry key.

James Hawkins truiken at gmail.com
Wed Jan 18 20:13:45 CST 2006


On 1/18/06, Saulius Krasuckas <saulius2 at ar.fi.lt> wrote:
> * On Wed, 18 Jan 2006, James Hawkins wrote:
> > * On 1/18/06, Saulius Krasuckas <saulius2 at ar.fi.lt> wrote:
> > > +
> > > +    hkIcmKey = reg_open_mscms_key();
> > > +    if (!hkIcmKey)
> > > +    {
> > > +        trace("Key 'HKLM\\SOFTWARE\\Microsoft\\Windows*\\CurrentVersion\\ICM\\RegisteredProfiles' not found\n" );
> > > +        return;
> > > +    }
> >
> > We shoul fail silently here.  If the key isn't found, just return.
>
> Why?
>

If having this key is something that should be expected from our
implementation, then just put it in an 'ok', otherwise there's no
reason to say the key doesn't exist.  If they key doesn't exist, skip
the tests, or do whatever else you need to do, and go on with the rest
of the tests.  They only time the tests should give output is an
expected condition is not met, and that's what 'ok' is for.

> > > +
> > > +        ok( dwType == REG_SZ, "RegEnumValueA() returned unexpected value type (%ld)\n", dwType );
> > > +        if (dwType != REG_SZ) break;
> > > +        trace(" found '%s' value containing '%s' (%d chars)\n", szName, szData, strlen(szData));
> > > +    }
> > > +
> >
> > Why do you need to output this information?
>
> Because I don't know what to expect in the real world. (c)
>

If you're adding the traces for debugging purposes, keep the traces in
your tree, but don't add them back to wine.

> > If you're expecting certain values, do an 'ok' on them.
>
> When it's time, I will definitely do so. :)
>

ok...no pun intended ;)

> > On a successful run of the tests, the only output should be the number
> > of tests that were fun, and that all of them succeeded, or if any
> > failed, output the tests that failed.
>
> I just want to see whether (any | how much) non-standard profiles are
> listed in the key on most of the windows boxes.  Until that I see no
> ground to build my house on. :)
>

I see you're looking to gather information about the area you're
working on, which is good, but adding the traces to wine's test suite
isn't the place to gather that information.  Send a message to
wine-devel with the patch attached and ask the developers to run the
patched tests and report back the output.  I recently had a couple
developers do the same for me when I was debugging my SHFileOperation
implementation.  They speedily replied, and I was able to fix the bug
in 20 minutes with their output.

--
James Hawkins



More information about the wine-devel mailing list