aboutsummaryrefslogtreecommitdiff
path: root/tests/net_hosted
diff options
context:
space:
mode:
authorDamien George2019-10-16 16:26:20 +1100
committerDamien George2019-10-31 12:54:37 +1100
commit71401d5065e20da59a1cc740d760002794b008e0 (patch)
tree1d94004ad9d9d8d9302d9916ddd4092012910625 /tests/net_hosted
parent9ec73aedb4fedafce93a018c26cfbc79686be34b (diff)
extmod/modlwip: Unconditionally return POLLHUP when polling new socket.
POSIX poll should always return POLLERR and POLLHUP in revents, regardless of whether they were requested in the input events flags. See issues #4290 and #5172.
Diffstat (limited to 'tests/net_hosted')
-rw-r--r--tests/net_hosted/connect_poll.py3
-rw-r--r--tests/net_hosted/connect_poll.py.exp2
2 files changed, 2 insertions, 3 deletions
diff --git a/tests/net_hosted/connect_poll.py b/tests/net_hosted/connect_poll.py
index ece6aa0da..7aeba8f6d 100644
--- a/tests/net_hosted/connect_poll.py
+++ b/tests/net_hosted/connect_poll.py
@@ -12,9 +12,8 @@ def test(peer_addr):
poller.register(s)
# test poll before connect
- # note: CPython can return POLLHUP, so use the IN|OUT mask
p = poller.poll(0)
- print(len(p), p[0][-1] & (select.POLLIN | select.POLLOUT))
+ print(len(p), p[0][-1])
s.connect(peer_addr)
diff --git a/tests/net_hosted/connect_poll.py.exp b/tests/net_hosted/connect_poll.py.exp
index cdf520e09..d18a39a12 100644
--- a/tests/net_hosted/connect_poll.py.exp
+++ b/tests/net_hosted/connect_poll.py.exp
@@ -1,3 +1,3 @@
-1 4
+1 20
1
1 4