From: Ondrej Lichtner <olichtne(a)redhat.com>
When not flushed, the pipe is buffered and the testpmd process doesn't
actually start forwarding packets as expected.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
lnst/Tests/TestPMD.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lnst/Tests/TestPMD.py b/lnst/Tests/TestPMD.py
index 59c69aa..a92a42a 100644
--- a/lnst/Tests/TestPMD.py
+++ b/lnst/Tests/TestPMD.py
@@ -39,11 +39,14 @@ def run(self):
close_fds=True)
process.stdin.write(str.encode("start tx_first\n"))
+ process.stdin.flush()
self.wait_for_interrupt()
process.stdin.write(str.encode("stop\n"))
+ process.stdin.flush()
process.stdin.write(str.encode("quit\n"))
+ process.stdin.flush()
out, err = process.communicate()
self._res_data = {"stdout": out, "stderr": err}
--
2.23.0
Show replies by date