Fix GitHub Actions config (actually run gdb tests on new backend).

I had missed that the CI config didn't actually run the tests, because
(I think) `matrix.target` is not set by default (?). All of our hosts
are native x86-64, so we can just gate on OS (Ubuntu) instead.

I also discovered that while I had been testing with the gdb tests
locally, when *all* `debug::*` tests are run, there are two that do not
pass on the new backend because of specific differences in compiled
code. One is a value-lifetime issue (the value is "optimized out" at the
point the breakpoint is set) and the other has to do with basic-block
order (it is trying to match against hardcoded machine-code offsets
which have changed).
This commit is contained in:
Chris Fallin
2021-01-22 16:42:35 -08:00
parent f54d0d05c7
commit 557a932757
3 changed files with 12 additions and 4 deletions

View File

@@ -295,8 +295,8 @@ jobs:
# Test debug (DWARF) related functionality on new backend. # Test debug (DWARF) related functionality on new backend.
- run: | - run: |
sudo apt-get update && sudo apt-get install -y gdb sudo apt-get update && sudo apt-get install -y gdb
cargo test --features experimental_x64 test_debug_dwarf -- --ignored --test-threads 1 cargo test --features experimental_x64 test_debug_dwarf -- --ignored --test-threads 1 --test debug::
if: matrix.target == 'x86_64-unknown-linux-gnu' if: matrix.os == 'ubuntu-latest'
env: env:
RUST_BACKTRACE: 1 RUST_BACKTRACE: 1

View File

@@ -137,7 +137,11 @@ check: exited with status
#[ignore] #[ignore]
#[cfg(all( #[cfg(all(
any(target_os = "linux", target_os = "macos"), any(target_os = "linux", target_os = "macos"),
target_pointer_width = "64" target_pointer_width = "64",
// Ignore test on new backend. The value this is looking for is
// not available at the point that the breakpoint is set when
// compiled by the new backend.
not(feature = "experimental_x64"),
))] ))]
pub fn test_debug_dwarf_ptr() -> Result<()> { pub fn test_debug_dwarf_ptr() -> Result<()> {
let output = lldb_with_script( let output = lldb_with_script(

View File

@@ -114,7 +114,11 @@ check: DW_AT_decl_line (10)
#[cfg(all( #[cfg(all(
any(target_os = "linux", target_os = "macos"), any(target_os = "linux", target_os = "macos"),
target_arch = "x86_64", target_arch = "x86_64",
target_pointer_width = "64" target_pointer_width = "64",
// Ignore test on new backend. This is a specific test with hardcoded
// offsets and the new backend compiles the return basic-block at a different
// offset, causing mismatches.
not(feature = "experimental_x64"),
))] ))]
fn test_debug_dwarf5_translate_lines() -> Result<()> { fn test_debug_dwarf5_translate_lines() -> Result<()> {
check_line_program( check_line_program(