diff options
author | Pavel Labath <labath@google.com> | 2018-05-01 10:09:53 +0000 |
---|---|---|
committer | Pavel Labath <labath@google.com> | 2018-05-01 10:09:53 +0000 |
commit | c1a775419f1fa1afce0deb4fc7a4985a2f982435 (patch) | |
tree | 80b28eaa68902074151cb72f3d33ac77d0a42b81 /lldb/packages/Python/lldbsuite/test/lang/c | |
parent | a51e0c2243d72ed0c412dc53b6c731a3ff21241f (diff) | |
download | bcm5719-llvm-c1a775419f1fa1afce0deb4fc7a4985a2f982435.tar.gz bcm5719-llvm-c1a775419f1fa1afce0deb4fc7a4985a2f982435.zip |
Split TestGlobalVariables into two and xfail one of them for arm64 linux
Displaying of global pointer variables is not working on arm64 linux
(pr37301).
I've moved this part into a separate test, so it can be xfailed
separately. I then move the "show-variables-with-process-available"
check before the "show-all-variables" command to presrve the intent of
checking that global variable caching works correctly. (I've verified
that the new arrangement still fails when I revert the fix from
r331230.)
llvm-svn: 331250
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/lang/c')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/lang/c/global_variables/TestGlobalVariables.py | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/global_variables/TestGlobalVariables.py b/lldb/packages/Python/lldbsuite/test/lang/c/global_variables/TestGlobalVariables.py index 4219eb083d1..4b0f776c82f 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/c/global_variables/TestGlobalVariables.py +++ b/lldb/packages/Python/lldbsuite/test/lang/c/global_variables/TestGlobalVariables.py @@ -22,6 +22,22 @@ class GlobalVariablesTestCase(TestBase): self.shlib_names = ["a"] @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24764") + @expectedFailureAll(oslist=["linux"], archs=["aarch64"], bugnumber="llvm.org/pr37301") + def test_without_process(self): + """Test that static initialized variables can be inspected without + process.""" + self.build() + + # Create a target by the debugger. + target = self.dbg.CreateTarget(self.getBuildArtifact("a.out")) + + self.assertTrue(target, VALID_TARGET) + self.expect("target variable g_ptr", VARIABLES_DISPLAYED_CORRECTLY, + substrs=['(int *)']) + self.expect("target variable *g_ptr", VARIABLES_DISPLAYED_CORRECTLY, + substrs=['42']) + + @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24764") def test_c_global_variables(self): """Test 'frame variable --scope --no-args' which omits args and shows scopes.""" self.build() @@ -39,12 +55,6 @@ class GlobalVariablesTestCase(TestBase): environment = self.registerSharedLibrariesWithTarget( target, self.shlib_names) - # Test that static initialized variables can be inspected without process. - self.expect("target variable g_ptr", VARIABLES_DISPLAYED_CORRECTLY, - substrs=['(int *)']) - self.expect("target variable *g_ptr", VARIABLES_DISPLAYED_CORRECTLY, - substrs=['42']) - # Now launch the process, and do not stop at entry point. process = target.LaunchSimple( None, environment, self.get_process_working_directory()) @@ -59,6 +69,13 @@ class GlobalVariablesTestCase(TestBase): self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE, substrs=[' resolved, hit count = 1']) + # Test that the statically initialized variable can also be + # inspected *with* a process. + self.expect("target variable g_ptr", VARIABLES_DISPLAYED_CORRECTLY, + substrs=['(int *)']) + self.expect("target variable *g_ptr", VARIABLES_DISPLAYED_CORRECTLY, + substrs=['42']) + # Check that GLOBAL scopes are indicated for the variables. self.runCmd("frame variable --show-types --scope --show-globals --no-args") self.expect( @@ -106,7 +123,3 @@ class GlobalVariablesTestCase(TestBase): matching=False, substrs=["can't be resolved"]) - # Test that the statically initialized variable can also be - # inspected *with* a process. - self.expect("target variable *g_ptr", VARIABLES_DISPLAYED_CORRECTLY, - substrs=['42']) |