brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 23ade35 Raw
37 lines · python
1"""2Verify the default cache line size for android targets3"""4 5 6import lldb7from lldbsuite.test.decorators import *8from lldbsuite.test.lldbtest import *9from lldbsuite.test import lldbutil10 11 12class DefaultCacheLineSizeTestCase(TestBase):13    NO_DEBUG_INFO_TESTCASE = True14 15    @skipUnlessTargetAndroid16    def test_cache_line_size(self):17        self.build()18        target = self.createTestTarget()19        self.assertTrue(target and target.IsValid(), "Target is valid")20 21        breakpoint = target.BreakpointCreateByName("main")22        self.assertTrue(breakpoint and breakpoint.IsValid(), "Breakpoint is valid")23 24        # Run the program.25        process = target.LaunchSimple(None, None, self.get_process_working_directory())26        self.assertTrue(process and process.IsValid(), PROCESS_IS_VALID)27        self.assertEqual(process.GetState(), lldb.eStateStopped, PROCESS_STOPPED)28 29        # check the setting value30        self.expect(31            "settings show target.process.memory-cache-line-size", patterns=[" = 2048"]32        )33 34        # Run to completion.35        process.Continue()36        self.assertState(process.GetState(), lldb.eStateExited, PROCESS_EXITED)37