8000 gh-119461: Restore the testSocket VSOCK skipUnless removed by PR GH-1… · miss-islington/cpython@f326edc · GitHub
[go: up one dir, main page]

Skip to content

Commit f326edc

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 <greg@krypto.org>
1 parent 45db419 commit f326edc

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
@@ -472,6 +472,8 @@ def clientTearDown(self):
472472
@unittest.skipIf(WSL, 'VSOCK does not work on Microsoft WSL')
473473
@unittest.skipUnless(HAVE_SOCKET_VSOCK,
474474
'VSOCK sockets required 53FB for this test.')
475+
@unittest.skipUnless(get_cid() != 2, # VMADDR_CID_HOST
476+
"This test can only be run on a virtual guest.")
475477
class ThreadedVSOCKSocketStreamTest(unittest.TestCase, ThreadableTest):
476478

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

0 commit comments

Comments
 (0)
0