From b1b1c9ec6deb6cb879c683f7ddaebb98d2f016ac Mon Sep 17 00:00:00 2001 From: Brendan Jackman Date: Wed, 3 May 2017 12:45:43 +0100 Subject: ftrace: Improve error messages when failing to parse trace --- tests/test_ftrace.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests/test_ftrace.py') 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""" -- cgit v1.2.3