Skip to content

Commit e1006ce

Browse files
authored
gh-119461: Restore the testSocket VSOCK skipUnless removed by PR #119465 (#129561)
Restore the skipUnless removed by #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.
1 parent cf4c4ec commit e1006ce

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Lib/test/test_socket.py

+2
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,8 @@ def clientTearDown(self):
520520
@unittest.skipIf(WSL, 'VSOCK does not work on Microsoft WSL')
521521
@unittest.skipUnless(HAVE_SOCKET_VSOCK,
522522
'VSOCK sockets required for this test.')
523+
@unittest.skipUnless(get_cid() != 2, # VMADDR_CID_HOST
524+
"This test can only be run on a virtual guest.")
523525
class ThreadedVSOCKSocketStreamTest(unittest.TestCase, ThreadableTest):
524526

525527
def __init__(self, methodName='runTest'):

0 commit comments

Comments
 (0)