unknown device issues after running winetest

Paul Vriens paul.vriens.wine at gmail.com
Fri May 23 04:27:51 CDT 2008


James Hawkins wrote:
> On Fri, May 23, 2008 at 3:10 AM, Paul Vriens <paul.vriens.wine at gmail.com> wrote:
>> James Hawkins wrote:
>>> On Fri, May 23, 2008 at 2:59 AM, Paul Vriens <paul.vriens.wine at gmail.com>
>>> wrote:
>>>> Alexander Morozov wrote:
>>>>>> Can someone confirm that after running the devinst tests, the registry
>>>>>> on
>>>>>> Wine still shows these:
>>>>>>
>>>>>> HKEY_LOCAL_MACHINE\System\CurrentControlSet\Enum\ROOT\LEGACY_BOGUS (and
>>>>>> stuff below)
>>>>>>
>>>>>> HKEY_LOCAL_MACHINE\System\CurrentControlSet\Enum\USB\BOGUS (and stuff
>>>>>> below)
>>>>>>
>>>>>>
>>>>>> HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\DeviceClasses\{6A55B5A4
>>>>>> -3F65-11DB-B704-0011955C2BDB} (and stuff below)
>>>>> I can confirm this. Diff file with changes after running make devinst.ok
>>>>> is
>>>>> attached.
>>>>>
>>>>>
>>>> Ok, so at least it looks we are compatible with Windows :-)
>>>>
>>>> I will check out your suggestion about using SetupDiRemoveDevice (and
>>>> maybe
>>>> SetupDiRemoveDeviceInterface) to clean up the registry.
>>>>
>>>> I already found that it doesn't work on NT4 for everything as we have a
>>>> bogus
>>>> bogus entry (missing the ClassGUID value). This means you can't even
>>>> enumerate
>>>> this one and it won't be covered by the remove calls.
>>>>
>>>> So what about a cleanup_before function that gets rid of everything
>>>> that's
>>>> currently bogus in the registry? If we don't do this before we have to
>>>> cater for
>>>> existing keys in every test which will clutter the tests I think. If we
>>>> really
>>>> want to test existing keys we should do so a part of a normal test.
>>>>
>>>> After that cleanup_before is working we can change the tests to clean up
>>>> after
>>>> themselves.
>>>>
>>> Will the new 'cleanup after' code not delete these invalid entries?
>>> One test run is fine to sacrifice for the sake of not cluttering up
>>> the tests with temporary cleanup code.
>>>
>> The problem is that we could have failures because of existing keys and we
>> have to cater for that in every test maybe.
>>
>> I agree with you though and will first check if having the 'cleanup after'
>> serves it's purpose (even if we have to run the test twice to actually see
>> results).
>>
>> Could take a while though as I have to check which tests leaves what keys
>> around. Then how I can get rid of them on every platform. Wine doesn't have
>> the SetupDiRemove stuff yet btw.
>>
> 
> All I'm saying is that there shouldn't be a reason to have a hacky
> pre-cleanup.  All the cleanup that is needed for the tests should be
> added, and after one round of failures, the next set of tests should
> be clean.
> 
I just had a check for the testRegisterAndGetDetail test on Vista (dunno about 
the other tests and platforms yet).

I added the SetupDiRemoveDevice (as was suggested by Alexander) at the end of 
this test.

On a clean registry this works out fine (one DeviceClasses key is left but that 
one can be deleted without having to fiddle with permissions).

When I however first run the old tests (with leftovers in the registry) and then 
run the new test again the registry keys are still present.
When I do the SetupDiRemoveDevice twice at the end of testRegisterAndGetDetail 
the registry keys get deleted again (not that DeviceClasses key again).

So what would be a good approach? Just doing 2 SetupDiRemoveDevice's at the end 
to make sure old stuff is gone as well?
Or doing one, check if the Enum keys is still present and then do a second 
SetupDiRemoveDevice (with a trace message for clarity)?

-- 
Cheers,

Paul.



More information about the wine-devel mailing list