winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
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
List overview
wine-commits
September 2008
----- 2025 -----
June 2025
May 2025
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
3 participants
1215 discussions
Start a n
N
ew thread
Damjan Jovanovic : ws2_32: Only enable FD_WRITE on short sends.
by Alexandre Julliard
08 Sep '08
08 Sep '08
Module: wine Branch: master Commit: b904dd783cd2b7368e11882e37b90e7da23b73be URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b904dd783cd2b7368e11882e3…
Author: Damjan Jovanovic <damjan.jov(a)gmail.com> Date: Sun Sep 7 12:41:19 2008 +0200 ws2_32: Only enable FD_WRITE on short sends. --- dlls/ws2_32/socket.c | 12 +++- dlls/ws2_32/tests/sock.c | 140 +++++++++++++++++++++++++++++++++------------ 2 files changed, 112 insertions(+), 40 deletions(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 451de49..69d678c 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -1250,8 +1250,13 @@ static NTSTATUS WS2_async_send(void* user, IO_STATUS_BLOCK* iosb, NTSTATUS statu if (result >= 0) { + int totalLength = 0; + int i; status = STATUS_SUCCESS; - _enable_event( wsa->hSocket, FD_WRITE, 0, 0 ); + for (i = 0; i < wsa->n_iovecs; i++) + totalLength += wsa->iovec[i].iov_len; + if (result < totalLength) + _enable_event( wsa->hSocket, FD_WRITE, 0, 0 ); } else { @@ -2667,6 +2672,7 @@ INT WINAPI WSASendTo( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount, unsigned int i, options; int n, fd, err; struct iovec iovec[WS_MSG_MAXIOVLEN]; + int totalLength = 0; ULONG_PTR cvalue = (lpOverlapped && ((ULONG_PTR)lpOverlapped->hEvent & 1) == 0) ? (ULONG_PTR)lpOverlapped : 0; TRACE("socket %04lx, wsabuf %p, nbufs %d, flags %d, to %p, tolen %d, ovl %p, func %p\n", @@ -2694,6 +2700,7 @@ INT WINAPI WSASendTo( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount, { iovec[i].iov_base = lpBuffers[i].buf; iovec[i].iov_len = lpBuffers[i].len; + totalLength += lpBuffers[i].len; } for (;;) @@ -2819,7 +2826,8 @@ INT WINAPI WSASendTo( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount, } else /* non-blocking */ { - _enable_event(SOCKET2HANDLE(s), FD_WRITE, 0, 0); + if (n < totalLength) + _enable_event(SOCKET2HANDLE(s), FD_WRITE, 0, 0); if (n == -1) { err = WSAEWOULDBLOCK; diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index 3a8d42a..5883078 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -1993,9 +1993,23 @@ static DWORD WINAPI drain_socket_thread(LPVOID arg) { char buffer[1024]; SOCKET sock = *(SOCKET*)arg; + int ret; - while (recv(sock, buffer, sizeof(buffer), 0) > 0) - ; + while ((ret = recv(sock, buffer, sizeof(buffer), 0)) != 0) + { + if (ret < 0) + { + if (WSAGetLastError() == WSAEWOULDBLOCK) + { + fd_set readset; + FD_ZERO(&readset); + FD_SET(sock, &readset); + select(0, &readset, NULL, NULL, NULL); + } + else + break; + } + } return 0; } @@ -2051,10 +2065,13 @@ static void test_write_events(void) SOCKET dst = INVALID_SOCKET; HANDLE hThread = NULL; HANDLE hEvent = INVALID_HANDLE_VALUE; - int len; + char *buffer = NULL; + int bufferSize = 1024*1024; u_long one = 1; int ret; DWORD id; + WSANETWORKEVENTS netEvents; + DWORD dwRet; if (tcp_socketpair(&src, &dst) != 0) { @@ -2062,6 +2079,29 @@ static void test_write_events(void) return; } + /* On Windows it seems when a non-blocking socket sends to a + blocking socket on the same host, the send() is BLOCKING, + so make both sockets non-blocking */ + ret = ioctlsocket(src, FIONBIO, &one); + if (ret) + { + ok(0, "ioctlsocket failed, error %d\n", WSAGetLastError()); + goto end; + } + ret = ioctlsocket(dst, FIONBIO, &one); + if (ret) + { + ok(0, "ioctlsocket failed, error %d\n", WSAGetLastError()); + goto end; + } + + buffer = HeapAlloc(GetProcessHeap(), 0, bufferSize); + if (buffer == NULL) + { + ok(0, "could not allocate memory for test\n"); + goto end; + } + hThread = CreateThread(NULL, 0, drain_socket_thread, &dst, 0, &id); if (hThread == NULL) { @@ -2076,55 +2116,79 @@ static void test_write_events(void) goto end; } - ret = ioctlsocket(src, FIONBIO, &one); + ret = WSAEventSelect(src, hEvent, FD_WRITE | FD_CLOSE); if (ret) { - ok(0, "ioctlsocket failed, error %d\n", WSAGetLastError()); + ok(0, "WSAEventSelect failed, error %d\n", ret); goto end; } - ret = WSAEventSelect(src, hEvent, FD_WRITE | FD_CLOSE); + /* FD_WRITE should be set initially, and allow us to send at least 1 byte */ + dwRet = WaitForSingleObject(hEvent, 5000); + if (dwRet != WAIT_OBJECT_0) + { + ok(0, "Initial WaitForSingleObject failed, error %d\n", dwRet); + goto end; + } + ret = WSAEnumNetworkEvents(src, NULL, &netEvents); if (ret) { - ok(0, "WSAEventSelect failed, error %d\n", ret); + ok(0, "WSAEnumNetworkEvents failed, error %d\n", ret); + goto end; + } + if (netEvents.lNetworkEvents & FD_WRITE) + { + ret = send(src, "a", 1, 0); + ok(ret == 1, "sending 1 byte failed, error %d\n", WSAGetLastError()); + if (ret != 1) + goto end; + } + else + { + ok(0, "FD_WRITE not among initial events\n"); goto end; } - for (len = 100; len > 0; --len) + /* Now FD_WRITE should not be set, because the socket send buffer isn't full yet */ + dwRet = WaitForSingleObject(hEvent, 2000); + if (dwRet == WAIT_OBJECT_0) + { + ok(0, "WaitForSingleObject should have timed out, but succeeded!\n"); + goto end; + } + + /* Now if we send a tonne of data, the socket send buffer will only take some of it, + and we will get a short write, which will trigger another FD_WRITE event + as soon as data is sent and more space becomes available, but not any earlier. */ + do + { + ret = send(src, buffer, bufferSize, 0); + } while (ret == bufferSize); + if (ret >= 0 || WSAGetLastError() == WSAEWOULDBLOCK) { - WSANETWORKEVENTS netEvents; - DWORD dwRet = WaitForSingleObject(hEvent, 5000); - if (dwRet != WAIT_OBJECT_0) - { - ok(0, "WaitForSingleObject failed, error %d\n", dwRet); - goto end; - } - - ret = WSAEnumNetworkEvents(src, NULL, &netEvents); - if (ret) - { - ok(0, "WSAEnumNetworkEvents failed, error %d\n", ret); - goto end; - } - - if (netEvents.lNetworkEvents & FD_WRITE) - { - ret = send(src, "a", 1, 0); - if (ret < 0 && WSAGetLastError() != WSAEWOULDBLOCK) - { - ok(0, "send failed, error %d\n", WSAGetLastError()); - goto end; - } - } - - if (netEvents.lNetworkEvents & FD_CLOSE) - { - ok(0, "unexpected close\n"); - goto end; - } + dwRet = WaitForSingleObject(hEvent, 5000); + ok(dwRet == WAIT_OBJECT_0, "Waiting failed with %d\n", dwRet); + if (dwRet == WAIT_OBJECT_0) + { + ret = WSAEnumNetworkEvents(src, NULL, &netEvents); + ok(ret == 0, "WSAEnumNetworkEvents failed, error %d\n", ret); + if (ret == 0) + goto end; + ok(netEvents.lNetworkEvents & FD_WRITE, + "FD_WRITE event not set as expected, events are 0x%x\n", netEvents.lNetworkEvents); + } + else + goto end; + } + else + { + ok(0, "sending a lot of data failed with error %d\n", WSAGetLastError()); + goto end; } end: + if (buffer != NULL) + HeapFree(GetProcessHeap(), 0, buffer); if (src != INVALID_SOCKET) closesocket(src); if (dst != INVALID_SOCKET)
1
0
0
0
Reece Dunn : shlwapi: Fixed the url tests on Vista.
by Alexandre Julliard
08 Sep '08
08 Sep '08
Module: wine Branch: master Commit: 261a39a0085f28494b1d7ec7ef8e160b42242ce7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=261a39a0085f28494b1d7ec7e…
Author: Reece Dunn <msclrhd(a)googlemail.com> Date: Sun Sep 7 13:18:29 2008 +0100 shlwapi: Fixed the url tests on Vista. --- dlls/shlwapi/tests/url.c | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/dlls/shlwapi/tests/url.c b/dlls/shlwapi/tests/url.c index e2f7f1a..7ae79bc 100644 --- a/dlls/shlwapi/tests/url.c +++ b/dlls/shlwapi/tests/url.c @@ -133,7 +133,6 @@ static const TEST_URL_CANONICALIZE TEST_CANONICALIZE[] = { {"A", 0, S_OK, "A", FALSE}, {"/uri-res/N2R?urn:sha1:B3K", URL_DONT_ESCAPE_EXTRA_INFO | URL_WININET_COMPATIBILITY /*0x82000000*/, S_OK, "/uri-res/N2R?urn:sha1:B3K", TRUE} /*LimeWire online installer calls this*/, {"http:www.winehq.org/dir/../index.html", 0, S_OK, "http:www.winehq.org/index.html"}, - {"", 0, S_OK, "", FALSE} }; /* ################ */ @@ -547,19 +546,23 @@ static void test_url_escape(const char *szUrl, DWORD dwFlags, HRESULT dwExpectRe } -static void test_url_canonicalize(int index, const char *szUrl, DWORD dwFlags, HRESULT dwExpectReturn, const char *szExpectUrl, BOOL todo) +static void test_url_canonicalize(int index, const char *szUrl, DWORD dwFlags, HRESULT dwExpectReturn, HRESULT dwExpectReturnAlt, const char *szExpectUrl, BOOL todo) { CHAR szReturnUrl[INTERNET_MAX_URL_LENGTH]; WCHAR wszReturnUrl[INTERNET_MAX_URL_LENGTH]; LPWSTR wszUrl = GetWideString(szUrl); LPWSTR wszExpectUrl = GetWideString(szExpectUrl); LPWSTR wszConvertedUrl; + HRESULT ret; DWORD dwSize; dwSize = INTERNET_MAX_URL_LENGTH; ok(UrlCanonicalizeA(szUrl, NULL, &dwSize, dwFlags) != dwExpectReturn, "Unexpected return for NULL buffer, index %d\n", index); - ok(UrlCanonicalizeA(szUrl, szReturnUrl, &dwSize, dwFlags) == dwExpectReturn, "UrlCanonicalizeA didn't return 0x%08x, index %d\n", dwExpectReturn, index); + ret = UrlCanonicalizeA(szUrl, szReturnUrl, &dwSize, dwFlags); + ok(ret == dwExpectReturn || ret == dwExpectReturnAlt, + "UrlCanonicalizeA failed: expected=0x%08x or 0x%08x, got=0x%08x, index %d\n", + dwExpectReturn, dwExpectReturnAlt, ret, index); if (todo) todo_wine ok(strcmp(szReturnUrl,szExpectUrl)==0, "UrlCanonicalizeA dwFlags 0x%08x url '%s' Expected \"%s\", but got \"%s\", index %d\n", dwFlags, szUrl, szExpectUrl, szReturnUrl, index); @@ -668,11 +671,12 @@ static void test_UrlCanonicalizeA(void) "got 0x%x with %u and size %u for '%s' and %u (expected 'S_OK' and size %u)\n", hr, GetLastError(), dwSize, szReturnUrl, lstrlenA(szReturnUrl), urllen); + test_url_canonicalize(-1, "", 0, S_OK, S_FALSE /* Vista/win2k8 */, "", FALSE); /* test url-modification */ for(i=0; i<sizeof(TEST_CANONICALIZE)/sizeof(TEST_CANONICALIZE[0]); i++) { test_url_canonicalize(i, TEST_CANONICALIZE[i].url, TEST_CANONICALIZE[i].flags, - TEST_CANONICALIZE[i].expectret, TEST_CANONICALIZE[i].expecturl, + TEST_CANONICALIZE[i].expectret, TEST_CANONICALIZE[i].expectret, TEST_CANONICALIZE[i].expecturl, TEST_CANONICALIZE[i].todo); } }
1
0
0
0
Reece Dunn : hlink: Fix the tests for IE7.
by Alexandre Julliard
08 Sep '08
08 Sep '08
Module: wine Branch: master Commit: c722cca5998049122b358b823f81d467bb1c3d4f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c722cca5998049122b358b823…
Author: Reece Dunn <msclrhd(a)googlemail.com> Date: Sun Sep 7 11:38:51 2008 +0100 hlink: Fix the tests for IE7. --- dlls/hlink/tests/hlink.c | 127 ++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 117 insertions(+), 10 deletions(-) diff --git a/dlls/hlink/tests/hlink.c b/dlls/hlink/tests/hlink.c index dc175bd..9e4c5a3 100644 --- a/dlls/hlink/tests/hlink.c +++ b/dlls/hlink/tests/hlink.c @@ -175,6 +175,23 @@ static const unsigned char expected_hlink_data[] = 0x00,0x00, }; +/* url only (IE7) */ +static const unsigned char expected_hlink_data_ie7[] = +{ + 0x02,0x00,0x00,0x00,0x03,0x00,0x00,0x00, + 0xe0,0xc9,0xea,0x79,0xf9,0xba,0xce,0x11, + 0x8c,0x82,0x00,0xaa,0x00,0x4b,0xa9,0x0b, + 0x3e,0x00,0x00,0x00,0x68,0x00,0x74,0x00, + 0x74,0x00,0x70,0x00,0x3a,0x00,0x2f,0x00, + 0x2f,0x00,0x77,0x00,0x69,0x00,0x6e,0x00, + 0x65,0x00,0x68,0x00,0x71,0x00,0x2e,0x00, + 0x6f,0x00,0x72,0x00,0x67,0x00,0x2f,0x00, + 0x00,0x00,0x79,0x58,0x81,0xf4,0x3b,0x1d, + 0x7f,0x48,0xaf,0x2c,0x82,0x5d,0xc4,0x85, + 0x27,0x63,0x00,0x00,0x00,0x00,0xa5,0xab, + 0x00,0x00, +}; + /* url + friendly name */ static const unsigned char expected_hlink_data2[] = { @@ -191,6 +208,25 @@ static const unsigned char expected_hlink_data2[] = 0x67,0x00,0x2f,0x00,0x00,0x00, }; +/* url + friendly name (IE7) */ +static const unsigned char expected_hlink_data2_ie7[] = +{ + 0x02,0x00,0x00,0x00,0x17,0x00,0x00,0x00, + 0x08,0x00,0x00,0x00,0x57,0x00,0x69,0x00, + 0x6e,0x00,0x65,0x00,0x20,0x00,0x48,0x00, + 0x51,0x00,0x00,0x00,0xe0,0xc9,0xea,0x79, + 0xf9,0xba,0xce,0x11,0x8c,0x82,0x00,0xaa, + 0x00,0x4b,0xa9,0x0b,0x3e,0x00,0x00,0x00, + 0x68,0x00,0x74,0x00,0x74,0x00,0x70,0x00, + 0x3a,0x00,0x2f,0x00,0x2f,0x00,0x77,0x00, + 0x69,0x00,0x6e,0x00,0x65,0x00,0x68,0x00, + 0x71,0x00,0x2e,0x00,0x6f,0x00,0x72,0x00, + 0x67,0x00,0x2f,0x00,0x00,0x00,0x79,0x58, + 0x81,0xf4,0x3b,0x1d,0x7f,0x48,0xaf,0x2c, + 0x82,0x5d,0xc4,0x85,0x27,0x63,0x00,0x00, + 0x00,0x00,0xa5,0xab,0x00,0x00, +}; + /* url + friendly name + location */ static const unsigned char expected_hlink_data3[] = { @@ -209,6 +245,27 @@ static const unsigned char expected_hlink_data3[] = 0x61,0x00,0x6e,0x00,0x6b,0x00,0x00,0x00, }; +/* url + friendly name + location (IE7) */ +static const unsigned char expected_hlink_data3_ie7[] = +{ + 0x02,0x00,0x00,0x00,0x1f,0x00,0x00,0x00, + 0x08,0x00,0x00,0x00,0x57,0x00,0x69,0x00, + 0x6e,0x00,0x65,0x00,0x20,0x00,0x48,0x00, + 0x51,0x00,0x00,0x00,0xe0,0xc9,0xea,0x79, + 0xf9,0xba,0xce,0x11,0x8c,0x82,0x00,0xaa, + 0x00,0x4b,0xa9,0x0b,0x3e,0x00,0x00,0x00, + 0x68,0x00,0x74,0x00,0x74,0x00,0x70,0x00, + 0x3a,0x00,0x2f,0x00,0x2f,0x00,0x77,0x00, + 0x69,0x00,0x6e,0x00,0x65,0x00,0x68,0x00, + 0x71,0x00,0x2e,0x00,0x6f,0x00,0x72,0x00, + 0x67,0x00,0x2f,0x00,0x00,0x00,0x79,0x58, + 0x81,0xf4,0x3b,0x1d,0x7f,0x48,0xaf,0x2c, + 0x82,0x5d,0xc4,0x85,0x27,0x63,0x00,0x00, + 0x00,0x00,0xa5,0xab,0x00,0x00,0x07,0x00, + 0x00,0x00,0x5f,0x00,0x62,0x00,0x6c,0x00, + 0x61,0x00,0x6e,0x00,0x6b,0x00,0x00,0x00, +}; + /* relative url */ static const unsigned char expected_hlink_data4[] = { @@ -239,6 +296,25 @@ static const unsigned char expected_hlink_data5[] = 0x2f,0x00,0x00,0x00, }; +/* url + target frame name (IE7) */ +static const unsigned char expected_hlink_data5_ie7[] = +{ + 0x02,0x00,0x00,0x00,0x83,0x00,0x00,0x00, + 0x07,0x00,0x00,0x00,0x74,0x00,0x67,0x00, + 0x74,0x00,0x66,0x00,0x72,0x00,0x6d,0x00, + 0x00,0x00,0xe0,0xc9,0xea,0x79,0xf9,0xba, + 0xce,0x11,0x8c,0x82,0x00,0xaa,0x00,0x4b, + 0xa9,0x0b,0x3e,0x00,0x00,0x00,0x68,0x00, + 0x74,0x00,0x74,0x00,0x70,0x00,0x3a,0x00, + 0x2f,0x00,0x2f,0x00,0x77,0x00,0x69,0x00, + 0x6e,0x00,0x65,0x00,0x68,0x00,0x71,0x00, + 0x2e,0x00,0x6f,0x00,0x72,0x00,0x67,0x00, + 0x2f,0x00,0x00,0x00,0x79,0x58,0x81,0xf4, + 0x3b,0x1d,0x7f,0x48,0xaf,0x2c,0x82,0x5d, + 0xc4,0x85,0x27,0x63,0x00,0x00,0x00,0x00, + 0xa5,0xab,0x00,0x00, +}; + /* filename */ static const unsigned char expected_hlink_data6[] = { @@ -256,7 +332,9 @@ static const unsigned char expected_hlink_data6[] = static void test_persist_save_data(const char *testname, IHlink *lnk, const unsigned char *expected_data, - unsigned int expected_data_size) + unsigned int expected_data_size, + const unsigned char *expected_data_alt, + unsigned int expected_data_alt_size) { HRESULT hr; IStream *stream; @@ -284,9 +362,9 @@ static void test_persist_save_data(const char *testname, IHlink *lnk, data = GlobalLock(hglobal); /* first check we have the right amount of data */ - ok(data_size == expected_data_size, - "%s: Size of saved data differs (expected %d, actual %d)\n", - testname, expected_data_size, data_size); + ok((data_size == expected_data_size) || (data_size == expected_data_alt_size), + "%s: Size of saved data differs (expected %d or %d, actual %d)\n", + testname, expected_data_size, expected_data_alt_size, data_size); same = TRUE; /* then do a byte-by-byte comparison */ @@ -302,6 +380,23 @@ static void test_persist_save_data(const char *testname, IHlink *lnk, } } + if (!same && (expected_data_alt != expected_data)) + { + /* then try the alternate data */ + same = TRUE; + for (i = 0; i < min(data_size, expected_data_alt_size); i++) + { + if ((expected_data_alt[i] != data[i]) && + (((expected_data_alt != expected_hlink_data2) && + (expected_data_alt != expected_hlink_data3)) || + ((i < 52 || i >= 56) && (i < 80 || i >= 84)))) + { + same = FALSE; + break; + } + } + } + ok(same, "%s: Saved data differs\n", testname); if (!same) { @@ -338,25 +433,33 @@ static void test_persist(void) skip("Can't create lnk, skipping test_persist. Was wineprefixcreate run properly?\n"); return; } - test_persist_save_data("url only", lnk, expected_hlink_data, sizeof(expected_hlink_data)); + test_persist_save_data("url only", lnk, + expected_hlink_data, sizeof(expected_hlink_data), + expected_hlink_data_ie7, sizeof(expected_hlink_data_ie7)); IHlink_Release(lnk); hr = HlinkCreateFromString(url, NULL, friendly_name, NULL, 0, NULL, &IID_IHlink, (LPVOID*) &lnk); ok(hr == S_OK, "IHlinCreateFromString failed with error 0x%08x\n", hr); - test_persist_save_data("url + friendly name", lnk, expected_hlink_data2, sizeof(expected_hlink_data2)); + test_persist_save_data("url + friendly name", lnk, + expected_hlink_data2, sizeof(expected_hlink_data2), + expected_hlink_data2_ie7, sizeof(expected_hlink_data2_ie7)); IHlink_Release(lnk); hr = HlinkCreateFromString(url, location, friendly_name, NULL, 0, NULL, &IID_IHlink, (LPVOID*) &lnk); ok(hr == S_OK, "IHlinCreateFromString failed with error 0x%08x\n", hr); - test_persist_save_data("url + friendly_name + location", lnk, expected_hlink_data3, sizeof(expected_hlink_data3)); + test_persist_save_data("url + friendly_name + location", lnk, + expected_hlink_data3, sizeof(expected_hlink_data3), + expected_hlink_data3_ie7, sizeof(expected_hlink_data3_ie7)); IHlink_Release(lnk); hr = HlinkCreateFromString(rel_url, NULL, NULL, NULL, 0, NULL, &IID_IHlink, (LPVOID*) &lnk); ok(hr == S_OK, "IHlinCreateFromString failed with error 0x%08x\n", hr); - test_persist_save_data("relative url", lnk, expected_hlink_data4, sizeof(expected_hlink_data4)); + test_persist_save_data("relative url", lnk, + expected_hlink_data4, sizeof(expected_hlink_data4), + expected_hlink_data4, sizeof(expected_hlink_data4)); IHlink_Release(lnk); hr = HlinkCreateFromString(url, NULL, NULL, NULL, @@ -364,13 +467,17 @@ static void test_persist(void) ok(hr == S_OK, "IHlinCreateFromString failed with error 0x%08x\n", hr); hr = IHlink_SetTargetFrameName(lnk, target_frame_name); ok(hr == S_OK, "IHlink_SetTargetFrameName failed with error 0x%08x\n", hr); - test_persist_save_data("url + target frame name", lnk, expected_hlink_data5, sizeof(expected_hlink_data5)); + test_persist_save_data("url + target frame name", lnk, + expected_hlink_data5, sizeof(expected_hlink_data5), + expected_hlink_data5_ie7, sizeof(expected_hlink_data5_ie7)); IHlink_Release(lnk); hr = HlinkCreateFromString(filename, NULL, NULL, NULL, 0, NULL, &IID_IHlink, (LPVOID*) &lnk); ok(hr == S_OK, "IHlinCreateFromString failed with error 0x%08x\n", hr); - test_persist_save_data("filename", lnk, expected_hlink_data6, sizeof(expected_hlink_data6)); + test_persist_save_data("filename", lnk, + expected_hlink_data6, sizeof(expected_hlink_data6), + expected_hlink_data6, sizeof(expected_hlink_data6)); IHlink_Release(lnk); }
1
0
0
0
Reece Dunn : secur32: Fixed the logic on some of the schannel tests.
by Alexandre Julliard
08 Sep '08
08 Sep '08
Module: wine Branch: master Commit: f14fe767b37d46a2d5ee1dc9958c9c9878c000ce URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f14fe767b37d46a2d5ee1dc99…
Author: Reece Dunn <msclrhd(a)googlemail.com> Date: Sun Sep 7 11:28:11 2008 +0100 secur32: Fixed the logic on some of the schannel tests. --- dlls/secur32/tests/schannel.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/secur32/tests/schannel.c b/dlls/secur32/tests/schannel.c index dc10ccd..881f443 100644 --- a/dlls/secur32/tests/schannel.c +++ b/dlls/secur32/tests/schannel.c @@ -267,12 +267,12 @@ static void testAcquireSecurityContext(void) schanCred.paCred = &certs[0]; st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND, NULL, &schanCred, NULL, NULL, NULL, NULL); - ok(st == SEC_E_UNKNOWN_CREDENTIALS || SEC_E_NO_CREDENTIALS, + ok(st == SEC_E_UNKNOWN_CREDENTIALS || st == SEC_E_NO_CREDENTIALS, "Expected SEC_E_UNKNOWN_CREDENTIALS or SEC_E_NO_CREDENTIALS, got %08x\n", st); st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND, NULL, &schanCred, NULL, NULL, NULL, NULL); - ok(st == SEC_E_UNKNOWN_CREDENTIALS || SEC_E_NO_CREDENTIALS, + ok(st == SEC_E_UNKNOWN_CREDENTIALS || st == SEC_E_NO_CREDENTIALS, "Expected SEC_E_UNKNOWN_CREDENTIALS or SEC_E_NO_CREDENTIALS, got %08x\n", st); @@ -283,12 +283,12 @@ static void testAcquireSecurityContext(void) schanCred.paCred = &certs[1]; st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND, NULL, &schanCred, NULL, NULL, &cred, NULL); - ok(st == SEC_E_UNKNOWN_CREDENTIALS || SEC_E_NO_CREDENTIALS, + ok(st == SEC_E_UNKNOWN_CREDENTIALS || st == SEC_E_NO_CREDENTIALS, "Expected SEC_E_UNKNOWN_CREDENTIALS or SEC_E_NO_CREDENTIALS, got %08x\n", st); st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND, NULL, &schanCred, NULL, NULL, NULL, NULL); - ok(st == SEC_E_UNKNOWN_CREDENTIALS || SEC_E_NO_CREDENTIALS, + ok(st == SEC_E_UNKNOWN_CREDENTIALS || st == SEC_E_NO_CREDENTIALS, "Expected SEC_E_UNKNOWN_CREDENTIALS or SEC_E_NO_CREDENTIALS, got %08x\n", st);
1
0
0
0
Reece Dunn : secur32: Fixed the schannel tests on Vista.
by Alexandre Julliard
08 Sep '08
08 Sep '08
Module: wine Branch: master Commit: c718981a1924ec618e678c11aff05933ccde69bd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c718981a1924ec618e678c11a…
Author: Reece Dunn <msclrhd(a)googlemail.com> Date: Sun Sep 7 11:25:56 2008 +0100 secur32: Fixed the schannel tests on Vista. --- dlls/secur32/tests/schannel.c | 50 ++++++++++++++++++++++++---------------- 1 files changed, 30 insertions(+), 20 deletions(-) diff --git a/dlls/secur32/tests/schannel.c b/dlls/secur32/tests/schannel.c index 904b6fd..dc10ccd 100644 --- a/dlls/secur32/tests/schannel.c +++ b/dlls/secur32/tests/schannel.c @@ -230,12 +230,14 @@ static void testAcquireSecurityContext(void) memset(&schanCred, 0, sizeof(schanCred)); st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND, NULL, &schanCred, NULL, NULL, NULL, NULL); - ok(st == SEC_E_INTERNAL_ERROR, "Expected SEC_E_INTERNAL_ERROR, got %08x\n", - st); + ok(st == SEC_E_INTERNAL_ERROR || + st == SEC_E_UNKNOWN_CREDENTIALS /* Vista/win2k8 */, + "Expected SEC_E_INTERNAL_ERROR or SEC_E_UNKNOWN_CREDENTIALS, got %08x\n", st); st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND, NULL, &schanCred, NULL, NULL, NULL, NULL); - ok(st == SEC_E_INTERNAL_ERROR, "Expected SEC_E_INTERNAL_ERROR, got %08x\n", - st); + ok(st == SEC_E_INTERNAL_ERROR || + st == SEC_E_UNKNOWN_CREDENTIALS /* Vista/win2k8 */, + "Expected SEC_E_INTERNAL_ERROR or SEC_E_UNKNOWN_CREDENTIALS, got %08x\n", st); /* No cert in SCHANNEL_CRED succeeds for outbound.. */ schanCred.dwVersion = SCHANNEL_CRED_VERSION; @@ -246,8 +248,9 @@ static void testAcquireSecurityContext(void) /* but fails for inbound. */ st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND, NULL, &schanCred, NULL, NULL, &cred, NULL); - ok(st == SEC_E_NO_CREDENTIALS, "Expected SEC_E_NO_CREDENTIALS, got %08x\n", - st); + ok(st == SEC_E_NO_CREDENTIALS || + st == SEC_E_OK /* Vista/win2k8 */, + "Expected SEC_E_NO_CREDENTIALS or SEC_E_OK, got %08x\n", st); if (0) { @@ -328,21 +331,25 @@ static void testAcquireSecurityContext(void) schanCred.dwVersion = SCH_CRED_V1; st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND, NULL, &schanCred, NULL, NULL, &cred, NULL); - ok(st == SEC_E_INTERNAL_ERROR, - "Expected SEC_E_INTERNAL_ERROR, got %08x\n", st); + ok(st == SEC_E_INTERNAL_ERROR || + st == SEC_E_UNKNOWN_CREDENTIALS /* Vista/win2k8 */, + "Expected SEC_E_INTERNAL_ERROR or SEC_E_UNKNOWN_CREDENTIALS, got %08x\n", st); st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND, NULL, &schanCred, NULL, NULL, &cred, NULL); - ok(st == SEC_E_INTERNAL_ERROR, - "Expected SEC_E_INTERNAL_ERROR, got %08x\n", st); + ok(st == SEC_E_INTERNAL_ERROR || + st == SEC_E_UNKNOWN_CREDENTIALS /* Vista/win2k8 */, + "Expected SEC_E_INTERNAL_ERROR or SEC_E_UNKNOWN_CREDENTIALS, got %08x\n", st); schanCred.dwVersion = SCH_CRED_V2; st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND, NULL, &schanCred, NULL, NULL, &cred, NULL); - ok(st == SEC_E_INTERNAL_ERROR, - "Expected SEC_E_INTERNAL_ERROR, got %08x\n", st); + ok(st == SEC_E_INTERNAL_ERROR || + st == SEC_E_UNKNOWN_CREDENTIALS /* Vista/win2k8 */, + "Expected SEC_E_INTERNAL_ERROR or SEC_E_UNKNOWN_CREDENTIALS, got %08x\n", st); st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND, NULL, &schanCred, NULL, NULL, &cred, NULL); - ok(st == SEC_E_INTERNAL_ERROR, - "Expected SEC_E_INTERNAL_ERROR, got %08x\n", st); + ok(st == SEC_E_INTERNAL_ERROR || + st == SEC_E_UNKNOWN_CREDENTIALS /* Vista/win2k8 */, + "Expected SEC_E_INTERNAL_ERROR or SEC_E_UNKNOWN_CREDENTIALS, got %08x\n", st); /* Succeeds on V3 or higher */ schanCred.dwVersion = SCH_CRED_V3; @@ -374,19 +381,22 @@ static void testAcquireSecurityContext(void) schanCred.paCred = certs; st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND, NULL, &schanCred, NULL, NULL, &cred, NULL); - ok(st == SEC_E_UNKNOWN_CREDENTIALS, - "Expected SEC_E_UNKNOWN_CREDENTIALS, got %08x\n", st); + ok(st == SEC_E_UNKNOWN_CREDENTIALS || + st == SEC_E_NO_CREDENTIALS /* Vista/win2k8 */, + "Expected SEC_E_UNKNOWN_CREDENTIALS or SEC_E_NO_CREDENTIALS, got %08x\n", st); st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND, NULL, &schanCred, NULL, NULL, &cred, NULL); - ok(st == SEC_E_UNKNOWN_CREDENTIALS, - "Expected SEC_E_UNKNOWN_CREDENTIALS, got %08x\n", st); + ok(st == SEC_E_UNKNOWN_CREDENTIALS || + st == SEC_E_NO_CREDENTIALS, + "Expected SEC_E_UNKNOWN_CREDENTIALS, got %08x\n", st); tmp = certs[0]; certs[0] = certs[1]; certs[1] = tmp; st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND, NULL, &schanCred, NULL, NULL, &cred, NULL); - ok(st == SEC_E_UNKNOWN_CREDENTIALS, - "Expected SEC_E_UNKNOWN_CREDENTIALS, got %08x\n", st); + ok(st == SEC_E_UNKNOWN_CREDENTIALS || + st == SEC_E_NO_CREDENTIALS, + "Expected SEC_E_UNKNOWN_CREDENTIALS, got %08x\n", st); st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND, NULL, &schanCred, NULL, NULL, &cred, NULL); ok(st == SEC_E_UNKNOWN_CREDENTIALS,
1
0
0
0
Reece Dunn : browseui: Fixed building the tests with the Windows SDK.
by Alexandre Julliard
08 Sep '08
08 Sep '08
Module: wine Branch: master Commit: a8ffb232ab99a133f735d67919b26d0e04331934 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a8ffb232ab99a133f735d6791…
Author: Reece Dunn <msclrhd(a)googlemail.com> Date: Sun Sep 7 09:47:55 2008 +0100 browseui: Fixed building the tests with the Windows SDK. --- dlls/browseui/tests/autocomplete.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/dlls/browseui/tests/autocomplete.c b/dlls/browseui/tests/autocomplete.c index df2af75..966721c 100644 --- a/dlls/browseui/tests/autocomplete.c +++ b/dlls/browseui/tests/autocomplete.c @@ -24,6 +24,7 @@ #include <windows.h> #include <shlobj.h> #include <shlwapi.h> +#include <shlguid.h> #include "wine/test.h"
1
0
0
0
Reece Dunn : richedit20: Fixed building the tests on msvc.
by Alexandre Julliard
08 Sep '08
08 Sep '08
Module: wine Branch: master Commit: 5740ad6432f82828db65d27f172d72a5e222ba7e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5740ad6432f82828db65d27f1…
Author: Reece Dunn <msclrhd(a)googlemail.com> Date: Sun Sep 7 09:37:25 2008 +0100 richedit20: Fixed building the tests on msvc. --- dlls/riched20/tests/editor.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/riched20/tests/editor.c b/dlls/riched20/tests/editor.c index 862d622..ea94019 100644 --- a/dlls/riched20/tests/editor.c +++ b/dlls/riched20/tests/editor.c @@ -2262,7 +2262,7 @@ static void test_EM_SCROLL(void) unsigned int recursionLevel = 0; unsigned int WM_SIZE_recursionLevel = 0; BOOL bailedOutOfRecursion = FALSE; -LRESULT WINAPI (*richeditProc)(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); +LRESULT (WINAPI *richeditProc)(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); static LRESULT WINAPI RicheditStupidOverrideProcA(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) {
1
0
0
0
Reece Dunn : shdocvw: Fixed building on msvc.
by Alexandre Julliard
08 Sep '08
08 Sep '08
Module: wine Branch: master Commit: 099517604b52b540f85fb4e1c7409d00de95581a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=099517604b52b540f85fb4e1c…
Author: Reece Dunn <msclrhd(a)googlemail.com> Date: Sun Sep 7 09:30:32 2008 +0100 shdocvw: Fixed building on msvc. --- dlls/shdocvw/tests/intshcut.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/shdocvw/tests/intshcut.c b/dlls/shdocvw/tests/intshcut.c index 0b0798a..c9e3ab0 100644 --- a/dlls/shdocvw/tests/intshcut.c +++ b/dlls/shdocvw/tests/intshcut.c @@ -39,7 +39,7 @@ #include "wine/test.h" -static WINAPI HRESULT Unknown_QueryInterface(IUnknown *pUnknown, REFIID riid, void **ppvObject) +static HRESULT WINAPI Unknown_QueryInterface(IUnknown *pUnknown, REFIID riid, void **ppvObject) { if (IsEqualGUID(&IID_IUnknown, riid)) { @@ -49,12 +49,12 @@ static WINAPI HRESULT Unknown_QueryInterface(IUnknown *pUnknown, REFIID riid, vo return E_NOINTERFACE; } -static WINAPI ULONG Unknown_AddRef(IUnknown *pUnknown) +static ULONG WINAPI Unknown_AddRef(IUnknown *pUnknown) { return 2; } -static WINAPI ULONG Unknown_Release(IUnknown *pUnknown) +static ULONG WINAPI Unknown_Release(IUnknown *pUnknown) { return 1; }
1
0
0
0
Muneyuki Noguchi : comdlg32: Update Japanese translation.
by Alexandre Julliard
08 Sep '08
08 Sep '08
Module: wine Branch: master Commit: 2ca3a80ba8d14ff89a732b367322343d3ff616d0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2ca3a80ba8d14ff89a732b367…
Author: Muneyuki Noguchi <nogu.dev(a)gmail.com> Date: Sun Sep 7 03:11:50 2008 +0900 comdlg32: Update Japanese translation. --- dlls/comdlg32/cdlg_Ja.rc | 212 +++++++++++++++++++++++----------------------- 1 files changed, 106 insertions(+), 106 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=2ca3a80ba8d14ff89a732…
1
0
0
0
Muneyuki Noguchi : cmdlgtst: Add Japanese resources.
by Alexandre Julliard
08 Sep '08
08 Sep '08
Module: wine Branch: master Commit: 48dfff85771ed9e915f0ffe62576fa8512b38af9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=48dfff85771ed9e915f0ffe62…
Author: Muneyuki Noguchi <nogu.dev(a)gmail.com> Date: Sun Sep 7 02:55:57 2008 +0900 cmdlgtst: Add Japanese resources. --- programs/cmdlgtst/Ja.rc | 295 +++++++++++++++++++++++++++++++++++++++++++ programs/cmdlgtst/cmdlgr.rc | 1 + 2 files changed, 296 insertions(+), 0 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=48dfff85771ed9e915f0f…
1
0
0
0
← Newer
1
...
81
82
83
84
85
86
87
...
122
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
Results per page:
10
25
50
100
200