]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
iotests: Flush in iotests.py's QemuIoInteractive
authorMax Reitz <mreitz@redhat.com>
Mon, 22 Oct 2018 13:53:00 +0000 (14:53 +0100)
committerEduardo Habkost <ehabkost@redhat.com>
Wed, 31 Oct 2018 00:11:52 +0000 (21:11 -0300)
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>
tests/qemu-iotests/iotests.py

index 4e67fbbe96d082f638420bd2a41e43e45a80a2df..10f2d17419cde1f2f7fa21fabc46fd87b694aae4 100644 (file)
@@ -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()