Index: packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/TestMPXRegisters.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/TestMPXRegisters.py +++ packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/TestMPXRegisters.py @@ -22,6 +22,17 @@ def setUp(self): TestBase.setUp(self) + def hasMPX(self): + if lldb.remote_platform: + self.runCmd('platform get-file "/proc/cpuinfo" "cpuinfo"') + cpuinfo_path = "cpuinfo" + self.addTearDownHook(lambda: os.unlink("cpuinfo")) + else: + cpuinfo_path = "/proc/cpuinfo" + + with open(cpuinfo_path, 'r') as f: + return " mpx " in f.read() + @skipIf(compiler="clang") @skipIf(oslist=no_match(['linux'])) @skipIf(archs=no_match(['i386', 'x86_64'])) @@ -29,6 +40,10 @@ def test_mpx_registers_with_example_code(self): """Test Intel(R) MPX registers with example code.""" self.build() + + if !self.hasMPX(): + return + self.mpx_registers_with_example_code() def mpx_registers_with_example_code(self): Index: packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/mpx_bound_violation/TestBoundViolation.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/mpx_bound_violation/TestBoundViolation.py +++ packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/mpx_bound_violation/TestBoundViolation.py @@ -19,6 +19,17 @@ mydir = TestBase.compute_mydir(__file__) + def hasMPX(self): + if lldb.remote_platform: + self.runCmd('platform get-file "/proc/cpuinfo" "cpuinfo"') + cpuinfo_path = "cpuinfo" + self.addTearDownHook(lambda: os.unlink("cpuinfo")) + else: + cpuinfo_path = "/proc/cpuinfo" + + with open(cpuinfo_path, 'r') as f: + return " mpx " in f.read() + @skipIf(compiler="clang") @skipIf(oslist=no_match(['linux'])) @skipIf(archs=no_match(['i386', 'x86_64'])) @@ -26,6 +37,10 @@ def test_mpx_boundary_violation(self): """Test Intel(R) MPX bound violation signal.""" self.build() + + if !self.hasMPX(): + return + self.mpx_boundary_violation() def mpx_boundary_violation(self):