Wine-Devel
By thread
wine-devel@list.winehq.org
By month
Messages by month
- ----- 2026 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
March 2018
- 90 participants
- 1704 messages
Re: [PATCH] wmp/tests: Stop crash when setting a media option.
by Zebediah Figura
On 29/03/18 10:16, Jacek Caban wrote:
> On 03/29/2018 04:36 PM, Zebediah Figura wrote:
>> For what it's worth, it seems to me that it'd be more desirable to work
>> around a Windows bug rather than skip the test entirely.
>
> I'm not sure I agree. If we suspect that it messes ref counting, you
> can't be sure that the workaround will make it behave correctly, all you
> know is that it happens to avoid a crash. It's likely that the library
> may be in a wrong state under the hood. If we hit another crash on this
> platform, we will need to invest more time on investigating it for
> questionable benefit.
>
>
> Jacek
>
>
I see; that's a fair concern.
March 29, 2018
Re: [PATCH v7 2/6] wmp: Add OPEN/PLAY state change notifications
by Anton Romanov
On Thu, Mar 29, 2018 at 7:11 AM, Jacek Caban <jacek(a)codeweavers.com> wrote:
> Hi Anton,
>
> On 03/28/2018 05:31 PM, Anton Romanov wrote:
>> diff --git a/dlls/wmp/player.c b/dlls/wmp/player.c
>> index 3d0df96bd8..b3da663637 100644
>> --- a/dlls/wmp/player.c
>> +++ b/dlls/wmp/player.c
>> @@ -20,9 +20,12 @@
>>
>> #include "wine/debug.h"
>> #include <nserror.h>
>> +#include "wmpids.h"
>>
>> WINE_DEFAULT_DEBUG_CHANNEL(wmp);
>>
>> +static void update_state(WindowsMediaPlayer *wmp, LONG type, LONG state);
>
> How about moving implementation here to avoid forward declaration?
Sure.
>> +
>> static inline WMPMedia *impl_from_IWMPMedia(IWMPMedia *iface)
>> {
>> return CONTAINING_RECORD(iface, WMPMedia, IWMPMedia_iface);
>> @@ -125,14 +128,20 @@ static HRESULT WINAPI WMPPlayer4_put_URL(IWMPPlayer4 *iface, BSTR url)
>> if(url == NULL) {
>> return E_POINTER;
>> }
>> +
>> hres = create_media_from_url(url, &media);
>> +
>> if (SUCCEEDED(hres)) {
>> + update_state(This, DISPID_WMPCOREEVENT_PLAYSTATECHANGE, WMP_PLAY_STATE_TRANSITIONING);
>> hres = IWMPPlayer4_put_currentMedia(iface, media);
>> IWMPMedia_Release(media); /* put will addref */
>> +
>> + update_state(This, DISPID_WMPCOREEVENT_PLAYSTATECHANGE, WMP_PLAY_STATE_READY);
>
> Should we report ready state if put_currentMedia fails?
Probably not.
>>
>> @@ -191,9 +200,13 @@ static HRESULT WINAPI WMPPlayer4_put_currentMedia(IWMPPlayer4 *iface, IWMPMedia
>> if(pMedia == NULL) {
>> return E_POINTER;
>> }
>> + update_state(This, DISPID_WMPCOREEVENT_OPENSTATECHANGE, WMP_OPEN_STATE_PLAYLIST_CHANGING);
>> if(This->wmpmedia != NULL) {
>> IWMPMedia_Release(This->wmpmedia);
>> }
>> + update_state(This, DISPID_WMPCOREEVENT_OPENSTATECHANGE, WMP_OPEN_STATE_PLAYLIST_CHANGED);
>> + update_state(This, DISPID_WMPCOREEVENT_OPENSTATECHANGE, WMP_OPEN_STATE_PLAYLIST_OPEN_NO_MEDIA);
>> +
>> This->wmpmedia = pMedia;
>> IWMPMedia_AddRef(This->wmpmedia);
>> return S_OK;
>> @@ -1388,19 +1401,31 @@ static HRESULT WINAPI WMPControls_play(IWMPControls *iface)
>> CLSCTX_INPROC_SERVER,
>> &IID_IGraphBuilder,
>> (void **)&This->filter_graph);
>> + update_state(This, DISPID_WMPCOREEVENT_OPENSTATECHANGE, WMP_OPEN_STATE_OPENING_UNKNOWN_URL);
>> +
>> if (SUCCEEDED(hres))
>> hres = IGraphBuilder_RenderFile(This->filter_graph, media->url, NULL);
>> if (SUCCEEDED(hres))
>> hres = IGraphBuilder_QueryInterface(This->filter_graph, &IID_IMediaControl,
>> (void**)&This->media_control);
>> + update_state(This, DISPID_WMPCOREEVENT_OPENSTATECHANGE, WMP_OPEN_STATE_MEDIA_OPEN);
>
> It's similar, is it right in case of loading error?
Probably not.
>> diff --git a/dlls/wmp/tests/media.c b/dlls/wmp/tests/media.c
>> index 6e4a0c170f..f98a60fbfd 100644
>> --- a/dlls/wmp/tests/media.c
>> +++ b/dlls/wmp/tests/media.c
>> @@ -19,9 +19,42 @@
>> #include <wmp.h>
>> #include <olectl.h>
>> #include <nserror.h>
>> +#include <wmpids.h>
>> +#include <math.h>
>>
>> #include "wine/test.h"
>>
>> +#define DEFINE_EXPECT(func) \
>> + static BOOL expect_ ## func = FALSE, called_ ## func = FALSE
>> +
>> +#define SET_EXPECT(func) \
>> + expect_ ## func = TRUE
>> +
>> +#define CHECK_EXPECT(func) \
>> + do { \
>> + ok(expect_ ##func, "unexpected call " #func "\n"); \
>> + called_ ## func = TRUE; \
>> + }while(0)
>> +
>> +#define CHECK_CALLED(func) \
>> + do { \
>> + ok(called_ ## func, "expected " #func "\n"); \
>> + expect_ ## func = called_ ## func = FALSE; \
>> + }while(0)
>> +
>> +#define CHECK_CALLED_OR_BROKEN(func) \
>> + do { \
>> + ok(called_ ## func || broken(TRUE), "expected " #func "\n"); \
>> + expect_ ## func = called_ ## func = FALSE; \
>> + }while(0)
>> +
>> +DEFINE_EXPECT(PLAYSTATE_CHANGE);
>> +DEFINE_EXPECT(OPENSTATE_CHANGE);
>> +
>> +static BOOL open_state;
>> +static BOOL play_state;
>> +static HANDLE playing_event;
>> +
>> static const WCHAR mp3file[] = {'t','e','s','t','.','m','p','3',0};
>> static inline WCHAR *load_resource(const WCHAR *name)
>> {
>> @@ -48,14 +81,114 @@ static inline WCHAR *load_resource(const WCHAR *name)
>> return pathW;
>> }
>>
>> +static ULONG WINAPI Dispatch_AddRef(IDispatch *iface)
>> +{
>> + return 2;
>> +}
>> +
>> +static ULONG WINAPI Dispatch_Release(IDispatch *iface)
>> +{
>> + return 1;
>> +}
>> +
>> +static HRESULT WINAPI Dispatch_GetTypeInfoCount(IDispatch *iface, UINT *pctinfo)
>> +{
>> + ok(0, "unexpected call\n");
>> + return E_NOTIMPL;
>> +}
>> +
>> +static HRESULT WINAPI Dispatch_GetTypeInfo(IDispatch *iface, UINT iTInfo, LCID lcid,
>> + ITypeInfo **ppTInfo)
>> +{
>> + ok(0, "unexpected call\n");
>> + return E_NOTIMPL;
>> +}
>> +
>> +static HRESULT WINAPI Dispatch_GetIDsOfNames(IDispatch *iface, REFIID riid, LPOLESTR *rgszNames,
>> + UINT cNames, LCID lcid, DISPID *rgDispId)
>> +{
>> + ok(0, "unexpected call\n");
>> + return E_NOTIMPL;
>> +}
>> +
>> +static HRESULT WINAPI WMPOCXEvents_QueryInterface(IDispatch *iface, REFIID riid, void **ppv)
>> +{
>> + *ppv = NULL;
>> +
>> + if(IsEqualGUID(&IID__WMPOCXEvents, riid) || IsEqualGUID(&IID_IDispatch, riid)) {
>> + *ppv = iface;
>> + return S_OK;
>> + }
>> +
>> + ok(0, "unexpected riid %s\n", wine_dbgstr_guid(riid));
>> + return E_NOINTERFACE;
>> +}
>> +
>> +static HRESULT WINAPI WMPOCXEvents_Invoke(IDispatch *iface, DISPID dispIdMember, REFIID riid,
>> + LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult,
>> + EXCEPINFO *pExcepInfo, UINT *puArgErr)
>> +{
>> + switch(dispIdMember) {
>> + /* Uncomment below traces to debug wmp events */
>> + case DISPID_WMPCOREEVENT_OPENSTATECHANGE:
>> + CHECK_EXPECT(OPENSTATE_CHANGE);
>> + open_state = V_UI4(pDispParams->rgvarg);
>> + if (winetest_debug > 1)
>> + trace("DISPID_WMPCOREEVENT_OPENSTATECHANGE, %d\n", V_UI4(pDispParams->rgvarg));
>> + break;
>> + case DISPID_WMPCOREEVENT_PLAYSTATECHANGE:
>> + CHECK_EXPECT(PLAYSTATE_CHANGE);
>> + play_state = V_UI4(pDispParams->rgvarg);
>> + if (play_state == WMP_PLAY_STATE_PLAYING) {
>> + SetEvent(playing_event);
>> + }
>> + if (winetest_debug > 1)
>> + trace("DISPID_WMPCOREEVENT_PLAYSTATECHANGE, %d\n", V_UI4(pDispParams->rgvarg));
>> + break;
>
> How about adding more specific tests? You could split CHECK_EXPECT into
> actual states, so it would be like
> CHECK_EXPECT(OpenStateChange_MediaChanging),
> CHECK_EXPECT(PlatStateChange_Waiting) and alike.
Well, one call to something like put_url produces about 10 state
changes, some are playlist related that is functionality we are
missing.
Do we need / want to test for them all?
If we want to be as specific as possible - do we need to test for
order of those changes as well?
>> @@ -87,22 +232,70 @@ static void test_wmp(void)
>>
>> filename = SysAllocString(load_resource(mp3file));
>>
>> + SET_EXPECT(OPENSTATE_CHANGE);
>> + SET_EXPECT(PLAYSTATE_CHANGE);
>> hres = IWMPPlayer4_put_URL(player4, filename);
>> ok(hres == S_OK, "IWMPPlayer4_put_URL failed: %08x\n", hres);
>> + CHECK_CALLED(OPENSTATE_CHANGE);
>> + CHECK_CALLED(PLAYSTATE_CHANGE);
>>
>> + SET_EXPECT(PLAYSTATE_CHANGE);
>> + SET_EXPECT(OPENSTATE_CHANGE);
>> hres = IWMPControls_play(controls);
>> +
>> ok(hres == S_OK, "IWMPControls_play failed: %08x\n", hres);
>> + {
>> + MSG msg;
>> + DWORD start_time = GetTickCount();
>> + DWORD dwTimeout = 5000;
>> + HANDLE handles[1];
>> + handles[0] = playing_event;
>> + do {
>> + DWORD now = GetTickCount();
>> + res = MsgWaitForMultipleObjectsEx(1, handles, start_time + dwTimeout - now,
>> + QS_ALLINPUT ,MWMO_ALERTABLE | MWMO_INPUTAVAILABLE);
>> + if (res == WAIT_OBJECT_0 + 1) {
>> + GetMessageW(&msg, 0, 0, 0);
>> + if (winetest_debug > 1)
>> + trace("Dispatching %d\n", msg.message);
>> + TranslateMessage(&msg);
>> + DispatchMessageW(&msg);
>> + }
>> + }
>> + while (res == WAIT_OBJECT_0 + 1);
>> + ok(res == WAIT_OBJECT_0 || broken(res == WAIT_TIMEOUT), "Timed out while waiting for media to become ready\n");
>> + }
>> + if (res == WAIT_TIMEOUT) {
>> + /* This happens on Vista Ultimate 64 vms
>> + * I have been unable to find out source of this behaviour */
>> + win_skip("Failed to transition media to playing state.\n");
>> + goto playback_skip;
>> + }
>> + CHECK_CALLED(OPENSTATE_CHANGE);
>> + CHECK_CALLED(PLAYSTATE_CHANGE);
>>
>> + SET_EXPECT(OPENSTATE_CHANGE); todo_wine ok(FALSE || broken(TRUE), "WMP in wine changes open state when stopping\n");
>
> This looks bad. If you change tests as I mentioned above, you can just
> add todo_wine where appropriate.
this todo_wine is just TODO message, its not strictly required here. I
am not sure what would change with tracking each individual state.
I can just remove this todo.
>> + SET_EXPECT(PLAYSTATE_CHANGE);
>> hres = IWMPControls_stop(controls);
>> ok(hres == S_OK, "IWMPControls_stop failed: %08x\n", hres);
>> + CHECK_CALLED(PLAYSTATE_CHANGE);
>>
>> /* Already Stopped */
>> hres = IWMPControls_stop(controls);
>> ok(hres == NS_S_WMPCORE_COMMAND_NOT_AVAILABLE, "IWMPControls_stop is available: %08x\n", hres);
>>
>> + SET_EXPECT(OPENSTATE_CHANGE);
>> + SET_EXPECT(PLAYSTATE_CHANGE);
>> hres = IWMPControls_play(controls);
>> ok(hres == S_OK, "IWMPControls_play failed: %08x\n", hres);
>> + CHECK_CALLED_OR_BROKEN(OPENSTATE_CHANGE);
>> + CHECK_CALLED_OR_BROKEN(PLAYSTATE_CHANGE);
>>
>> +playback_skip:
>> + hres = IConnectionPoint_Unadvise(point, dw);
>> + ok(hres == S_OK, "Unadvise failed: %08x\n", hres);
>> +
>> + IConnectionPoint_Release(point);
>> IWMPControls_Release(controls);
>> IWMPPlayer4_Release(player4);
>> IOleObject_Release(oleobj);
>> @@ -114,7 +307,10 @@ START_TEST(media)
>> {
>> CoInitialize(NULL);
>>
>> + playing_event = CreateEventW(NULL, FALSE, FALSE, NULL);
>> test_wmp();
>>
>> + CloseHandle(playing_event);
>> +
>> CoUninitialize();
>> }
>> diff --git a/dlls/wmp/wmp_main.c b/dlls/wmp/wmp_main.c
>> index 29b096f7fd..9a33b2762b 100644
>> --- a/dlls/wmp/wmp_main.c
>> +++ b/dlls/wmp/wmp_main.c
>> @@ -25,6 +25,7 @@
>> WINE_DEFAULT_DEBUG_CHANNEL(wmp);
>>
>> HINSTANCE wmp_instance;
>> +DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0);
>>
>> static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv)
>> {
>> diff --git a/dlls/wmp/wmp_private.h b/dlls/wmp/wmp_private.h
>> index 05ad5889e2..9e84d56ea8 100644
>> --- a/dlls/wmp/wmp_private.h
>> +++ b/dlls/wmp/wmp_private.h
>> @@ -83,6 +83,7 @@ WMPMedia *unsafe_impl_from_IWMPMedia(IWMPMedia *iface) DECLSPEC_HIDDEN;
>> HRESULT create_media_from_url(BSTR url, IWMPMedia **ppMedia) DECLSPEC_HIDDEN;
>> void ConnectionPointContainer_Init(WindowsMediaPlayer *wmp) DECLSPEC_HIDDEN;
>> void ConnectionPointContainer_Destroy(WindowsMediaPlayer *wmp) DECLSPEC_HIDDEN;
>> +void call_sink(ConnectionPoint *This, DISPID dispid, DISPPARAMS *dispparams) DECLSPEC_HIDDEN;
>>
>> HRESULT WINAPI WMPFactory_CreateInstance(IClassFactory*,IUnknown*,REFIID,void**) DECLSPEC_HIDDEN;
>>
>> diff --git a/include/wmpids.h b/include/wmpids.h
>> new file mode 100644
>> index 0000000000..2792f850fa
>> --- /dev/null
>> +++ b/include/wmpids.h
>> @@ -0,0 +1,63 @@
>> +/*
>> + * This library is free software; you can redistribute it and/or
>> + * modify it under the terms of the GNU Lesser General Public
>> + * License as published by the Free Software Foundation; either
>> + * version 2.1 of the License, or (at your option) any later version.
>> + *
>> + * This library is distributed in the hope that it will be useful,
>> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
>> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
>> + * Lesser General Public License for more details.
>> + *
>> + * You should have received a copy of the GNU Lesser General Public
>> + * License along with this library; if not, write to the Free Software
>> + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
>> + */
>> +
>> +
>> +/* play state */
>> +#define WMP_PLAY_STATE_UNDEFINED 0
>> +#define WMP_PLAY_STATE_STOPPED 1
>> +#define WMP_PLAY_STATE_PAUSED 2
>> +#define WMP_PLAY_STATE_PLAYING 3
>> +#define WMP_PLAY_STATE_SCAN_FORWARD 4
>> +#define WMP_PLAY_STATE_SCAN_REVERSE 5
>> +#define WMP_PLAY_STATE_BUFFERING 6
>> +#define WMP_PLAY_STATE_WAITING 7
>> +#define WMP_PLAY_STATE_MEDIA_ENDED 8
>> +#define WMP_PLAY_STATE_TRANSITIONING 9
>> +#define WMP_PLAY_STATE_READY 10
>> +#define WMP_PLAY_STATE_RECONNECTING 11
>> +
>> +/* open state */
>> +#define WMP_OPEN_STATE_UNDEFINED 0
>> +#define WMP_OPEN_STATE_PLAYLIST_CHANGING 1
>> +#define WMP_OPEN_STATE_PLAYLIST_LOCATING 2
>> +#define WMP_OPEN_STATE_PLAYLIST_CONNECTING 3
>> +#define WMP_OPEN_STATE_PLAYLIST_LOADING 4
>> +#define WMP_OPEN_STATE_PLAYLIST_OPENING 5
>> +#define WMP_OPEN_STATE_PLAYLIST_OPEN_NO_MEDIA 6
>> +#define WMP_OPEN_STATE_PLAYLIST_CHANGED 7
>> +#define WMP_OPEN_STATE_MEDIA_CHANGING 8
>> +#define WMP_OPEN_STATE_MEDIA_LOCATING 9
>> +#define WMP_OPEN_STATE_MEDIA_CONNECTING 10
>> +#define WMP_OPEN_STATE_MEDIA_LOADING 11
>> +#define WMP_OPEN_STATE_MEDIA_OPENING 12
>> +#define WMP_OPEN_STATE_MEDIA_OPEN 13
>> +#define WMP_OPEN_STATE_BEGIN_CODEC_ACQUISITION 14
>> +#define WMP_OPEN_STATE_END_CODEC_ACQUISITION 15
>> +#define WMP_OPEN_STATE_BEGIN_LICENSE_ACQUISITION 16
>> +#define WMP_OPEN_STATE_END_LICENSE_ACQUISITION 17
>> +#define WMP_OPEN_STATE_BEGIN_INDIVIDUALIZATION 18
>> +#define WMP_OPEN_STATE_END_INDIVIDUALIZATION 19
>> +#define WMP_OPEN_STATE_MEDIA_WAITING 20
>> +#define WMP_OPEN_STATE_OPENING_UNKNOWN_URL 21
>
> Where do those come from? Shouldn't you use WMPOpenState and
> WMPPlayState instead?
I made those up, for w/e reason I was blind and didn't see those
enums. I will change them to enums from msdn.
March 29, 2018
Re: [PATCH v7 4/6] wmp: Add seeking and duration
by Anton Romanov
On Thu, Mar 29, 2018 at 7:24 AM, Zebediah Figura <z.figura12(a)gmail.com> wrote:
> On 29/03/18 05:10, Alistair Leslie-Hughes wrote:
>> Hi Anton,
>>
>> This is more of general thing with this patch set.
>>
>> I would like to see more errors tested.
>>
>>
>> On 29/03/18 02:31, Anton Romanov wrote:
>>> Signed-off-by: Anton Romanov <theli.ua(a)gmail.com>
>>> ---
>>>
>>> SetEvent(This->stop_event);
>>> WaitForSingleObject(This->event_thread, INFINITE);
>>> @@ -1492,15 +1518,33 @@ static HRESULT WINAPI WMPControls_fastReverse(IWMPControls *iface)
>>> static HRESULT WINAPI WMPControls_get_currentPosition(IWMPControls *iface, DOUBLE *pdCurrentPosition)
>> What happens when an NULL value is passed in?
>>
>>> static HRESULT WINAPI WMPControls_put_currentPosition(IWMPControls *iface, DOUBLE dCurrentPosition)
>>> {
>>>
>> What happens when an negative value is passed in?
>>
>
> I wouldn't be surprised if the answer is "the same thing that happens
> when a negative value is passed into IMediaSeeking_SetPositions()". That
> function (and quartz in general...) could certainly use some more tests
> as well.
Well, basically yes, what Zeb said.
March 29, 2018
Re: [PATCH] shell32/tests: Use the available ARRAY_SIZE() macro
by Marvin
Hi,
While running your changed tests on Windows, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at
https://testbot.winehq.org/JobDetails.pl?Key=37250
Your paranoid android.
=== w2003std (32 bit shlfolder) ===
shlfolder.c:4955: Test failed: MKDIR: Expected wndproc to be called
shlfolder.c:4867: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 8)
shlfolder.c:4955: Test failed: CREATE: Expected wndproc to be called
shlfolder.c:4867: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 2)
shlfolder.c:4955: Test failed: RMDIR: Expected wndproc to be called
shlfolder.c:4867: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 10)
shlfolder.c:4955: Test failed: MKDIR: Expected wndproc to be called
shlfolder.c:4867: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 6ac)
shlfolder.c:4955: Test failed: CREATE: Expected wndproc to be called
shlfolder.c:4867: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 6ac)
shlfolder.c:4955: Test failed: RMDIR: Expected wndproc to be called
shlfolder.c:4867: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 6ac)
March 29, 2018
Re: [PATCH] wmp/tests: Stop crash when setting a media option.
by Jacek Caban
On 03/29/2018 04:36 PM, Zebediah Figura wrote:
> For what it's worth, it seems to me that it'd be more desirable to work
> around a Windows bug rather than skip the test entirely.
I'm not sure I agree. If we suspect that it messes ref counting, you
can't be sure that the workaround will make it behave correctly, all you
know is that it happens to avoid a crash. It's likely that the library
may be in a wrong state under the hood. If we hit another crash on this
platform, we will need to invest more time on investigating it for
questionable benefit.
Jacek
March 29, 2018
[PATCH] comctl32/tests: Use the available ARRAY_SIZE() macro
by Michael Stefaniuc
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/comctl32/tests/button.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/comctl32/tests/button.c b/dlls/comctl32/tests/button.c
index 56547c6963..4c07f0adcd 100644
--- a/dlls/comctl32/tests/button.c
+++ b/dlls/comctl32/tests/button.c
@@ -549,7 +549,7 @@ static void test_button_messages(void)
hfont2 = CreateFontIndirectA(&logfont);
ok(hfont2 != NULL, "Failed to create Tahoma font\n");
- for (i = 0; i < sizeof(button)/sizeof(button[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(button); i++)
{
HFONT prevfont, hfont;
MSG msg;
--
2.14.3
March 29, 2018
[PATCH] advapi32: Use the available ARRAY_SIZE() macro
by Michael Stefaniuc
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/advapi32/registry.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/advapi32/registry.c b/dlls/advapi32/registry.c
index 44b4bedb07..cc2b2a89de 100644
--- a/dlls/advapi32/registry.c
+++ b/dlls/advapi32/registry.c
@@ -2373,7 +2373,7 @@ LSTATUS WINAPI RegSaveKeyW( HKEY hkey, LPCWSTR file, LPSECURITY_ATTRIBUTES sa )
if (!(hkey = get_special_root_hkey( hkey, 0 ))) return ERROR_INVALID_HANDLE;
err = GetLastError();
- GetFullPathNameW( file, sizeof(buffer)/sizeof(WCHAR), buffer, &nameW );
+ GetFullPathNameW( file, ARRAY_SIZE( buffer ), buffer, &nameW );
for (;;)
{
@@ -2708,7 +2708,7 @@ LSTATUS WINAPI RegConnectRegistryW( LPCWSTR lpMachineName, HKEY hKey,
}
else {
WCHAR compName[MAX_COMPUTERNAME_LENGTH + 1];
- DWORD len = sizeof(compName) / sizeof(WCHAR);
+ DWORD len = ARRAY_SIZE( compName );
/* MSDN says lpMachineName must start with \\ : not so */
if( lpMachineName[0] == '\\' && lpMachineName[1] == '\\')
--
2.14.3
March 29, 2018
[PATCH] advapi32/tests: Use the available ARRAY_SIZE() macro
by Michael Stefaniuc
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/advapi32/tests/registry.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/advapi32/tests/registry.c b/dlls/advapi32/tests/registry.c
index cc17b80465..1df117bfbb 100644
--- a/dlls/advapi32/tests/registry.c
+++ b/dlls/advapi32/tests/registry.c
@@ -1755,7 +1755,7 @@ static void test_reg_query_value(void)
/* unicode - try size in WCHARS */
SetLastError(0xdeadbeef);
- size = sizeof(valW) / sizeof(WCHAR);
+ size = ARRAY_SIZE(valW);
ret = RegQueryValueW(subkey, NULL, valW, &size);
ok(ret == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", ret);
ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError());
@@ -2010,7 +2010,7 @@ static void test_reg_query_info(void)
lstrcpyW(expectbufferW, subkey_classW);
ok(!memcmp(classbufferW, expectbufferW, sizeof(classbufferW)),
"classbufferW = %s, expected %s\n",
- wine_dbgstr_wn(classbufferW, sizeof(classbufferW) / sizeof(WCHAR)), wine_dbgstr_w(expectbufferW));
+ wine_dbgstr_wn(classbufferW, ARRAY_SIZE(classbufferW)), wine_dbgstr_w(expectbufferW));
memset(classbufferW, 0x55, sizeof(classbufferW));
classlen = 0xdeadbeef;
@@ -2021,7 +2021,7 @@ static void test_reg_query_info(void)
lstrcpyW(expectbufferW, subkey_classW);
ok(!memcmp(classbufferW, expectbufferW, sizeof(classbufferW)),
"classbufferW = %s, expected %s\n",
- wine_dbgstr_wn(classbufferW, sizeof(classbufferW) / sizeof(WCHAR)), wine_dbgstr_w(expectbufferW));
+ wine_dbgstr_wn(classbufferW, ARRAY_SIZE(classbufferW)), wine_dbgstr_w(expectbufferW));
RegDeleteKeyA(subsubkey, "");
RegCloseKey(subsubkey);
--
2.14.3
March 29, 2018
[PATCH] appwiz.cpl: Use the available ARRAY_SIZE() macro
by Michael Stefaniuc
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/appwiz.cpl/addons.c | 4 ++--
dlls/appwiz.cpl/appwiz.c | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/dlls/appwiz.cpl/addons.c b/dlls/appwiz.cpl/addons.c
index 76f00a0a3b..67bf037beb 100644
--- a/dlls/appwiz.cpl/addons.c
+++ b/dlls/appwiz.cpl/addons.c
@@ -171,7 +171,7 @@ static void set_status(DWORD id)
HWND status = GetDlgItem(install_dialog, ID_DWL_STATUS);
WCHAR buf[64];
- LoadStringW(hInst, id, buf, sizeof(buf)/sizeof(WCHAR));
+ LoadStringW(hInst, id, buf, ARRAY_SIZE(buf));
SendMessageW(status, WM_SETTEXT, 0, (LPARAM)buf);
}
@@ -514,7 +514,7 @@ static HRESULT WINAPI InstallCallback_OnStopBinding(IBindStatusCallback *iface,
}else {
WCHAR message[256];
- if(LoadStringW(hInst, IDS_INVALID_SHA, message, sizeof(message)/sizeof(WCHAR)))
+ if(LoadStringW(hInst, IDS_INVALID_SHA, message, ARRAY_SIZE(message)))
MessageBoxW(NULL, message, NULL, MB_ICONERROR);
}
diff --git a/dlls/appwiz.cpl/appwiz.c b/dlls/appwiz.cpl/appwiz.c
index dae9df9035..af893b8391 100644
--- a/dlls/appwiz.cpl/appwiz.c
+++ b/dlls/appwiz.cpl/appwiz.c
@@ -450,10 +450,10 @@ static void InstallProgram(HWND hWnd)
WCHAR FilterBufferW[MAX_PATH];
WCHAR FileNameBufferW[MAX_PATH];
- LoadStringW(hInst, IDS_CPL_TITLE, titleW, sizeof(titleW)/sizeof(WCHAR));
- LoadStringW(hInst, IDS_FILTER_INSTALLS, filter_installs, sizeof(filter_installs)/sizeof(WCHAR));
- LoadStringW(hInst, IDS_FILTER_PROGRAMS, filter_programs, sizeof(filter_programs)/sizeof(WCHAR));
- LoadStringW(hInst, IDS_FILTER_ALL, filter_all, sizeof(filter_all)/sizeof(WCHAR));
+ LoadStringW(hInst, IDS_CPL_TITLE, titleW, ARRAY_SIZE(titleW));
+ LoadStringW(hInst, IDS_FILTER_INSTALLS, filter_installs, ARRAY_SIZE(filter_installs));
+ LoadStringW(hInst, IDS_FILTER_PROGRAMS, filter_programs, ARRAY_SIZE(filter_programs));
+ LoadStringW(hInst, IDS_FILTER_ALL, filter_all, ARRAY_SIZE(filter_all));
snprintfW( FilterBufferW, MAX_PATH, filters, filter_installs, 0, 0,
filter_programs, 0, 0, filter_all, 0, 0 );
--
2.14.3
March 29, 2018
[PATCH] comdlg32: Use the available ARRAY_SIZE() macro
by Michael Stefaniuc
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/comdlg32/filedlg.c | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/dlls/comdlg32/filedlg.c b/dlls/comdlg32/filedlg.c
index d788d4fb42..43d5f41180 100644
--- a/dlls/comdlg32/filedlg.c
+++ b/dlls/comdlg32/filedlg.c
@@ -1641,7 +1641,7 @@ static LRESULT FILEDLG95_InitControls(HWND hwnd)
else if (fodInfos->DlgInfos.dwDlgProp & FODPROP_SAVEDLG)
{
WCHAR buf[64];
- LoadStringW(COMDLG32_hInstance, IDS_SAVE_AS, buf, sizeof(buf)/sizeof(WCHAR));
+ LoadStringW(COMDLG32_hInstance, IDS_SAVE_AS, buf, ARRAY_SIZE(buf));
SetWindowTextW(hwnd, buf);
}
@@ -1860,9 +1860,9 @@ static LRESULT FILEDLG95_InitControls(HWND hwnd)
if (fodInfos->DlgInfos.dwDlgProp & FODPROP_SAVEDLG)
{
WCHAR buf[16];
- LoadStringW(COMDLG32_hInstance, IDS_SAVE_BUTTON, buf, sizeof(buf)/sizeof(WCHAR));
+ LoadStringW(COMDLG32_hInstance, IDS_SAVE_BUTTON, buf, ARRAY_SIZE(buf));
SetDlgItemTextW(hwnd, IDOK, buf);
- LoadStringW(COMDLG32_hInstance, IDS_SAVE_IN, buf, sizeof(buf)/sizeof(WCHAR));
+ LoadStringW(COMDLG32_hInstance, IDS_SAVE_IN, buf, ARRAY_SIZE(buf));
SetDlgItemTextW(hwnd, IDC_LOOKINSTATIC, buf);
}
@@ -2322,7 +2322,8 @@ static void FILEDLG95_MRU_save_filename(LPCWSTR filename)
HKEY hkey;
/* get the current executable's name */
- if(!GetModuleFileNameW(GetModuleHandleW(NULL), module_path, sizeof(module_path)/sizeof(module_path[0]))) {
+ if (!GetModuleFileNameW(GetModuleHandleW(NULL), module_path, ARRAY_SIZE(module_path)))
+ {
WARN("GotModuleFileName failed: %d\n", GetLastError());
return;
}
@@ -2409,7 +2410,8 @@ static void FILEDLG95_MRU_load_filename(LPWSTR stored_path)
WCHAR module_path[MAX_PATH], *module_name;
/* get the current executable's name */
- if(!GetModuleFileNameW(GetModuleHandleW(NULL), module_path, sizeof(module_path)/sizeof(module_path[0]))) {
+ if (!GetModuleFileNameW(GetModuleHandleW(NULL), module_path, ARRAY_SIZE(module_path)))
+ {
WARN("GotModuleFileName failed: %d\n", GetLastError());
return;
}
@@ -2428,10 +2430,10 @@ void FILEDLG95_OnOpenMessage(HWND hwnd, int idCaption, int idText)
WCHAR strMsgTitle[MAX_PATH];
WCHAR strMsgText [MAX_PATH];
if (idCaption)
- LoadStringW(COMDLG32_hInstance, idCaption, strMsgTitle, sizeof(strMsgTitle)/sizeof(WCHAR));
+ LoadStringW(COMDLG32_hInstance, idCaption, strMsgTitle, ARRAY_SIZE(strMsgTitle));
else
strMsgTitle[0] = '\0';
- LoadStringW(COMDLG32_hInstance, idText, strMsgText, sizeof(strMsgText)/sizeof(WCHAR));
+ LoadStringW(COMDLG32_hInstance, idText, strMsgText, ARRAY_SIZE(strMsgText));
MessageBoxW(hwnd,strMsgText, strMsgTitle, MB_OK | MB_ICONHAND);
}
@@ -4128,7 +4130,7 @@ static BOOL BrowseSelectedFolder(HWND hwnd)
pidlSelection, SBSP_RELATIVE ) ) )
{
WCHAR buf[64];
- LoadStringW( COMDLG32_hInstance, IDS_PATHNOTEXISTING, buf, sizeof(buf)/sizeof(WCHAR) );
+ LoadStringW( COMDLG32_hInstance, IDS_PATHNOTEXISTING, buf, ARRAY_SIZE(buf));
MessageBoxW( hwnd, buf, fodInfos->title, MB_OK | MB_ICONEXCLAMATION );
}
bBrowseSelFolder = TRUE;
--
2.14.3
March 29, 2018