Skip to content

Commit

Permalink
Auto merge of rust-lang#128913 - saethlin:unignore-debuginfo-tests, r…
Browse files Browse the repository at this point in the history
…=<try>

Enable debuginfo tests that were "temporarily disabled" for the past 6 years

`tests/debuginfo/drop-locations.rs`
No idea why we are setting `-O -Cno-prepopulate-passes`. Nowadays that turns on MIR opts, no idea what it did in 2018.
Turning off optimizations makes just loc2 missing. That seems like a bug in debuginfo generation. Turning off all MIR opts and even adding a `drop(s)` on that line doesn't help. Cursed. Keeping this test ignored.

`tests/debuginfo/option-like-enum.rs`
Debuggers are better at Rust!
Also one inexplicable change. No idea why we used to expect that. Deleted.

`tests/debuginfo/function-arg-initialization.rs`
SingleUseConsts produces incoherent gdb behavior. Seems like a bug.

`tests/debuginfo/macro-stepping.rs`
Also broken by SingleUseConsts. I hate tests like this, nobody uses a debugger on code that's just assigning consts to unused variables. Test should be rewritten with realistic code.

`tests/debuginfo/basic-types-metadata.rs`
Debuggers are better at Rust!
Diverging functions don't have -> ! in their whatis output anymore? Not sure if that is a bug.

try-job: test-various
try-job: aarch64-apple
try-job: x86_64-msvc
try-job: x86_64-mingw
try-job: i686-msvc
try-job: i686-mingw
try-job: armhf-gnu
try-job: dist-various-1
try-job: aarch64-gnu
  • Loading branch information
bors committed Aug 10, 2024
2 parents 7347f8e + 1bc1383 commit fd2f290
Show file tree
Hide file tree
Showing 20 changed files with 17 additions and 46 deletions.
1 change: 0 additions & 1 deletion tests/debuginfo/basic-types-globals-metadata.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//@ min-lldb-version: 310
//@ ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155

//@ compile-flags:-g
// gdb-command:run
Expand Down
21 changes: 10 additions & 11 deletions tests/debuginfo/basic-types-metadata.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//@ min-lldb-version: 310
//@ ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155

//@ compile-flags:-g
// gdb-command:run
Expand Down Expand Up @@ -36,31 +35,31 @@
// gdb-command:whatis f64
// gdb-check:type = f64
// gdb-command:whatis fnptr
// gdb-check:type = [...] (*)([...])
// gdb-check:type = *mut fn ()
// gdb-command:info functions _yyy
// gdbg-check:[...]![...]_yyy([...]);
// gdbr-check:static fn basic_types_metadata::_yyy() -> !;
// gdbr-check:static fn basic_types_metadata::_yyy();
// gdb-command:ptype closure_0
// gdbr-check: type = struct closure
// gdbr-check: type = struct basic_types_metadata::main::{closure_env#0}
// gdbg-check: type = struct closure {
// gdbg-check: <no data fields>
// gdbg-check: }
// gdb-command:ptype closure_1
// gdbg-check: type = struct closure {
// gdbg-check: bool *__0;
// gdbg-check: }
// gdbr-check: type = struct closure (
// gdbr-check: bool *,
// gdbr-check: )
// gdbr-check: type = struct basic_types_metadata::main::{closure_env#1} {
// gdbr-check: *mut bool,
// gdbr-check: }
// gdb-command:ptype closure_2
// gdbg-check: type = struct closure {
// gdbg-check: bool *__0;
// gdbg-check: isize *__1;
// gdbg-check: }
// gdbr-check: type = struct closure (
// gdbr-check: bool *,
// gdbr-check: isize *,
// gdbr-check: )
// gdbr-check: type = struct basic_types_metadata::main::{closure_env#2} {
// gdbr-check: *mut bool,
// gdbr-check: *mut isize,
// gdbr-check: }

//
// gdb-command:continue
Expand Down
3 changes: 0 additions & 3 deletions tests/debuginfo/basic-types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@

//@ min-lldb-version: 310

// This fails on lldb 6.0.1 on x86-64 Fedora 28; so ignore Linux for now.
//@ ignore-linux

//@ compile-flags:-g

// === GDB TESTS ===================================================================================
Expand Down
1 change: 0 additions & 1 deletion tests/debuginfo/by-value-non-immediate-argument.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
//@ ignore-test // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
//@ min-lldb-version: 310

//@ compile-flags:-g
Expand Down
1 change: 0 additions & 1 deletion tests/debuginfo/c-style-enum.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//@ ignore-aarch64
//@ ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
//@ min-lldb-version: 310

//@ compile-flags:-g
Expand Down
4 changes: 0 additions & 4 deletions tests/debuginfo/cross-crate-spans.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@

//@ min-lldb-version: 310

// This fails on lldb 6.0.1 on x86-64 Fedora 28; so mark it macOS-only
// for now.
//@ only-macos

//@ aux-build:cross_crate_spans.rs
extern crate cross_crate_spans;

Expand Down
4 changes: 0 additions & 4 deletions tests/debuginfo/destructured-for-loop-variable.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
//@ min-lldb-version: 310

// This fails on lldb 6.0.1 on x86-64 Fedora 28; so mark it macOS-only
// for now.
//@ only-macos

//@ compile-flags:-g

