37 lines · python
1import lldb2from intelpt_testcase import *3from lldbsuite.test.lldbtest import *4from lldbsuite.test import lldbutil5from lldbsuite.test.decorators import *6 7 8class TestTraceLoad(TraceIntelPTTestCaseBase):9 def testSchema(self):10 self.expect("trace schema intel-pt", substrs=["triple", "threads", "iptTrace"])11 12 def testInvalidPluginSchema(self):13 self.expect(14 "trace schema invalid-plugin",15 error=True,16 substrs=[17 'error: no trace plug-in matches the specified type: "invalid-plugin"'18 ],19 )20 21 def testAllSchemas(self):22 self.expect(23 "trace schema all",24 substrs=[25 """{26 "type": "intel-pt",27 "cpuInfo": {28 // CPU information gotten from, for example, /proc/cpuinfo.29 30 "vendor": "GenuineIntel" | "unknown",31 "family": integer,32 "model": integer,33 "stepping": integer34 },"""35 ],36 )37