commit be66c1600cfbd92818d37490636b2bde6550d095
Author: Jan Tluka <jtluka(a)redhat.com>
Date: Fri Jul 18 09:31:21 2014 +0200
PacketAssert: do not process EOF line
When the tcpdump capture is empty and there are no grep_filters available
the processing of dump file will incorrectly report one captured packet.
The fix is to remove empty line that is returned by readline() on EOF
from the processing.
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
Signed-off-by: Jiri Pirko <jiri(a)resnulli.us>
test_modules/PacketAssert.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/test_modules/PacketAssert.py b/test_modules/PacketAssert.py
index 404f371..b0a7101 100644
--- a/test_modules/PacketAssert.py
+++ b/test_modules/PacketAssert.py
@@ -125,7 +125,8 @@ class PacketAssert(TestGeneric):
break
line = line.strip("\n")
- self._process_captured_line(line)
+ if len(line) != 0:
+ self._process_captured_line(line)
tcpdump_file.close()
os.remove(tcpdump_file.name)
Show replies by date