Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
44a81794
Commit
44a81794
authored
Sep 08, 2022
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon/tests: Fix race condition in abort test.
The result can arrive before we have time to abort. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=53268
parent
30336441
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
protocol.c
dlls/urlmon/tests/protocol.c
+5
-4
No files found.
dlls/urlmon/tests/protocol.c
View file @
44a81794
...
...
@@ -1193,8 +1193,8 @@ static HRESULT WINAPI ProtocolSink_ReportResult(IInternetProtocolSink *iface, HR
if
(
tested_protocol
==
FTP_TEST
)
ok
(
hrResult
==
E_PENDING
||
hrResult
==
S_OK
,
"hrResult = %08lx, expected E_PENDING or S_OK
\n
"
,
hrResult
);
else
ok
(
hrResult
==
expect_hrResult
,
"hrResult = %08lx, expected: %08lx
\n
"
,
hrResult
,
expect_hrResult
);
ok
(
hrResult
==
expect_hrResult
||
(
test_abort
&&
hrResult
==
S_OK
),
/* result can come in before the abort */
"hrResult = %08lx, expected: %08lx
\n
"
,
hrResult
,
expect_hrResult
);
if
(
SUCCEEDED
(
hrResult
)
||
tested_protocol
==
FTP_TEST
||
test_abort
||
hrResult
==
INET_E_REDIRECT_FAILED
)
ok
(
dwError
==
ERROR_SUCCESS
,
"dwError = %ld, expected ERROR_SUCCESS
\n
"
,
dwError
);
else
...
...
@@ -3331,7 +3331,8 @@ static void test_protocol_terminate(IInternetProtocol *protocol)
ok
(
hres
==
S_OK
,
"LockRequest failed: %08lx
\n
"
,
hres
);
hres
=
IInternetProtocol_Read
(
protocol
,
buf
,
1
,
&
cb
);
ok
(
hres
==
(
test_abort
?
S_OK
:
S_FALSE
),
"Read failed: %08lx
\n
"
,
hres
);
ok
(
hres
==
S_FALSE
||
(
test_abort
&&
hres
==
S_OK
),
/* result can come in before the abort */
"Read failed: %08lx
\n
"
,
hres
);
hres
=
IInternetProtocol_Terminate
(
protocol
,
0
);
ok
(
hres
==
S_OK
,
"Terminate failed: %08lx
\n
"
,
hres
);
...
...
@@ -3421,7 +3422,7 @@ static void test_http_protocol_url(LPCWSTR url, int prot, DWORD flags, DWORD tym
return
;
}
if
(
!
direct_read
&&
!
test_abort
&&
!
bind_from_cache
)
if
(
!
direct_read
&&
!
bind_from_cache
)
SET_EXPECT
(
ReportResult
);
if
(
flags
&
TEST_DISABLEAUTOREDIRECT
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment