aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBrendan Jackman <brendan.jackman@arm.com>2017-05-03 12:45:43 +0100
committerJavi Merino <merino.jav@gmail.com>2017-05-13 14:44:27 +0100
commitb1b1c9ec6deb6cb879c683f7ddaebb98d2f016ac (patch)
treec493910dd12e97c6a3b23913ab12950e302226d3 /tests
parent3e3ba734d077b116ecf912a51d3428ca6e8ae329 (diff)
downloadtrappy-b1b1c9ec6deb6cb879c683f7ddaebb98d2f016ac.tar.gz
ftrace: Improve error messages when failing to parse trace
Diffstat (limited to 'tests')
-rw-r--r--tests/test_ftrace.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test_ftrace.py b/tests/test_ftrace.py
index a912ff7..389d31f 100644
--- a/tests/test_ftrace.py
+++ b/tests/test_ftrace.py
@@ -420,6 +420,15 @@ class TestFTraceSched(utils_tests.SetupDirectory):
self.assertEqual(trace.basetime, 0)
+ def test_ftrace_unique_but_no_fields(self):
+ """Test with a matching unique but no special fields"""
+ version_parser = trappy.register_dynamic_ftrace("Version", "version")
+
+ with self.assertRaises(ValueError):
+ trappy.FTrace(scope="custom")
+
+ trappy.unregister_dynamic_ftrace(version_parser)
+
def test_ftrace_normalize_some_tracepoints(self):
"""Test that normalizing time works if not all the tracepoints are in the trace"""