diff -r b11b71aaf864 Lib/test/test_asyncio/test_base_events.py --- a/Lib/test/test_asyncio/test_base_events.py Sat May 21 14:56:53 2016 +0300 +++ b/Lib/test/test_asyncio/test_base_events.py Sun May 22 09:25:07 2016 +0200 @@ -1505,7 +1505,8 @@ def test_create_datagram_endpoint_sockopts(self): # Socket options should not be applied unless asked for. # SO_REUSEADDR defaults to on for UNIX. - # SO_REUSEPORT is not available on all platforms. + # SO_REUSEPORT is not available on all platforms, it is defined on + # Android API 21 but not implemented (issue 26858). coro = self.loop.create_datagram_endpoint( lambda: MyDatagramProto(create_future=True, loop=self.loop), @@ -1515,7 +1516,8 @@ reuse_address_default_on = ( os.name == 'posix' and sys.platform != 'cygwin') - reuseport_supported = hasattr(socket, 'SO_REUSEPORT') + reuseport_supported = (hasattr(socket, 'SO_REUSEPORT') and + not support.is_android) if reuse_address_default_on: self.assertTrue( diff -r b11b71aaf864 Lib/test/test_asyncio/test_events.py --- a/Lib/test/test_asyncio/test_events.py Sat May 21 14:56:53 2016 +0300 +++ b/Lib/test/test_asyncio/test_events.py Sun May 22 09:26:17 2016 +0200 @@ -817,7 +817,8 @@ # close server server.close() - @unittest.skipUnless(hasattr(socket, 'SO_REUSEPORT'), 'No SO_REUSEPORT') + @unittest.skipUnless(hasattr(socket, 'SO_REUSEPORT') and + not support.is_android, 'SO_REUSEPORT not supported') def test_create_server_reuse_port(self): proto = MyProto(self.loop) f = self.loop.create_server( diff -r b11b71aaf864 Doc/library/asyncio-eventloop.rst --- a/Doc/library/asyncio-eventloop.rst Sat May 21 14:56:53 2016 +0300 +++ b/Doc/library/asyncio-eventloop.rst Sun May 22 09:41:11 2016 +0200 @@ -345,7 +345,9 @@ same port as other existing endpoints are bound to, so long as they all set this flag when being created. This option is not supported on Windows and some UNIX's. If the :py:data:`~socket.SO_REUSEPORT` constant is not - defined then this capability is unsupported. + defined then this capability is unsupported. The constant is defined on + Android but the functionality is not implemented and raises + :exc:`OSError` when used. * *allow_broadcast* tells the kernel to allow this endpoint to send messages to the broadcast address.