registry: order of insertion of values

James Hawkins truiken at gmail.com
Mon Apr 4 14:15:28 CDT 2005


On Apr 4, 2005 4:26 AM, Paul Millar <p.millar at physics.gla.ac.uk> wrote:
> Hi James,
> 
> On Sunday 03 Apr 2005 23:57, you wrote:
> > On Apr 3, 2005 5:17 PM, Paul Millar <p.millar at physics.gla.ac.uk> wrote:
> > > By the look of it, the bug is that create_test_entries() creates the
> > > three TestN keys (N=1..3), but doesn't clean them after.
> >
> > We use the values created in create_test_entries() throughout the
> > whole test [...] They are cleaned up in the final call to
> > delete_key(hkey_main).
> 
> OK, I missed that from a casual glance through the code.
> 
> > so this is the correct behaviour.
> 
> ... if you insist.
> 
> The issue is either one of name-space ("Test" isn't a fantastic choice), or of
> scope:  do all the Test1, Test2, Test3 tests inside one top-level function
> call that also cleans up.
> 
> So, two ways of fixing the problem.

I whole-heartedly agree that using 'Test' as a value when we have
'Test1..3' is not a wise choice, but I didn't write it :)

I sent a patch that creates a subkey and places the 'Test' value in
that subkey so the conflict disappears and all the functions pass
(except for Load/SaveKey but I have the fix for that to send in).  I
think it's a good idea to leave 'Test1...3' available through the
whole function, because they are pertinent to almost all Reg* tests. 
For example we can delete a key with values under it as long as there
are no subkeys.  That's a pretty weak example, but we should leave
them in for testing sake.  With the patch I sent for 'Test', all
concerned tests pass on windows and wine now.

-- 
James Hawkins



More information about the wine-devel mailing list