Skip to content
  • Sascha Silbe's avatar
    c1c71e49
    qemu-iotests: iotests.VM: remove qtest socket on error · c1c71e49
    Sascha Silbe authored
    
    
    On error, VM.launch() cleaned up the monitor unix socket, but left the
    qtest unix socket behind. This caused the remaining sub-tests to fail
    with EADDRINUSE:
    
    +======================================================================
    +ERROR: testQuorum (__main__.TestFifoQuorumEvents)
    +----------------------------------------------------------------------
    +Traceback (most recent call last):
    +  File "148", line 63, in setUp
    +    self.vm.launch()
    +  File "/home6/silbe/qemu/tests/qemu-iotests/iotests.py", line 247, in launch
    +    self._qmp.accept()
    +  File "/home6/silbe/qemu/tests/qemu-iotests/../../scripts/qmp/qmp.py", line 141, in accept
    +    return self.__negotiate_capabilities()
    +  File "/home6/silbe/qemu/tests/qemu-iotests/../../scripts/qmp/qmp.py", line 57, in __negotiate_capabilities
    +    raise QMPConnectError
    +QMPConnectError
    +
    +======================================================================
    +ERROR: testQuorum (__main__.TestQuorumEvents)
    +----------------------------------------------------------------------
    +Traceback (most recent call last):
    +  File "148", line 63, in setUp
    +    self.vm.launch()
    +  File "/home6/silbe/qemu/tests/qemu-iotests/iotests.py", line 244, in launch
    +    self._qtest = qtest.QEMUQtestProtocol(self._qtest_path, server=True)
    +  File "/home6/silbe/qemu/tests/qemu-iotests/../../scripts/qtest.py", line 33, in __init__
    +    self._sock.bind(self._address)
    +  File "/usr/lib64/python2.7/socket.py", line 224, in meth
    +    return getattr(self._sock,name)(*args)
    +error: [Errno 98] Address already in use
    
    Fix this by cleaning up both the monitor socket and the qtest socket iff
    they exist.
    
    Signed-off-by: default avatarSascha Silbe <silbe@linux.vnet.ibm.com>
    Reviewed-by: default avatarBo Tu <tubo@linux.vnet.ibm.com>
    Message-id: 1459848109-29756-4-git-send-email-silbe@linux.vnet.ibm.com
    Reviewed-by: default avatarMax Reitz <mreitz@redhat.com>
    Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
    c1c71e49
    qemu-iotests: iotests.VM: remove qtest socket on error
    Sascha Silbe authored
    
    
    On error, VM.launch() cleaned up the monitor unix socket, but left the
    qtest unix socket behind. This caused the remaining sub-tests to fail
    with EADDRINUSE:
    
    +======================================================================
    +ERROR: testQuorum (__main__.TestFifoQuorumEvents)
    +----------------------------------------------------------------------
    +Traceback (most recent call last):
    +  File "148", line 63, in setUp
    +    self.vm.launch()
    +  File "/home6/silbe/qemu/tests/qemu-iotests/iotests.py", line 247, in launch
    +    self._qmp.accept()
    +  File "/home6/silbe/qemu/tests/qemu-iotests/../../scripts/qmp/qmp.py", line 141, in accept
    +    return self.__negotiate_capabilities()
    +  File "/home6/silbe/qemu/tests/qemu-iotests/../../scripts/qmp/qmp.py", line 57, in __negotiate_capabilities
    +    raise QMPConnectError
    +QMPConnectError
    +
    +======================================================================
    +ERROR: testQuorum (__main__.TestQuorumEvents)
    +----------------------------------------------------------------------
    +Traceback (most recent call last):
    +  File "148", line 63, in setUp
    +    self.vm.launch()
    +  File "/home6/silbe/qemu/tests/qemu-iotests/iotests.py", line 244, in launch
    +    self._qtest = qtest.QEMUQtestProtocol(self._qtest_path, server=True)
    +  File "/home6/silbe/qemu/tests/qemu-iotests/../../scripts/qtest.py", line 33, in __init__
    +    self._sock.bind(self._address)
    +  File "/usr/lib64/python2.7/socket.py", line 224, in meth
    +    return getattr(self._sock,name)(*args)
    +error: [Errno 98] Address already in use
    
    Fix this by cleaning up both the monitor socket and the qtest socket iff
    they exist.
    
    Signed-off-by: default avatarSascha Silbe <silbe@linux.vnet.ibm.com>
    Reviewed-by: default avatarBo Tu <tubo@linux.vnet.ibm.com>
    Message-id: 1459848109-29756-4-git-send-email-silbe@linux.vnet.ibm.com
    Reviewed-by: default avatarMax Reitz <mreitz@redhat.com>
    Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
Loading