summaryrefslogtreecommitdiffstats
path: root/lldb/test/functionalities/register
diff options
context:
space:
mode:
authorAshok Thirumurthi <ashok.thirumurthi@intel.com>2013-04-23 14:32:25 +0000
committerAshok Thirumurthi <ashok.thirumurthi@intel.com>2013-04-23 14:32:25 +0000
commit33d7f3a234086f85e83d3294a0b6151e8c7e7cd7 (patch)
tree0d10827fef9a2a57a2bc3f3d64576fc7c62a60df /lldb/test/functionalities/register
parentf8bb3e522d8ca054520e358c09b93e147473d2c8 (diff)
downloadbcm5719-llvm-33d7f3a234086f85e83d3294a0b6151e8c7e7cd7.tar.gz
bcm5719-llvm-33d7f3a234086f85e83d3294a0b6151e8c7e7cd7.zip
Splits register_commands into a passing test on Linux (to improve test coverage),
and a failing test for register expressions. Also factors out common setup code in preparation to add a few new tests. Reviewed by: Daniel Malea llvm-svn: 180109
Diffstat (limited to 'lldb/test/functionalities/register')
-rw-r--r--lldb/test/functionalities/register/TestRegisters.py34
1 files changed, 18 insertions, 16 deletions
diff --git a/lldb/test/functionalities/register/TestRegisters.py b/lldb/test/functionalities/register/TestRegisters.py
index bfa671e63a8..6a4e6957f65 100644
--- a/lldb/test/functionalities/register/TestRegisters.py
+++ b/lldb/test/functionalities/register/TestRegisters.py
@@ -14,12 +14,19 @@ class RegisterCommandsTestCase(TestBase):
mydir = os.path.join("functionalities", "register")
def test_register_commands(self):
- """Test commands related to registers, in particular xmm registers."""
+ """Test commands related to registers, in particular vector registers."""
if not self.getArchitecture() in ['i386', 'x86_64']:
self.skipTest("This test requires i386 or x86_64 as the architecture for the inferior")
self.buildDefault()
self.register_commands()
+ def test_register_expressions(self):
+ """Test expression evaluation with commands related to registers."""
+ if not self.getArchitecture() in ['i386', 'x86_64']:
+ self.skipTest("This test requires i386 or x86_64 as the architecture for the inferior")
+ self.buildDefault()
+ self.register_expressions()
+
@expectedFailureLinux # bugzilla 14600 - Convenience registers not supported on Linux
def test_convenience_registers(self):
"""Test convenience registers."""
@@ -36,9 +43,7 @@ class RegisterCommandsTestCase(TestBase):
self.buildDefault()
self.convenience_registers_with_process_attach()
- @expectedFailureLinux # bugzilla 14661 - Expressions involving XMM registers fail on Linux
- def register_commands(self):
- """Test commands related to registers, in particular xmm registers."""
+ def common_setup(self):
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
@@ -51,7 +56,9 @@ class RegisterCommandsTestCase(TestBase):
self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
substrs = ['stopped', 'stop reason = breakpoint'])
- # Test some register-related commands.
+ def register_commands(self):
+ """Test commands related to registers, in particular vector registers."""
+ self.common_setup()
self.expect("register read -a", MISSING_EXPECTED_REGISTERS,
substrs = ['registers were unavailable'], matching = False)
@@ -61,6 +68,11 @@ class RegisterCommandsTestCase(TestBase):
self.expect("register read -s 3",
substrs = ['invalid register set index: 3'], error = True)
+ @expectedFailureLinux # bugzilla 14661 - Expressions involving XMM registers fail on Linux
+ def register_expressions(self):
+ """Test expression evaluation with commands related to registers."""
+ self.common_setup()
+
# rdar://problem/10611315
# expression command doesn't handle xmm or stmm registers...
self.expect("expr $xmm0",
@@ -71,17 +83,7 @@ class RegisterCommandsTestCase(TestBase):
def convenience_registers(self):
"""Test convenience registers."""
- exe = os.path.join(os.getcwd(), "a.out")
- self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
- # Break in main().
- lldbutil.run_break_set_by_symbol (self, "main", num_expected_locations=-1)
-
- self.runCmd("run", RUN_SUCCEEDED)
-
- # The stop reason of the thread should be breakpoint.
- self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
- substrs = ['stopped', 'stop reason = breakpoint'])
+ self.common_setup()
# The vanilla "register read" command does not output derived register like eax.
self.expect("register read", matching=False,
OpenPOWER on IntegriCloud