Re: USER32: Error checking for sysparams tests

2005-03-05 Thread jchevrier
On Saturday 05 March 2005 08:58, Paul Vriens wrote:
> On Sat, 2005-03-05 at 06:42, [EMAIL PROTECTED] wrote:
> > As discussed on wine-devel there are a handful of calls in the
> > SystemParametersInfo tests that don't check for returned errors and
> > continue on with testing a given parameter. This patch ensures that all
> > initial calls to SystemParametersInfoA in each parameter test have their
> > returned errors checked. To ease adding more error cases and reduce code
> > duplication I have consolidated error message handling into a single
> > function.
> >
> > Changelog:
> >
> > * Consolidate error message handling
> > * Add error checking to all initial SystemParametersInfoA calls in each
> > parameter test to make sure that if a given parameter isn't supported or
> > has failed in some other way that we return and don't continue on with
> > the test * Remove a couple of TABS and align registry keys/values at the
> > top of the file
>
> Hi Justin,
>
> what about the attached one? Added/changed the following:
>
> - Always set LastError before calling test_error_msg
> - SPI_{GET,SET}ICONTITLEWRAP is supported on Win98, but was clouded by
> an error that was set after a previous call failed.
>
> Changelog:
> Justin Chevrier <[EMAIL PROTECTED]>
>
> * Consolidate error message handling
> * Add error checking to all initial SystemParametersInfoA calls in each
> parameter test to make sure that if a given parameter isn't supported or
> has failed in some other way that we return and don't continue on with
> the test
> * SetLastError before calling test_error_msg
> * Remove a couple of TABS and align registry keys/values at the top of
> the file
> * SPI_{GET,SET}ICONTITLEWRAP is supported on Win98
>
> Cheers,
>
> Paul.

Looks good (outside of the spelling correction that I believe has already been 
applied). I can confirm that Win 98 isn't setting the extended error 
information on at least some calls (maybe all?) to SystemParametersInfoA. I 
can get WinXP/NT/2K to do the same thing by removing the rights of the user 
running the test to the keys in the registry that the parameter calls attempt 
to access ;). No extended error information there either.

Justin



Re: USER32: Error checking for sysparams tests

2005-03-05 Thread Paul Vriens
On Sat, 2005-03-05 at 06:42, [EMAIL PROTECTED] wrote:
> As discussed on wine-devel there are a handful of calls in the 
> SystemParametersInfo tests that don't check for returned errors and continue 
> on with testing a given parameter. This patch ensures that all initial calls 
> to SystemParametersInfoA in each parameter test have their returned errors 
> checked. To ease adding more error cases and reduce code duplication I have 
> consolidated error message handling into a single function.
> 
> Changelog:
> 
> * Consolidate error message handling
> * Add error checking to all initial SystemParametersInfoA calls in each 
> parameter test to make sure that if a given parameter isn't supported or has 
> failed in some other way that we return and don't continue on with the test
> * Remove a couple of TABS and align registry keys/values at the top of the 
> file
Hi Justin,

what about the attached one? Added/changed the following:

- Always set LastError before calling test_error_msg
- SPI_{GET,SET}ICONTITLEWRAP is supported on Win98, but was clouded by
an error that was set after a previous call failed.

Changelog:
Justin Chevrier <[EMAIL PROTECTED]>
 
* Consolidate error message handling
* Add error checking to all initial SystemParametersInfoA calls in each 
parameter test to make sure that if a given parameter isn't supported or
has failed in some other way that we return and don't continue on with
the test
* SetLastError before calling test_error_msg
* Remove a couple of TABS and align registry keys/values at the top of
the file
* SPI_{GET,SET}ICONTITLEWRAP is supported on Win98

Cheers,

Paul.
Index: dlls/user/tests/sysparams.c
===
RCS file: /home/wine/wine/dlls/user/tests/sysparams.c,v
retrieving revision 1.33
diff -u -p -r1.33 sysparams.c
--- dlls/user/tests/sysparams.c	4 Mar 2005 12:31:09 -	1.33
+++ dlls/user/tests/sysparams.c	5 Mar 2005 10:21:10 -
@@ -41,14 +41,14 @@ static int strict;
 ok((received) == (expected), "%s: got " type " instead of " type "\n", (label),(received),(expected))
 
 
