runtests: catch EPROTONOSUPPORT in checkportisavailable
This is a follow-up of "runtests: check ports on IPv6 address". On some
platforms, "socket.AF_INET6" exists while that does not necessarily mean the
platform support IPv6 - when initializing a socket using "socket.socket", it
could fail with EPROTONOSUPPORT. So treat that as "Port unavailable".
--- a/tests/run-tests.py Tue Feb 07 23:24:47 2017 -0800
+++ b/tests/run-tests.py Fri Feb 10 04:09:06 2017 -0800
@@ -124,7 +124,8 @@
s.close()
return True
except socket.error as exc:
- if exc.errno not in (errno.EADDRINUSE, errno.EADDRNOTAVAIL):
+ if exc.errno not in (errno.EADDRINUSE, errno.EADDRNOTAVAIL,
+ errno.EPROTONOSUPPORT):
raise
return False