// === GDB TESTS ===================================================================================
Expand Down
5 changes: 2 additions & 3 deletions tests/debuginfo/drop-locations.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
//@ ignore-windows
//@ ignore-android
//@ ignore-test // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
//@ min-lldb-version: 310
//@ ignore-test

#![allow(unused)]

//@ compile-flags:-g -O -C no-prepopulate-passes
// -O -C no-prepopulate-passes added to work around https://bugs.llvm.org/show_bug.cgi?id=32123
//@ compile-flags:-g

// This test checks that drop glue code gets attributed to scope's closing brace,
// and function epilogues - to function's closing brace.
Expand Down
3 changes: 1 addition & 2 deletions tests/debuginfo/function-arg-initialization.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
//@ ignore-test // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
//@ min-lldb-version: 310

// This test case checks if function arguments already have the correct value
Expand All @@ -8,7 +7,7 @@
// arguments have been properly loaded when setting the breakpoint via the
// function name.

//@ compile-flags:-g
//@ compile-flags:-g -Zmir-enable-passes=-SingleUseConsts

// === GDB TESTS ===================================================================================

Expand Down
1 change: 0 additions & 1 deletion tests/debuginfo/function-prologue-stepping-regular.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

//@ min-lldb-version: 310
//@ ignore-gdb
//@ ignore-test // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
//@ compile-flags:-g

// lldb-command:breakpoint set --name immediate_args
Expand Down
1 change: 0 additions & 1 deletion tests/debuginfo/lexical-scopes-in-block-expression.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//@ min-lldb-version: 310
//@ ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155

//@ compile-flags:-g

Expand Down
1 change: 0 additions & 1 deletion tests/debuginfo/limited-debuginfo.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//@ ignore-lldb
//@ ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155

//@ compile-flags:-C debuginfo=1

Expand Down
3 changes: 1 addition & 2 deletions tests/debuginfo/macro-stepping.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
//@ ignore-android
//@ ignore-aarch64
//@ min-lldb-version: 310
//@ ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155

//@ aux-build:macro-stepping.rs

Expand All @@ -11,7 +10,7 @@
#[macro_use]
extern crate macro_stepping; // exports new_scope!()

//@ compile-flags:-g
//@ compile-flags:-g -Zmir-enable-passes=-SingleUseConsts

// === GDB TESTS ===================================================================================

Expand Down
1 change: 0 additions & 1 deletion tests/debuginfo/method-on-enum.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//@ min-lldb-version: 310
//@ ignore-test // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155

//@ compile-flags:-g

Expand Down
8 changes: 3 additions & 5 deletions tests/debuginfo/option-like-enum.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
//@ ignore-test // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155

//@ min-lldb-version: 310

//@ compile-flags:-g
Expand All @@ -22,19 +20,19 @@

// gdbg-command:print empty_gdb->discr
// gdbr-command:print empty_gdb.discr
// gdb-check:$4 = (isize *) 0x0
// gdb-check:$4 = (*mut isize) 0x1

// gdb-command:print droid
// gdbg-check:$5 = {RUST$ENCODED$ENUM$2$Void = {id = 675675, range = 10000001, internals = 0x43218765}}
// gdbr-check:$5 = option_like_enum::NamedFields::Droid{id: 675675, range: 10000001, internals: 0x43218765}

// gdbg-command:print void_droid_gdb->internals
// gdbr-command:print void_droid_gdb.internals
// gdb-check:$6 = (isize *) 0x0
// gdb-check:$6 = (*mut isize) 0x1

// gdb-command:print nested_non_zero_yep
// gdbg-check:$7 = {RUST$ENCODED$ENUM$1$2$Nope = {__0 = 10.5, __1 = {a = 10, b = 20, c = [...]}}}
// gdbr-check:$7 = option_like_enum::NestedNonZero::Yep(10.5, option_like_enum::NestedNonZeroField {a: 10, b: 20, c: 0x[...] "x[...]"})
// gdbr-check:$7 = option_like_enum::NestedNonZero::Yep(10.5, option_like_enum::NestedNonZeroField {a: 10, b: 20, c: 0x[...]})

// gdb-command:print nested_non_zero_nope
// gdbg-check:$8 = {RUST$ENCODED$ENUM$1$2$Nope = {__0 = [...], __1 = {a = [...], b = [...], c = 0x0}}}
Expand Down
1 change: 0 additions & 1 deletion tests/debuginfo/simple-struct.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//@ min-lldb-version: 310
//@ ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155

//@ compile-flags: -g -Zmir-enable-passes=-CheckAlignment

Expand Down
1 change: 0 additions & 1 deletion tests/debuginfo/simple-tuple.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//@ min-lldb-version: 310
//@ ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155

//@ compile-flags:-g

Expand Down
1 change: 0 additions & 1 deletion tests/debuginfo/struct-in-enum.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//@ min-lldb-version: 310
//@ ignore-gdb-version: 7.11.90 - 7.12.9
//@ ignore-test // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155

//@ compile-flags:-g

Expand Down
1 change: 0 additions & 1 deletion tests/debuginfo/union-smoke.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//@ min-lldb-version: 310
//@ ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155

//@ ignore-gdb-version: 7.11.90 - 7.12.9

Expand Down
1 change: 0 additions & 1 deletion tests/debuginfo/vec.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//@ min-lldb-version: 310
//@ ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155

//@ compile-flags:-g

Expand Down

0 comments on commit fd2f290

Please sign in to comment.