-#define SPI_SETBEEP_REGKEY   "Control Panel\\Sound"
-#define SPI_SETBEEP_VALNAME  "Beep"
-#define SPI_SETMOUSE_REGKEY "Control Panel\\Mouse"
-#define SPI_SETMOUSE_VALNAME1   "MouseThreshold1"
-#define SPI_SETMOUSE_VALNAME2   "MouseThreshold2"
-#define SPI_SETMOUSE_VALNAME3   "MouseSpeed"
-#define SPI_SETBORDER_REGKEY "Control Panel\\Desktop\\WindowMetrics"
-#define SPI_SETBORDER_VALNAME"BorderWidth"
+#define SPI_SETBEEP_REGKEY  "Control Panel\\Sound"
+#define SPI_SETBEEP_VALNAME "Beep"
+#define SPI_SETMOUSE_REGKEY "Control Panel\\Mouse"
+#define SPI_SETMOUSE_VALNAME1   "MouseThreshold1"
+#define SPI_SETMOUSE_VALNAME2   "MouseThreshold2"
+#define SPI_SETMOUSE_VALNAME3   "MouseSpeed"
+#define SPI_SETBORDER_REGKEY"Control Panel\\Desktop\\WindowMetrics"
+#define SPI_SETBORDER_VALNAME   "BorderWidth"
 #define SPI_SETKEYBOARDSPEED_REGKEY "Control Panel\\Keyboard"
 #define SPI_SETKEYBOARDSPEED_VALNAME"KeyboardSpeed"
 #define SPI_SETSCREENSAVETIMEOUT_REGKEY "Control Panel\\Desktop"
@@ -77,14 +77,14 @@ static int strict;
 #define SPI_SETMOUSEBUTTONSWAP_VALNAME  "SwapMouseButtons"
 #define SPI_SETWORKAREA_REGKEY  "Control Panel\\Desktop"
 #define SPI_SETWORKAREA_VALNAME "WINE_WorkArea"
-#define SPI_SETSHOWSOUNDS_REGKEY"Control Panel\\Accessibility\\ShowSounds"
-#define SPI_SETSHOWSOUNDS_VALNAME   "On"
-#define SPI_SETKEYBOARDPREF_REGKEY  "Control Panel\\Accessibility\\Keyboard Preference"
-#define SPI_SETKEYBOARDPREF_VALNAME "On"
-#define SPI_SETKEYBOARDPREF_REGKEY_LEGACY  "Control Panel\\Accessibility"
-#define SPI_SETKEYBOARDPREF_VALNAME_LEGACY "Keyboard Preference"
-#define SPI_SETSCREENREADER_REGKEY  "Control Panel\\Accessibility\\Blind Access"
-#define SPI_SETSCREENREADER_VALNAME "On"
+#define SPI_SETSHOWSOUNDS_REGKEY"Control Panel\\Accessibility\\ShowSounds"
+#define SPI_SETSHOWSOUNDS_VALNAME   "On"
+#define SPI_SETKEYBOARDPREF_REGKEY  "Control Panel\\Accessibility\\Keyboard Preference"
+#define SPI_SETKEYBOARDPREF_VALNAME "On"
+#define SPI_SETKEYBOARDPREF_REGKEY_LEGACY   "Control Panel\\Accessibility"
+#define SPI_SETKEYBOARDPREF_VALNAME_LEGACY  "Keyboard Preference"
+#define SPI_SETSCREENREADER_REGKEY  "Control Panel\\Accessibility\\Blind Access"
+#define SPI_SETSCREENREADER_VALNAME "On"
 #define SPI_SETSCREENREADER_REGKEY_LEGACY   "Control Panel\\Accessibility"
 #define SPI_SETSCREENREADER_VALNAME_LEGACY  "Blind Access"
 #define SPI_SETLOWPOWERACTIVE_REGKEY"Control Panel\\Desktop"
@@ -103,8 +103,8 @@ static int stri

Re: USER32: Error checking for sysparams tests

2005-03-05 Thread Paul Vriens
On Sat, 2005-03-05 at 06:42, [EMAIL PROTECTED] wrote:
> As discussed on wine-devel there are a handful of calls in the 
> SystemParametersInfo tests that don't check for returned errors and continue 
> on with testing a given parameter. This patch ensures that all initial calls 
> to SystemParametersInfoA in each parameter test have their returned errors 
> checked. To ease adding more error cases and reduce code duplication I have 
> consolidated error message handling into a single function.
> 
> Changelog:
> 
> * Consolidate error message handling
> * Add error checking to all initial SystemParametersInfoA calls in each 
> parameter test to make sure that if a given parameter isn't supported or has 
> failed in some other way that we return and don't continue on with the test
> * Remove a couple of TABS and align registry keys/values at the top of the 
> file
Hi Justin,

could you have a look at the patch I send in for *MOUSEHOVER* stuff.
Apparently Win98SE returns 0 without setting last error for the
*MOUSEHOVER* ones.
Could you incorporate this into your patch?

Mine is a bit 'overcomplete' as ERROR_CALL_NOT_IMPLEMENTED will probably
never be returned (only for SystemParametersInfoA itself).

Shouldn't we also always do a SetLastError(0xdeadbeef) before every call
to SystemParametersInfoA?

Cheers,

Paul.