diff mbox series

[v2,4/4] tests: Explicitly flush stdin for python3

Message ID 20190208225110.9289-4-masashi.honma@gmail.com
State Accepted
Headers show
Series [v2,1/4] tests: Change handling of reading non blocked empty stream for python3 | expand

Commit Message

Masashi Honma Feb. 8, 2019, 10:51 p.m. UTC
Without this flush(), test does not run.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
---
 tests/hwsim/vm/parallel-vm.py | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/tests/hwsim/vm/parallel-vm.py b/tests/hwsim/vm/parallel-vm.py
index 367973681..d2b0def97 100755
--- a/tests/hwsim/vm/parallel-vm.py
+++ b/tests/hwsim/vm/parallel-vm.py
@@ -214,6 +214,7 @@  def show_progress(scr):
                 else:
                     name = tests.pop(0)
                     vm[i]['proc'].stdin.write(name.encode() + b'\n')
+                    vm[i]['proc'].stdin.flush()
                     scr.addstr(name)
                     logger.debug("VM[%d] start test %s" % (i, name))
 
@@ -270,11 +271,13 @@  def show_progress(scr):
                 updated = True
                 if not rerun_tests:
                     vm[i]['proc'].stdin.write(b'\n')
+                    vm[i]['proc'].stdin.flush()
                     scr.addstr("shutting down")
                     logger.info("VM[%d] shutting down" % i)
                 else:
                     name = rerun_tests.pop(0)
                     vm[i]['proc'].stdin.write(name.encode() + b'\n')
+                    vm[i]['proc'].stdin.flush()
                     scr.addstr(name + "(*)")
                     logger.debug("VM[%d] start test %s (*)" % (i, name))