On Monday 24 September 2007 12:13:50 Jeff Latimer wrote:
This patch adds the variations to the api that XP implements. My assumption is that these changes will, mostly, be reflected in 2003 and Vista. I can't check them so if someone could give them a run and let know, that would be fine. I will get on with adding the variations to pdh.c
All tests succeed here on 2003 without your patch. Even if APIs return different values on different versions of Windows we should not add version checks. Instead we should accept all possible return values or remove the test altogether when it's clear that you cannot depend on specific return values.
-Hans
Hans Leidekker wrote:
On Monday 24 September 2007 12:13:50 Jeff Latimer wrote:
All tests succeed here on 2003 without your patch.
That means that they must be XP specific. I noticed some vista specfic bugs bugs being reported.
Even if APIs return different values on different versions of Windows we should not add version checks. Instead we should accept all possible return values or remove the test altogether when it's clear that you cannot depend on specific return values.
From this we should write tests to accept all values. It would seem that the wine dll still needs to implement the API accurately, so you are saying, code the API correctly but make the tests generic?
Jeff
On Monday 24 September 2007 14:20:12 Jeff Latimer wrote:
All tests succeed here on 2003 without your patch.
That means that they must be XP specific. I noticed some vista specfic bugs bugs being reported.
The failures on Vista are at least in part different from XPs because of insufficient privileges.
From this we should write tests to accept all values. It would seem that the wine dll still needs to implement the API accurately, so you are saying, code the API correctly but make the tests generic?
Quote from MSDN on PdhLookupPerfNameByIndex:
PDH_INVALID_ARGUMENT A parameter is not valid or is incorrectly formatted. For example, on some releases you could receive this error if the specified size on input is greater than zero but less than the required size.
So we should accept this return value too. Our implemention is fine as-is because it still passes the test.
Note that there is another problem with the tests which is that performance counter names are localized but the tests assume that the current locale is English. I intend to fix this in my next batch of patches.
-Hans
Hans Leidekker wrote:
From this we should write tests to accept all values. It would seem that the wine dll still needs to implement the API accurately, so you are saying, code the API correctly but make the tests generic?
Quote from MSDN on PdhLookupPerfNameByIndex:
PDH_INVALID_ARGUMENT A parameter is not valid or is incorrectly formatted. For example, on some releases you could receive this error if the specified size on input is greater than zero but less than the required size.
I am happy with that though the tests I added relate to the following paragraph where it says that XP requires the buffer parameter as well as the size at all times and testing shows that it returns PDH_INVALID_ARGUMENT. It also returns PDH_INSUFFICIENT_BUFFER instead of PDH_MORE_DATA.
So we should accept this return value too. Our implemention is fine as-is because it still passes the test.
I am not sure that I follow. Each of the tests in the patch is there because they satisfied the returns from XP and failed on my platform.
Note that there is another problem with the tests which is that performance counter names are localized but the tests assume that the current locale is English. I intend to fix this in my next batch of patches.
Sounds good.
BTW I can see that the tests could be merged into the existing tests so that the tests handle multiple situations. It means that in some ways it means that conformance to particular release will not be specifically tested in wine and hence conformance will not be assured. If that is the way ist done than thats ok.
Jeff
On Tuesday 25 September 2007 14:19:34 Jeff Latimer wrote:
I am happy with that though the tests I added relate to the following paragraph where it says that XP requires the buffer parameter as well as the size at all times and testing shows that it returns PDH_INVALID_ARGUMENT. It also returns PDH_INSUFFICIENT_BUFFER instead of PDH_MORE_DATA.
Then I suggest to remove tests with a NULL buffer parameter and accept both PDH_INSUFFICIENT_BUFFER and PDH_MORE_DATA in tests where the specified buffer size is too small.
-Hans
Hans Leidekker wrote:
I am happy with that though the tests I added relate to the following paragraph where it says that XP requires the buffer parameter as well as the size at all times and testing shows that it returns PDH_INVALID_ARGUMENT. It also returns PDH_INSUFFICIENT_BUFFER instead of PDH_MORE_DATA.
Then I suggest to remove tests with a NULL buffer parameter and accept both PDH_INSUFFICIENT_BUFFER and PDH_MORE_DATA in tests where the specified buffer size is too small.
I will give it a whirl.
Ta Jeff