[PATCH] TestPacketAssert: fix line processing bug

Jiri Pirko jpirko at redhat.com
Fri May 3 09:23:00 UTC 2013


applied, thanks

Thu, Apr 25, 2013 at 04:09:16PM CEST, olichtne at redhat.com wrote:
>From: Ondrej Lichtner <olichtne at 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 at 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
>
>_______________________________________________
>LNST-developers mailing list
>LNST-developers at lists.fedorahosted.org
>https://lists.fedorahosted.org/mailman/listinfo/lnst-developers


More information about the LNST-developers mailing list