Skip to content

Commit 22b065d

Browse files
gpsheadmiss-islington
authored andcommitted
pythongh-119461: Restore the testSocket VSOCK skipUnless removed by PR pythonGH-119465 (pythonGH-129561)
Restore the skipUnless removed by pythonGH-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. (cherry picked from commit e1006ce) Co-authored-by: Gregory P. Smith <[email protected]>
1 parent 580d781 commit 22b065d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Lib/test/test_socket.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,8 @@ def clientTearDown(self):
486486
@unittest.skipIf(WSL, 'VSOCK does not work on Microsoft WSL')
487487
@unittest.skipUnless(HAVE_SOCKET_VSOCK,
488488
'VSOCK sockets required for this test.')
489+
@unittest.skipUnless(get_cid() != 2, # VMADDR_CID_HOST
490+
"This test can only be run on a virtual guest.")
489491
class ThreadedVSOCKSocketStreamTest(unittest.TestCase, ThreadableTest):
490492

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

0 commit comments

Comments
 (0)