mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
iotests/151: ensure subprocesses are cleaned up
The iotest 151 creates a bunch of subprocesses, with their stdout connected to a pipe but never reads any data from them and does not gurantee the processes are killed on cleanup. This triggers resource leak warnings from python when the subprocess.Popen object is garbage collected. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
committed by
John Snow
parent
d4d0ebfcc9
commit
2b2fb25c2a
@@ -263,6 +263,11 @@ class TestThrottledWithNbdExportBase(iotests.QMPTestCase):
|
||||
break
|
||||
except subprocess.TimeoutExpired:
|
||||
self.vm.qtest(f'clock_step {1 * 1000 * 1000 * 1000}')
|
||||
try:
|
||||
p.kill()
|
||||
p.stdout.close()
|
||||
except:
|
||||
pass
|
||||
except IndexError:
|
||||
pass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user