Issue #26536: socket.ioctl now supports SIO_LOOPBACK_FAST_PATH. Patch by Daniel Stokes.
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
index 1ddd604..fa318b3 100644
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -1217,6 +1217,16 @@
         self.assertRaises(ValueError, s.ioctl, -1, None)
         s.ioctl(socket.SIO_KEEPALIVE_VALS, (1, 100, 100))
 
+    @unittest.skipUnless(os.name == "nt", "Windows specific")
+    @unittest.skipUnless(hasattr(socket, 'SIO_LOOPBACK_FAST_PATH'),
+                         'Loopback fast path support required for this test')
+    def test_sio_loopback_fast_path(self):
+        s = socket.socket()
+        self.addCleanup(s.close)
+        s.ioctl(socket.SIO_LOOPBACK_FAST_PATH, True)
+        self.assertRaises(TypeError, s.ioctl, socket.SIO_LOOPBACK_FAST_PATH, None)
+
+
     def testGetaddrinfo(self):
         try:
             socket.getaddrinfo('localhost', 80)