Popen.stdin expects data in binary format so encode the commands before sending them.
Signed-off-by: Adrian Moreno amorenoz@redhat.com --- lnst/Tests/TestPMD.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lnst/Tests/TestPMD.py b/lnst/Tests/TestPMD.py index ef975bb..59c69aa 100644 --- a/lnst/Tests/TestPMD.py +++ b/lnst/Tests/TestPMD.py @@ -38,12 +38,12 @@ class TestPMD(BaseTestModule): stderr=subprocess.PIPE, close_fds=True)
- process.stdin.write("start tx_first\n") + process.stdin.write(str.encode("start tx_first\n"))
self.wait_for_interrupt()
- process.stdin.write("stop\n") - process.stdin.write("quit\n") + process.stdin.write(str.encode("stop\n")) + process.stdin.write(str.encode("quit\n"))
out, err = process.communicate() self._res_data = {"stdout": out, "stderr": err}