diff mbox series

[2/4] tests: Encode VM input for python3

Message ID 20190208100922.19888-2-masashi.honma@gmail.com
State Changes Requested
Headers show
Series [1/4] tests: Decode VM output for python3 | expand

Commit Message

Masashi Honma Feb. 8, 2019, 10:09 a.m. UTC
Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
---
 tests/hwsim/vm/parallel-vm.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/tests/hwsim/vm/parallel-vm.py b/tests/hwsim/vm/parallel-vm.py
index f8bb64872..dfd1340fe 100755
--- a/tests/hwsim/vm/parallel-vm.py
+++ b/tests/hwsim/vm/parallel-vm.py
@@ -208,7 +208,7 @@  def show_progress(scr):
                     continue
                 else:
                     name = tests.pop(0)
-                    vm[i]['proc'].stdin.write(name + '\n')
+                    vm[i]['proc'].stdin.write(name.encode() + b'\n')
                     scr.addstr(name)
                     logger.debug("VM[%d] start test %s" % (i, name))
 
@@ -262,12 +262,12 @@  def show_progress(scr):
                 scr.clrtoeol()
                 updated = True
                 if not rerun_tests:
-                    vm[i]['proc'].stdin.write('\n')
+                    vm[i]['proc'].stdin.write(b'\n')
                     scr.addstr("shutting down")
                     logger.info("VM[%d] shutting down" % i)
                 else:
                     name = rerun_tests.pop(0)
-                    vm[i]['proc'].stdin.write(name + '\n')
+                    vm[i]['proc'].stdin.write(name.encode() + b'\n')
                     scr.addstr(name + "(*)")
                     logger.debug("VM[%d] start test %s (*)" % (i, name))