Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
capnproto
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
capnproto
Commits
6d4c7f57
Commit
6d4c7f57
authored
Apr 27, 2017
by
Kenton Varda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tests on Cygwin.
parent
bd613c86
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
+15
-2
async-io-test.c++
c++/src/kj/async-io-test.c++
+3
-1
async-unix-test.c++
c++/src/kj/async-unix-test.c++
+12
-1
No files found.
c++/src/kj/async-io-test.c++
View file @
6d4c7f57
...
...
@@ -294,8 +294,10 @@ TEST(AsyncIo, Udp) {
EXPECT_FALSE
(
ancillary
.
isTruncated
);
}
#if
def IP_PKTINFO
#if
defined(IP_PKTINFO) && !__CYGWIN__
// Set IP_PKTINFO header and try to receive it.
// Doesn't work on Cygwin; see: https://cygwin.com/ml/cygwin/2009-01/msg00350.html
// TODO(someday): Might work on more-recent Cygwin; I'm still testing against 1.7.
int
one
=
1
;
port1
->
setsockopt
(
IPPROTO_IP
,
IP_PKTINFO
,
&
one
,
sizeof
(
one
));
...
...
c++/src/kj/async-unix-test.c++
View file @
6d4c7f57
...
...
@@ -513,12 +513,23 @@ TEST(AsyncUnixTest, UrgentObserver) {
UnixEventPort
::
FdObserver
observer
(
port
,
clientFd
,
UnixEventPort
::
FdObserver
::
OBSERVE_READ
|
UnixEventPort
::
FdObserver
::
OBSERVE_URGENT
);
// Attempt to read the urgent byte prior to reading the in-band byte.
observer
.
whenUrgentDataAvailable
().
wait
(
waitScope
);
#if __CYGWIN__
// On Cygwin, reading the urgent byte first causes the subsequent regular read to block until
// such a time as the connection closes -- and then the byte is successfully returned. This
// seems to be a cygwin bug.
KJ_SYSCALL
(
recv
(
clientFd
,
&
c
,
1
,
0
));
EXPECT_EQ
(
'i'
,
c
);
KJ_SYSCALL
(
recv
(
clientFd
,
&
c
,
1
,
MSG_OOB
));
EXPECT_EQ
(
'o'
,
c
);
#else
// Attempt to read the urgent byte prior to reading the in-band byte.
KJ_SYSCALL
(
recv
(
clientFd
,
&
c
,
1
,
MSG_OOB
));
EXPECT_EQ
(
'o'
,
c
);
KJ_SYSCALL
(
recv
(
clientFd
,
&
c
,
1
,
0
));
EXPECT_EQ
(
'i'
,
c
);
#endif
// Allow server thread to let its clientFd go out of scope.
c
=
'q'
;
...
...
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