Skip to content

Commit 368ba55

Browse files
[3.12] gh-119461: Restore the testSocket VSOCK skipUnless removed by PR GH-119465 (GH-129561) (#129565)
gh-119461: Restore the testSocket VSOCK skipUnless removed by PR GH-119465 (GH-129561) Restore the skipUnless removed by GH-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 368ba55

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
@@ -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)