summaryrefslogtreecommitdiffstats
path: root/gnu/llvm/lldb/packages/Python/lldbsuite/test/android/platform
diff options
context:
space:
mode:
authorpatrick <patrick@openbsd.org>2020-08-03 14:33:06 +0000
committerpatrick <patrick@openbsd.org>2020-08-03 14:33:06 +0000
commit061da546b983eb767bad15e67af1174fb0bcf31c (patch)
tree83c78b820819d70aa40c36d90447978b300078c5 /gnu/llvm/lldb/packages/Python/lldbsuite/test/android/platform
parentImport LLVM 10.0.0 release including clang, lld and lldb. (diff)
downloadwireguard-openbsd-061da546b983eb767bad15e67af1174fb0bcf31c.tar.xz
wireguard-openbsd-061da546b983eb767bad15e67af1174fb0bcf31c.zip
Import LLVM 10.0.0 release including clang, lld and lldb.
ok hackroom tested by plenty
Diffstat (limited to 'gnu/llvm/lldb/packages/Python/lldbsuite/test/android/platform')
-rw-r--r--gnu/llvm/lldb/packages/Python/lldbsuite/test/android/platform/Makefile2
-rw-r--r--gnu/llvm/lldb/packages/Python/lldbsuite/test/android/platform/TestDefaultCacheLineSize.py45
-rw-r--r--gnu/llvm/lldb/packages/Python/lldbsuite/test/android/platform/main.cpp12
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;
+}