winmm/tests: waveOutGetDevCaps called with invalid size
Robert Reif
reif at earthlink.net
Mon Apr 28 06:38:38 CDT 2008
Peter Åstrand wrote:
>>> And what is the error? If you know the error code returned, Ill add it
>>> to the code so we can end this discussion.
>>>
>> The error is MMSYSERR_INVALPARAM.
>>
>
> I can see that this patch has now been committed:
>
> --- wine/dlls/winmm/tests/wave.c:1.67 Fri Feb 29 06:18:36 2008
> +++ wine/dlls/winmm/tests/wave.c Fri Apr 25 08:12:48 2008
> @@ -854,9 +854,9 @@
> }
>
> rc=waveOutGetDevCapsA(device,&capsA,4);
> - ok(rc==MMSYSERR_NOERROR,
> - "waveOutGetDevCapsA(%s): MMSYSERR_NOERROR expected, got %s\n",
> - dev_name(device),wave_out_error(rc));
> + ok(rc==MMSYSERR_NOERROR || rc==MMSYSERR_INVALPARAM,
> + "waveOutGetDevCapsA(%s): MMSYSERR_NOERROR or MMSYSERR_INVALPARAM "
> + "expected, got %s\n", dev_name(device),wave_out_error(rc));
>
>
> However, the waveOutGetDevCapsW fails as well on WTS, also returning
> MMSYSERR_INVALPARAM.
>
> We could add MMSYSERR_INVALPARAM as a valid return code, but again, if we
> accept both success and a bunch of failures, the test makes very little
> sense.
>
> Here's a patch that completely removes the odd tests:
>
> --- wave.c 25 Apr 2008 13:12:48 -0000 1.68
> +++ wave.c 28 Apr 2008 06:57:07 -0000
> @@ -853,16 +853,6 @@
> "expected, got %s\n",dev_name(device),wave_out_error(rc));
> }
>
> - rc=waveOutGetDevCapsA(device,&capsA,4);
> - ok(rc==MMSYSERR_NOERROR || rc==MMSYSERR_INVALPARAM,
> - "waveOutGetDevCapsA(%s): MMSYSERR_NOERROR or MMSYSERR_INVALPARAM "
> - "expected, got %s\n", dev_name(device),wave_out_error(rc));
> -
> - rc=waveOutGetDevCapsW(device,&capsW,4);
> - ok(rc==MMSYSERR_NOERROR || rc==MMSYSERR_NOTSUPPORTED,
> - "waveOutGetDevCapsW(%s): MMSYSERR_NOERROR or MMSYSERR_NOTSUPPORTED
> "
> - "expected, got %s\n",dev_name(device),wave_out_error(rc));
> -
> nameA=NULL;
> rc=waveOutMessage((HWAVEOUT)device, DRV_QUERYDEVICEINTERFACESIZE,
> (DWORD_PTR)&size, 0);
>
>
> Here's a patch that adds MMSYSERR_INVALPARAM as accepted return code:
>
> --- wave.c 25 Apr 2008 13:12:48 -0000 1.68
> +++ wave.c 28 Apr 2008 06:58:14 -0000
> @@ -859,8 +859,8 @@
> "expected, got %s\n", dev_name(device),wave_out_error(rc));
>
> rc=waveOutGetDevCapsW(device,&capsW,4);
> - ok(rc==MMSYSERR_NOERROR || rc==MMSYSERR_NOTSUPPORTED,
> - "waveOutGetDevCapsW(%s): MMSYSERR_NOERROR or MMSYSERR_NOTSUPPORTED
> "
> + ok(rc==MMSYSERR_NOERROR || rc==MMSYSERR_NOTSUPPORTED || rc==MMSYSERR_INVALPARAM,
> + "waveOutGetDevCapsW(%s): MMSYSERR_NOERROR or MMSYSERR_NOTSUPPORTED or MMSYSERR_INVALPARAM "
> "expected, got %s\n",dev_name(device),wave_out_error(rc));
>
> nameA=NULL;
>
> Rgds,
> ---
> Peter Åstrand ThinLinc Chief Developer
> Cendio AB http://www.cendio.se
> Wallenbergs gata 4
> 583 30 Linköping Phone: +46-13-21 46 00
> ------------------------------------------------------------------------
>
>
>
Let me get this straight, your company's product doesn't pass this wine
regression test so you want to remove the test?
More information about the wine-devel
mailing list