aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Fernandes <joelaf@google.com>2017-06-14 13:05:53 -0700
committerKP Singh <kpsingh@google.com>2017-06-15 00:19:20 +0200
commit6953b16af678e1a2d36165c0ac8f97f43eefa12d (patch)
treee6a2cb610519e83a36db67a7e66eb881b132b805
parentee6fb473add14fb3e2947bb57c7e1fc86c172a46 (diff)
downloadtrappy-6953b16af678e1a2d36165c0ac8f97f43eefa12d.tar.gz
trappy/tests: Fix test for checking invalid line
Due to the recent patches to skip invalid lines using a regex, this test case fails. Fix it by appending the invalid line to the end of the test trace. Signed-off-by: Joel Fernandes <joelaf@google.com> Reviewed-by: KP Singh <kpsingh@google.com>
-rw-r--r--tests/test_ftrace.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test_ftrace.py b/tests/test_ftrace.py
index 389d31f..1377c68 100644
--- a/tests/test_ftrace.py
+++ b/tests/test_ftrace.py
@@ -424,6 +424,10 @@ class TestFTraceSched(utils_tests.SetupDirectory):
"""Test with a matching unique but no special fields"""
version_parser = trappy.register_dynamic_ftrace("Version", "version")
+ # Append invalid line to file
+ with open("trace.txt", "a") as fil:
+ fil.write("version = 6")
+
with self.assertRaises(ValueError):
trappy.FTrace(scope="custom")