From bd791e97f8bb0e4bb507bf51850183515ecc6743 Mon Sep 17 00:00:00 2001 From: Muhammad Omair Javaid Date: Wed, 19 Aug 2020 15:47:46 +0500 Subject: [PATCH] [LLDB] Minor fix in TestSVERegisters.py for AArch64/Linux buildbot This adds a minor test case fix to previously submitted AArch64 SVE ptrace support. This was failing on LLDB/AArch64 Linux buildbot. Differential Revision: https://reviews.llvm.org/D79699 --- .../rw_access_static_config/TestSVERegisters.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lldb/test/API/commands/register/register/aarch64_sve_registers/rw_access_static_config/TestSVERegisters.py b/lldb/test/API/commands/register/register/aarch64_sve_registers/rw_access_static_config/TestSVERegisters.py index c34f4ae2..42d30f6 100644 --- a/lldb/test/API/commands/register/register/aarch64_sve_registers/rw_access_static_config/TestSVERegisters.py +++ b/lldb/test/API/commands/register/register/aarch64_sve_registers/rw_access_static_config/TestSVERegisters.py @@ -21,10 +21,16 @@ class RegisterCommandsTestCase(TestBase): cpuinfo_path = self.getBuildArtifact("cpuinfo") if configuration.lldb_platform_name: self.runCmd('platform get-file "/proc/cpuinfo" ' + cpuinfo_path) + else: + cpuinfo_path = "/proc/cpuinfo" + + try: + f = open(cpuinfo_path, 'r') + cpuinfo = f.read() + f.close() + except: + return False - f = open(cpuinfo_path, 'r') - cpuinfo = f.read() - f.close() return " sve " in cpuinfo def check_sve_register_size(self, set, name, expected): -- 2.7.4