diff options
Diffstat (limited to 'gnu/llvm/lldb/packages/Python/lldbsuite/test/android/platform')
3 files changed, 59 insertions, 0 deletions
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/android/platform/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/android/platform/Makefile new file mode 100644 index 00000000000..3d0b98f13f3 --- /dev/null +++ b/gnu/llvm/lldb/packages/Python/lldbsuite/test/android/platform/Makefile @@ -0,0 +1,2 @@ +CXX_SOURCES := main.cpp +include Makefile.rules diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/android/platform/TestDefaultCacheLineSize.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/android/platform/TestDefaultCacheLineSize.py new file mode 100644 index 00000000000..0a5475c6749 --- /dev/null +++ b/gnu/llvm/lldb/packages/Python/lldbsuite/test/android/platform/TestDefaultCacheLineSize.py @@ -0,0 +1,45 @@ +""" +Verify the default cache line size for android targets +""" + + + +import lldb +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + + +class DefaultCacheLineSizeTestCase(TestBase): + + mydir = TestBase.compute_mydir(__file__) + + @skipUnlessTargetAndroid + def test_cache_line_size(self): + self.build(dictionary=self.getBuildFlags()) + exe = self.getBuildArtifact("a.out") + target = self.dbg.CreateTarget(exe) + self.assertTrue(target and target.IsValid(), "Target is valid") + + breakpoint = target.BreakpointCreateByName("main") + self.assertTrue( + breakpoint and breakpoint.IsValid(), + "Breakpoint is valid") + + # Run the program. + process = target.LaunchSimple( + None, None, self.get_process_working_directory()) + self.assertTrue(process and process.IsValid(), PROCESS_IS_VALID) + self.assertEqual( + process.GetState(), + lldb.eStateStopped, + PROCESS_STOPPED) + + # check the setting value + self.expect( + "settings show target.process.memory-cache-line-size", + patterns=[" = 2048"]) + + # Run to completion. + process.Continue() + self.assertEqual(process.GetState(), lldb.eStateExited, PROCESS_EXITED) diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/android/platform/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/android/platform/main.cpp new file mode 100644 index 00000000000..e8f3fa65eb0 --- /dev/null +++ b/gnu/llvm/lldb/packages/Python/lldbsuite/test/android/platform/main.cpp @@ -0,0 +1,12 @@ +//===-- main.cpp ------------------------------------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +int main () +{ + return 0; +} |