Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com ---
Here's the patch series with all of the relevant tests for LBS_NODATA implementation. To avoid having to use todo_wine for no reason which then gets replaced, the tests are simply placed after the given patch that requires them to prove its correct behavior. For example, the second patch tests SetCount and the third one tests the creation styles so that the first patch is proven to be Windows' behavior.
The later patches also have their own tests at the end of the series, which should conclude all relevant tests for LBS_NODATA.
Please note that the final implementation of LBS_NODATA that comes after this won't affect the tests; it is purely for performance and memory usage (as that is the whole point of the style to begin with). So these patches can be committed by themselves and still be completely correct in regards to Windows behavior. For example if you simply run the tests without the other patches, they will fail on Wine (rightfully).
dlls/comctl32/listbox.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/comctl32/listbox.c b/dlls/comctl32/listbox.c index 2137ef8..0a7c341 100644 --- a/dlls/comctl32/listbox.c +++ b/dlls/comctl32/listbox.c @@ -1752,7 +1752,7 @@ static LRESULT LISTBOX_SetCount( LB_DESCR *descr, INT count ) { LRESULT ret;
- if (HAS_STRINGS(descr)) + if (!(descr->style & LBS_NODATA)) { SetLastError(ERROR_SETCOUNT_ON_BAD_LB); return LB_ERR; @@ -2518,6 +2518,9 @@ static BOOL LISTBOX_Create( HWND hwnd, LPHEADCOMBO lphc ) if (descr->style & LBS_OWNERDRAWVARIABLE) descr->style |= LBS_NOINTEGRALHEIGHT; descr->item_height = LISTBOX_SetFont( descr, 0 );
+ if ((descr->style & (LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_SORT)) != LBS_OWNERDRAWFIXED) + descr->style &= ~LBS_NODATA; + if (descr->style & LBS_OWNERDRAWFIXED) { if( descr->lphc && (descr->lphc->dwStyle & CBS_DROPDOWN))
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/comctl32/tests/listbox.c | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/dlls/comctl32/tests/listbox.c b/dlls/comctl32/tests/listbox.c index c9d13a8..16efa60 100644 --- a/dlls/comctl32/tests/listbox.c +++ b/dlls/comctl32/tests/listbox.c @@ -1752,6 +1752,13 @@ static void test_set_count( void ) GetUpdateRect( listbox, &r, TRUE ); ok( !IsRectEmpty( &r ), "got empty rect\n");
+ DestroyWindow( listbox ); + + listbox = create_listbox( LBS_OWNERDRAWFIXED | WS_CHILD | WS_VISIBLE, parent ); + + ret = SendMessageA( listbox, LB_SETCOUNT, 100, 0 ); + ok( ret == LB_ERR, "expected %d, got %d\n", LB_ERR, ret ); + DestroyWindow( listbox ); DestroyWindow( parent ); }
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=43963
Your paranoid android.
=== wvistau64 (32 bit Windows report) ===
comctl32: listbox.c:1129: Test failed: SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, *) failed err 18
=== wvistau64_zh_CN (32 bit Windows report) ===
comctl32: listbox.c:1129: Test failed: SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, *) failed err 18
=== wvistau64_fr (32 bit Windows report) ===
comctl32: listbox.c:1129: Test failed: SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, *) failed err 18
=== wvistau64_he (32 bit Windows report) ===
comctl32: listbox.c:1129: Test failed: SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, *) failed err 18
=== wvistau64 (64 bit Windows report) ===
comctl32: listbox.c:1129: Test failed: SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, *) failed err 18
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/comctl32/tests/listbox.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
diff --git a/dlls/comctl32/tests/listbox.c b/dlls/comctl32/tests/listbox.c index 16efa60..ad341c5 100644 --- a/dlls/comctl32/tests/listbox.c +++ b/dlls/comctl32/tests/listbox.c @@ -1763,6 +1763,26 @@ static void test_set_count( void ) DestroyWindow( parent ); }
+static void test_nodata_invalid_styles( void ) +{ + static const DWORD style[] = + { + 0, LBS_OWNERDRAWVARIABLE, LBS_SORT, LBS_HASSTRINGS, + LBS_OWNERDRAWFIXED | LBS_SORT, LBS_OWNERDRAWFIXED | LBS_HASSTRINGS + }; + HWND parent, listbox; + UINT i; + + parent = create_parent(); + for (i = 0; i < ARRAY_SIZE(style); i++) + { + listbox = create_listbox(style[i] | LBS_NODATA | WS_CHILD | WS_VISIBLE, parent); + ok(SendMessageA(listbox, LB_SETCOUNT, 100, 0) == LB_ERR, "LBS_NODATA enabled with incompatible styles 0x%X\n", style[i]); + DestroyWindow(listbox); + } + DestroyWindow(parent); +} + static int lb_getlistboxinfo;
static LRESULT WINAPI listbox_subclass_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) @@ -2204,6 +2224,7 @@ START_TEST(listbox) test_listbox_LB_DIR(); test_listbox_dlgdir(); test_set_count(); + test_nodata_invalid_styles(); test_GetListBoxInfo(); test_missing_lbuttonup(); test_extents();
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=43964
Your paranoid android.
=== wvistau64 (32 bit Windows report) ===
comctl32: listbox.c:1129: Test failed: SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, *) failed err 18
=== wvistau64_zh_CN (32 bit Windows report) ===
comctl32: listbox.c:1129: Test failed: SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, *) failed err 18
=== wvistau64_fr (32 bit Windows report) ===
comctl32: listbox.c:1129: Test failed: SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, *) failed err 18
=== wvistau64_he (32 bit Windows report) ===
comctl32: listbox.c:1129: Test failed: SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, *) failed err 18
=== wvistau64 (64 bit Windows report) ===
comctl32: listbox.c:1129: Test failed: SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, *) failed err 18
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com ---
Spotted by tests and it simply makes no sense to have both (see next patch).
dlls/comctl32/listbox.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/dlls/comctl32/listbox.c b/dlls/comctl32/listbox.c index 0a7c341..5e33466 100644 --- a/dlls/comctl32/listbox.c +++ b/dlls/comctl32/listbox.c @@ -2523,6 +2523,9 @@ static BOOL LISTBOX_Create( HWND hwnd, LPHEADCOMBO lphc )
if (descr->style & LBS_OWNERDRAWFIXED) { + /* Windows accepts both, but FIXED overrides VARIABLE */ + descr->style &= ~LBS_OWNERDRAWVARIABLE; + if( descr->lphc && (descr->lphc->dwStyle & CBS_DROPDOWN)) { /* WinWord gets VERY unhappy if we send WM_MEASUREITEM from here */
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com ---
Proves previous patch's behavior.
dlls/comctl32/tests/listbox.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+)
diff --git a/dlls/comctl32/tests/listbox.c b/dlls/comctl32/tests/listbox.c index ad341c5..e7777d1 100644 --- a/dlls/comctl32/tests/listbox.c +++ b/dlls/comctl32/tests/listbox.c @@ -436,6 +436,32 @@ static void test_ownerdraw(void) DestroyWindow(parent); }
+static void test_both_ownerdraw(void) +{ + HWND hLB; + INT ret; + + /* test both FIXED and VARIABLE at once, since FIXED should override VARIABLE */ + hLB = CreateWindowA(WC_LISTBOXA, "TestList", LBS_OWNERDRAWFIXED | LBS_OWNERDRAWVARIABLE, 0, 0, 100, 100, NULL, NULL, NULL, 0); + ok(hLB != NULL, "last error 0x%08x\n", GetLastError()); + if (!hLB) return; + + ret = SendMessageA(hLB, LB_INSERTSTRING, -1, 0); + ok(ret == 0, "expected 0, got %d\n", ret); + ret = SendMessageA(hLB, LB_INSERTSTRING, -1, 0); + ok(ret == 1, "expected 1, got %d\n", ret); + + ret = SendMessageA(hLB, LB_SETITEMHEIGHT, 0, 13); + ok(ret == LB_OKAY, "LB_SETITEMHEIGHT failed: %d\n", ret); + ret = SendMessageA(hLB, LB_SETITEMHEIGHT, 1, 42); + ok(ret == LB_OKAY, "LB_SETITEMHEIGHT failed: %d\n", ret); + + ret = SendMessageA(hLB, LB_GETITEMHEIGHT, 0, 0); + ok(ret == 42, "LBS_OWNERDRAWFIXED did not override LBS_OWNERDRAWVARIABLE, got height %d\n", ret); + + DestroyWindow (hLB); +} + #define listbox_test_query(exp, got) \ ok(exp.selected == got.selected, "expected selected %d, got %d\n", exp.selected, got.selected); \ ok(exp.anchor == got.anchor, "expected anchor %d, got %d\n", exp.anchor, got.anchor); \ @@ -2216,6 +2242,7 @@ START_TEST(listbox) test_listbox(); test_item_height(); test_ownerdraw(); + test_both_ownerdraw(); test_LB_SELITEMRANGE(); test_LB_SETCURSEL(); test_listbox_height();
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=43966
Your paranoid android.
=== wvistau64 (32 bit Windows report) ===
comctl32: listbox.c:1155: Test failed: SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, *) failed err 18
=== wvistau64_zh_CN (32 bit Windows report) ===
comctl32: listbox.c:1155: Test failed: SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, *) failed err 18
=== wvistau64_fr (32 bit Windows report) ===
comctl32: listbox.c:1155: Test failed: SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, *) failed err 18
=== wvistau64_he (32 bit Windows report) ===
comctl32: listbox.c:1155: Test failed: SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, *) failed err 18
=== wvistau64 (64 bit Windows report) ===
comctl32: listbox.c:1155: Test failed: SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, *) failed err 18
With LBS_NODATA listboxes, LB_GETTEXT always retrieves the value zero, LB_GETITEMDATA returns zero, and LB_SETITEMDATA does nothing. However, all of them do check for valid indices and return LB_ERR if not valid.
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com ---
The next tests patch in the series deals with this.
dlls/comctl32/listbox.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/dlls/comctl32/listbox.c b/dlls/comctl32/listbox.c index 5e33466..ab01430 100644 --- a/dlls/comctl32/listbox.c +++ b/dlls/comctl32/listbox.c @@ -762,7 +762,8 @@ static LRESULT LISTBOX_GetText( LB_DESCR *descr, INT index, LPWSTR buffer, BOOL } else { if (buffer) - *((DWORD *)buffer) = *(DWORD *)&descr->items[index].data; + *((DWORD *)buffer) = (descr->style & LBS_NODATA) ? 0 : + *(DWORD *)&descr->items[index].data; len = sizeof(DWORD); } return len; @@ -2635,7 +2636,7 @@ static LRESULT CALLBACK LISTBOX_WindowProc( HWND hwnd, UINT msg, WPARAM wParam, SetLastError(ERROR_INVALID_INDEX); return LB_ERR; } - return descr->items[wParam].data; + return (descr->style & LBS_NODATA) ? 0 : descr->items[wParam].data;
case LB_SETITEMDATA: if (((INT)wParam < 0) || ((INT)wParam >= descr->nb_items)) @@ -2643,7 +2644,7 @@ static LRESULT CALLBACK LISTBOX_WindowProc( HWND hwnd, UINT msg, WPARAM wParam, SetLastError(ERROR_INVALID_INDEX); return LB_ERR; } - descr->items[wParam].data = lParam; + if (!(descr->style & LBS_NODATA)) descr->items[wParam].data = lParam; /* undocumented: returns TRUE, not LB_OKAY (0) */ return TRUE;
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com ---
This is what Windows does (see next patch for tests).
dlls/comctl32/listbox.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/comctl32/listbox.c b/dlls/comctl32/listbox.c index ab01430..7747c33 100644 --- a/dlls/comctl32/listbox.c +++ b/dlls/comctl32/listbox.c @@ -919,6 +919,9 @@ static INT LISTBOX_FindString( LB_DESCR *descr, INT start, LPCWSTR str, BOOL exa } else { + if (descr->style & LBS_NODATA) + return LB_ERR; + if (exact && (descr->style & LBS_SORT)) /* If sorted, use a WM_COMPAREITEM binary search */ return LISTBOX_FindStringPos( descr, str, TRUE ); @@ -2450,7 +2453,7 @@ static LRESULT LISTBOX_HandleChar( LB_DESCR *descr, WCHAR charW ) (LPARAM)descr->self ); if (caret == -2) return 0; } - if (caret == -1) + if (caret == -1 && !(descr->style & LBS_NODATA)) caret = LISTBOX_FindString( descr, descr->focus_item, str, FALSE); if (caret != -1) {
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com ---
The last batch of tests that should prove the previous patches' behavior matches Windows.
dlls/comctl32/tests/listbox.c | 99 ++++++++++++++++++++++++++++++----- 1 file changed, 87 insertions(+), 12 deletions(-)
diff --git a/dlls/comctl32/tests/listbox.c b/dlls/comctl32/tests/listbox.c index e7777d1..a84adb2 100644 --- a/dlls/comctl32/tests/listbox.c +++ b/dlls/comctl32/tests/listbox.c @@ -167,10 +167,10 @@ static void keypress(HWND handle, WPARAM keycode, BYTE scancode, BOOL extended) listbox_todo_field_ok(t, s, caret, got); \ listbox_todo_field_ok(t, s, selcount, got)
-static void run_test(const struct listbox_test test) +static void run_test(const struct listbox_test test, DWORD extra_styles) { struct listbox_stat answer; - HWND hLB=create_listbox (test.prop.add_style, 0); + HWND hLB=create_listbox (test.prop.add_style | extra_styles, 0); RECT second_item; int i, res;
@@ -190,13 +190,13 @@ static void run_test(const struct listbox_test test)
DestroyWindow(hLB);
- hLB = create_listbox(test.prop.add_style, 0); + hLB = create_listbox(test.prop.add_style | extra_styles, 0);
SendMessageA(hLB, LB_SELITEMRANGE, TRUE, MAKELPARAM(1, 2)); listbox_query(hLB, &answer); listbox_ok(test, sel, answer);
- for (i = 0; i < 4; i++) + if (!(extra_styles & LBS_NODATA)) for (i = 0; i < 4; i++) { DWORD size = SendMessageA(hLB, LB_GETTEXTLEN, i, 0); int resA, resW; @@ -1809,6 +1809,71 @@ static void test_nodata_invalid_styles( void ) DestroyWindow(parent); }
+static void test_nodata( void ) +{ + static const UINT invalid_idx[] = { -2, 2 }; + static const UINT valid_idx[] = { 0, 1 }; + HWND listbox; + DWORD_PTR data; + INT i, ret; + + listbox = CreateWindowA(WC_LISTBOXA, "TestList", LBS_NODATA | LBS_OWNERDRAWFIXED | WS_VISIBLE, + 0, 0, 100, 100, NULL, NULL, NULL, 0); + ok(listbox != NULL, "last error 0x%08x\n", GetLastError()); + if (!listbox) return; + + ret = SendMessageA(listbox, LB_INSERTSTRING, -1, 0); + ok(ret == 0, "expected 0, got %d\n", ret); + ret = SendMessageA(listbox, LB_INSERTSTRING, -1, 0); + ok(ret == 1, "expected 1, got %d\n", ret); + ret = SendMessageA(listbox, LB_GETCOUNT, 0, 0); + ok(ret == 2, "Expected 2 items, got %d\n", ret); + + /* try invalid indices */ + for (i = 0; i < ARRAY_SIZE(invalid_idx); i++) + { + ret = SendMessageA(listbox, LB_SETITEMDATA, invalid_idx[i], 42); + ok(ret == LB_ERR, "got %d\n", ret); + ret = SendMessageA(listbox, LB_GETTEXTLEN, invalid_idx[i], 0); + ok(ret == LB_ERR, "got %d\n", ret); + if (ret == LB_ERR) + { + ret = SendMessageA(listbox, LB_GETTEXT, invalid_idx[i], (LPARAM)&data); + ok(ret == LB_ERR, "got %d\n", ret); + } + ret = SendMessageA(listbox, LB_GETITEMDATA, invalid_idx[i], 0); + ok(ret == LB_ERR, "got %d\n", ret); + } + + /* valid indices should always retreive zeros */ + for (i = 0; i < ARRAY_SIZE(valid_idx); i++) + { + ret = SendMessageA(listbox, LB_SETITEMDATA, valid_idx[i], 42); + ok(ret == TRUE, "got %d\n", ret); + ret = SendMessageA(listbox, LB_GETTEXTLEN, valid_idx[i], 0); + ok(ret <= sizeof(data), "got %d\n", ret); + if (ret <= sizeof(data)) + { + data = 0xdeadbeef; + ret = SendMessageA(listbox, LB_GETTEXT, valid_idx[i], (LPARAM)&data); + ok(ret <= sizeof(data), "got %d\n", ret); + ok(data == 0, "LB_GETTEXT should retrieve 0 with LBS_NODATA, got 0x%lx\n", data); + } + ret = SendMessageA(listbox, LB_GETITEMDATA, valid_idx[i], 0); + ok(ret == 0, "LB_GETDATA should return 0 with LBS_NODATA, got %d\n", ret); + } + + /* test more invalid messages with LBS_NODATA */ + ret = SendMessageA(listbox, LB_FINDSTRING, 1, 42); + ok(ret == LB_ERR, "got %d\n", ret); + ret = SendMessageA(listbox, LB_FINDSTRINGEXACT, 1, 42); + ok(ret == LB_ERR, "got %d\n", ret); + ret = SendMessageA(listbox, LB_SELECTSTRING, 1, 42); + ok(ret == LB_ERR, "got %d\n", ret); + + DestroyWindow(listbox); +} + static int lb_getlistboxinfo;
static LRESULT WINAPI listbox_subclass_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) @@ -2104,14 +2169,23 @@ static void test_listbox(void) { 2, 2, 2, LB_ERR}, {0,0,0,0}, {LB_ERR, LB_ERR, 0, LB_ERR}, {0,0,0,0}};
- run_test(SS); - run_test(SS_NS); - run_test(MS); - run_test(MS_NS); - run_test(ES); - run_test(ES_NS); - run_test(EMS); - run_test(EMS_NS); + run_test(SS, 0); + run_test(SS_NS, 0); + run_test(MS, 0); + run_test(MS_NS, 0); + run_test(ES, 0); + run_test(ES_NS, 0); + run_test(EMS, 0); + run_test(EMS_NS, 0); + + run_test(SS, LBS_NODATA | LBS_OWNERDRAWFIXED); + run_test(SS_NS, LBS_NODATA | LBS_OWNERDRAWFIXED); + run_test(MS, LBS_NODATA | LBS_OWNERDRAWFIXED); + run_test(MS_NS, LBS_NODATA | LBS_OWNERDRAWFIXED); + run_test(ES, LBS_NODATA | LBS_OWNERDRAWFIXED); + run_test(ES_NS, LBS_NODATA | LBS_OWNERDRAWFIXED); + run_test(EMS, LBS_NODATA | LBS_OWNERDRAWFIXED); + run_test(EMS_NS, LBS_NODATA | LBS_OWNERDRAWFIXED); }
static const struct message lb_addstring_ownerdraw_parent_seq[] = @@ -2252,6 +2326,7 @@ START_TEST(listbox) test_listbox_dlgdir(); test_set_count(); test_nodata_invalid_styles(); + test_nodata(); test_GetListBoxInfo(); test_missing_lbuttonup(); test_extents();
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=43969
Your paranoid android.
=== wvistau64 (32 bit Windows report) ===
comctl32: listbox.c:1155: Test failed: SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, *) failed err 18 listbox.c:1854: Test failed: got 8 listbox.c:1854: Test failed: got 8
=== wvistau64_zh_CN (32 bit Windows report) ===
comctl32: listbox.c:1155: Test failed: SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, *) failed err 18 listbox.c:1854: Test failed: got 8 listbox.c:1854: Test failed: got 8
=== wvistau64_fr (32 bit Windows report) ===
comctl32: listbox.c:1155: Test failed: SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, *) failed err 18 listbox.c:1854: Test failed: got 8 listbox.c:1854: Test failed: got 8
=== wvistau64_he (32 bit Windows report) ===
comctl32: listbox.c:1155: Test failed: SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, *) failed err 18 listbox.c:1854: Test failed: got 8 listbox.c:1854: Test failed: got 8
=== w2008s64 (32 bit Windows report) ===
comctl32: listbox.c:1854: Test failed: got 8 listbox.c:1854: Test failed: got 8
=== w7pro64 (32 bit Windows report) ===
comctl32: listbox.c:1854: Test failed: got 8 listbox.c:1854: Test failed: got 8
=== w864 (32 bit Windows report) ===
comctl32: listbox.c:1854: Test failed: got 8 listbox.c:1854: Test failed: got 8
=== w1064 (32 bit Windows report) ===
comctl32: listbox.c:1854: Test failed: got 8 listbox.c:1854: Test failed: got 8
=== wvistau64 (64 bit Windows report) ===
comctl32: listbox.c:1155: Test failed: SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, *) failed err 18
Looks like in some buggy Windows versions, WOW64 returns 8, even though the size of a pointer (32-bit app) is 4.
The problem is that our Wine code itself returns 4 always (because it sizeof(DWORD) only) which is not touched by these patches. So it's a deeper problem here.
How should I proceed? Should I mark them as broken? But should I hardcode the value 8 in the broken() case? (because again, this happens only under a 32-bit app via WOW64).
Something like ok(ret <= sizeof(data) || broken(ret == 8), ...)?
On Tue, Nov 6, 2018 at 2:16 PM Marvin testbot@winehq.org wrote:
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=43969
Your paranoid android.
=== wvistau64 (32 bit Windows report) ===
comctl32: listbox.c:1155: Test failed: SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, *) failed err 18 listbox.c:1854: Test failed: got 8 listbox.c:1854: Test failed: got 8
=== wvistau64_zh_CN (32 bit Windows report) ===
comctl32: listbox.c:1155: Test failed: SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, *) failed err 18 listbox.c:1854: Test failed: got 8 listbox.c:1854: Test failed: got 8
=== wvistau64_fr (32 bit Windows report) ===
comctl32: listbox.c:1155: Test failed: SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, *) failed err 18 listbox.c:1854: Test failed: got 8 listbox.c:1854: Test failed: got 8
=== wvistau64_he (32 bit Windows report) ===
comctl32: listbox.c:1155: Test failed: SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, *) failed err 18 listbox.c:1854: Test failed: got 8 listbox.c:1854: Test failed: got 8
=== w2008s64 (32 bit Windows report) ===
comctl32: listbox.c:1854: Test failed: got 8 listbox.c:1854: Test failed: got 8
=== w7pro64 (32 bit Windows report) ===
comctl32: listbox.c:1854: Test failed: got 8 listbox.c:1854: Test failed: got 8
=== w864 (32 bit Windows report) ===
comctl32: listbox.c:1854: Test failed: got 8 listbox.c:1854: Test failed: got 8
=== w1064 (32 bit Windows report) ===
comctl32: listbox.c:1854: Test failed: got 8 listbox.c:1854: Test failed: got 8
=== wvistau64 (64 bit Windows report) ===
comctl32: listbox.c:1155: Test failed: SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, *) failed err 18