Skip to content

Commit 1459d08

Browse files
[3.13] gh-119461: Restore the testSocket VSOCK skipUnless removed by PR GH-119465 (GH-129561) (#129564)
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 2d60dcf commit 1459d08

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
@@ -521,6 +521,8 @@ def clientTearDown(self):
521521
@unittest.skipIf(WSL, 'VSOCK does not work on Microsoft WSL')
522522
@unittest.skipUnless(HAVE_SOCKET_VSOCK,
523523
'VSOCK sockets required for this test.')
524+
@unittest.skipUnless(get_cid() != 2, # VMADDR_CID_HOST
525+
"This test can only be run on a virtual guest.")
524526
class ThreadedVSOCKSocketStreamTest(unittest.TestCase, ThreadableTest):
525527

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

0 commit comments

Comments
 (0)