MCPcopy
hub / github.com/tanelpoder/0xtools / create_stack_suite

Method create_stack_suite

xtop/tests/test_runner.py:188–208  ·  view source on GitHub ↗

Create stack trace test suite

(self)

Source from the content-addressed store, hash-verified

186 return suite
187
188 def create_stack_suite(self) -> TestSuite:
189 """Create stack trace test suite"""
190 suite = TestSuite("Stack Tests", "Stack trace functionality")
191
192 base_cmd = f"python3 ../xtop-test.py -d {self.datadir} --from '{self.from_time}' --to '{self.to_time}'"
193
194 tests = [
195 ("kernel_stacks", "Kernel stack traces",
196 f"{base_cmd} -g 'state,kstack_current_func' --limit 5 --format simple"),
197
198 ("user_stacks", "User stack traces",
199 f"{base_cmd} -g 'state,ustack_current_func' --limit 5 --format simple"),
200
201 ("stack_hashes", "Stack hashes",
202 f"{base_cmd} -g 'kstack_hash,state' --limit 5 --format simple"),
203 ]
204
205 for name, desc, cmd in tests:
206 suite.add_test(TestCase(name, desc, cmd))
207
208 return suite
209
210 def create_advanced_suite(self) -> TestSuite:
211 """Create advanced functionality test suite"""

Callers 1

run_allMethod · 0.95

Calls 3

add_testMethod · 0.95
TestSuiteClass · 0.85
TestCaseClass · 0.85

Tested by

no test coverage detected