forked from OSchip/llvm-project
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
This commit is contained in:
parent
a51e0c2243
commit
c1a775419f
|
@ -21,6 +21,22 @@ class GlobalVariablesTestCase(TestBase):
|
|||
self.source, '// Set break point at this line.')
|
||||
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."""
|
||||
|
@ -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'])
|
||||
|
|
Loading…
Reference in New Issue