aboutsummaryrefslogtreecommitdiff
path: root/tests/test_systrace.py
diff options
context:
space:
mode:
authorJavi Merino <javi.merino@arm.com>2016-03-24 10:50:03 +0000
committerJavi Merino <javi.merino@arm.com>2016-03-24 11:43:41 +0000
commit0341082b2baa11780548c12028067b9f4c5d6ee1 (patch)
tree17834c54d43cc6abd352f2542e03c238eace7486 /tests/test_systrace.py
parent46458d66cd5118b6d9cac7cb455f8dae1286b9b2 (diff)
downloadtrappy-0341082b2baa11780548c12028067b9f4c5d6ee1.tar.gz
sched: cope with SysTrace's sched_switch event
For trace-cmd traces, we use the raw trace to parse sched_switch. That's not possible for SysTrace traces, we don't have access to the raw data. Luckily SysTrace doesn't mangle the data as much as trace-cmd's plugin, so a simple string replace is enough to get rid of a stray "==>".
Diffstat (limited to 'tests/test_systrace.py')
-rw-r--r--tests/test_systrace.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test_systrace.py b/tests/test_systrace.py
index 22b9288..4c2a594 100644
--- a/tests/test_systrace.py
+++ b/tests/test_systrace.py
@@ -31,6 +31,10 @@ class TestSystrace(utils_tests.SetupDirectory):
events = ["sched_switch", "sched_wakeup", "trace_event_clock_sync"]
trace = trappy.SysTrace("trace.html", events=events)
+ self.assertTrue(hasattr(trace, "sched_switch"))
+ self.assertEquals(len(trace.sched_switch.data_frame), 4)
+ self.assertTrue("prev_comm" in trace.sched_switch.data_frame.columns)
+
self.assertTrue(hasattr(trace, "sched_wakeup"))
self.assertEquals(len(trace.sched_wakeup.data_frame), 4)
self.assertTrue("target_cpu" in trace.sched_wakeup.data_frame.columns)