From: Ondrej Lichtner <olichtne(a)redhat.com>
The last two lines from tcpdump were not being processed due to a bug in
the handling loop. This commit fixes that.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
test_modules/TestPacketAssert.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/test_modules/TestPacketAssert.py b/test_modules/TestPacketAssert.py
index 32884a4..0466c20 100644
--- a/test_modules/TestPacketAssert.py
+++ b/test_modules/TestPacketAssert.py
@@ -58,6 +58,8 @@ class TestPacketAssert(TestGeneric):
self.line = next_line
else:
self.line += next_line
+ if self.line != "":
+ self._process_captured_line(self.line)
def _prepare_grep_filters(self):
@@ -152,6 +154,9 @@ class TestPacketAssert(TestGeneric):
else:
self.line += next_line
+ if self.line != "":
+ self._process_captured_line(self.line)
+
logging.info("Capturing finished. Received %d packets",
self._num_recv)
res = {"received": self._num_recv,
"min": self._min_cond,
--
1.7.11.7