Skip to content

Commit

Permalink
pythongh-119461: Restore the testSocket VSOCK skipUnless removed by PR
Browse files Browse the repository at this point in the history
…python#119465 (python#129561)

Restore the skipUnless removed by python#119465.

This test can only pass on virtual machines, not actual machines.

actual machines see:

```
    self.cli.connect((cid, VSOCKPORT))
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
OSError: [Errno 19] No such device
```

Reproduced on (Linux) Ubuntu 24.04.1 running 6.8.0-52-generic.
  • Loading branch information
gpshead authored Feb 2, 2025
1 parent cf4c4ec commit e1006ce
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Lib/test/test_socket.py
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,8 @@ def clientTearDown(self):
@unittest.skipIf(WSL, 'VSOCK does not work on Microsoft WSL')
@unittest.skipUnless(HAVE_SOCKET_VSOCK,
'VSOCK sockets required for this test.')
@unittest.skipUnless(get_cid() != 2, # VMADDR_CID_HOST
"This test can only be run on a virtual guest.")
class ThreadedVSOCKSocketStreamTest(unittest.TestCase, ThreadableTest):

def __init__(self, methodName='runTest'):
Expand Down

0 comments on commit e1006ce

Please sign in to comment.