summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Reitz2018-10-22 15:53:00 +0200
committerEduardo Habkost2018-10-31 01:11:52 +0100
commitf544adf736cb1b100a7fe926f3712157b22c3ddd (patch)
treef678846bb8bdc5360f4fec2524f800bc2d7cabff
parentiotests: Make nbd-fault-injector flush (diff)
downloadqemu-f544adf736cb1b100a7fe926f3712157b22c3ddd.tar.gz
qemu-f544adf736cb1b100a7fe926f3712157b22c3ddd.tar.xz
qemu-f544adf736cb1b100a7fe926f3712157b22c3ddd.zip
iotests: Flush in iotests.py's QemuIoInteractive
After issuing a command, flush the pipe. This does not change anything in Python 2, but it makes a difference in Python 3. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Cleber Rosa <crosa@redhat.com> Message-Id: <20181022135307.14398-3-mreitz@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
-rw-r--r--tests/qemu-iotests/iotests.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index 4e67fbbe96..10f2d17419 100644
--- a/tests/qemu-iotests/iotests.py
+++ b/tests/qemu-iotests/iotests.py
@@ -178,6 +178,7 @@ class QemuIoInteractive:
cmd = cmd.strip()
assert cmd != 'q' and cmd != 'quit'
self._p.stdin.write(cmd + '\n')
+ self._p.stdin.flush()
return self._read_output()