Skip to content

Some debuginfo tests are not running #47163

Description

@nerd2

I noticed when adding a debuginfo test that nothing I did caused the test to fail. Tracing back this seems to have been caused by 3e6c83d which broke parsing of the command/check lines, leaving all tests passing without any checking.

PR #47155 runs them again and ignores the failing ones

Activity

  1. nerd2 commented on Jan 3, 2018

    @nerd2
    Author

    Happy to have this assigned to me to work through the failing low hanging fruit tests

  2. added
    A-testsuiteArea: The testsuite used to check the correctness of rustc
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    on Jan 3, 2018
  3. nerd2 commented on Jan 6, 2018

    @nerd2
    Author

    PR #47155 has now landed, the following tests were disabled:
    basic-types-globals-metadata.rs // ignore-gdb
    basic-types-globals.rs // ignore-gdb
    basic-types-metadata.rs // ignore-gdb
    basic-types-mut-globals.rs // ignore-gdb
    by-value-non-immediate-argument.rs // ignore-test
    c-style-enum.rs // ignore-gdb
    drop-locations.rs // ignore-test
    function-arg-initialization.rs // ignore-test
    function-prologue-stepping-regular.rs // ignore-test
    lexical-scopes-in-block-expression.rs // ignore-gdb
    limited-debuginfo.rs // ignore-gdb
    macro-stepping.rs // ignore-gdb
    method-on-enum.rs // ignore-test
    option-like-enum.rs // ignore-test
    pretty-std.rs // ignore-test
    shadowed-variable.rs // ignore-test
    simple-struct.rs // ignore-gdb
    simple-tuple.rs // ignore-gdb
    struct-in-enum.rs // ignore-test
    type-names.rs // ignore-gdb
    union-smoke.rs // ignore-gdb
    vec-slices.rs // ignore-gdb
    vec.rs // ignore-gdb

  4. nerd2 commented on Jan 6, 2018

    @nerd2
    Author

    @eddyb I had a brief look at option-like-enum.rs and it seems that the DWARF emitted is hardcoding the descriminant to the 0th field? Looked like you had done most recent work in this area. The issue is that the following is emitted as "RUST$ENCODED$ENUM$0$None". Same if the first field of "Full" is u64. cc @tromey i notice you are working in this area too

    enum MoreFields<'a> { Full(u32, &'a isize, i16), Empty }

  5. nerd2 commented on Jan 6, 2018

    @nerd2
    Author

    @arielb1 @vadimcn Looking at drop-locations.rs, various of the #locs are skipped. I notice that going from "-O" to "-C opt-level=0" fixes the test, on osx at least, but I wasn't sure if that was a valid fix or if this test should still work at O2.

  6. added a commit that references this issue on Jan 6, 2018
  7. tromey commented on Jan 7, 2018

    @tromey
    Contributor

    The issue is that the following is emitted as "RUST$ENCODED$ENUM$0$None".

    I'm addressing this more fully in #32920.

  8. added
    C-enhancementCategory: An issue proposing an enhancement or a PR with one.
    on Apr 4, 2018
  9. added
    A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)
    on Apr 20, 2020
  10. jonas-schievink commented on Apr 20, 2020

    @jonas-schievink
    Contributor

    Can someone give an update on this? Seems bad if we haven't run these tests for over 2 years.

  11. added
    C-bugCategory: This is a bug.
    and removed
    C-enhancementCategory: An issue proposing an enhancement or a PR with one.
    on Apr 21, 2020
  12. tromey commented on Apr 21, 2020

    @tromey
    Contributor

    Many tests are still commented out. On my Fedora 30 system, I get one failure with the system gdb; and when I remove the comments I see:

    failures:
        [debuginfo-gdb] debuginfo/basic-types-metadata.rs
        [debuginfo-gdb] debuginfo/macro-stepping.rs
        [debuginfo-gdb] debuginfo/pretty-std-collections.rs
        [debuginfo-gdb] debuginfo/type-names.rs
    

    (I'm omitting some lldb failures here as not relevant.)

  13. tromey commented on Apr 21, 2020

    @tromey
    Contributor

    I read through the failures. However, I tried to re-run the tests against various versions of gdb, and I found I couldn't reliably do this... if I change my PATH to point to a newer gdb, x.py test seems to run a different number of tests. I don't know why this happens or what to do about it, but anyway it prevents a full investigation.

    Most of these failures occur when gdb prints something reasonable, but just not exactly what the test case happens to expect.

    I think macro-stepping.rs is an existing bug that is filed in the issues.

    pretty-std-collections.rs is probably a bug in the pretty-printers:

    Python Exception <class 'gdb.error'> No type named alloc::collections::btree::node::Root<i32, i32.: 
    Python Exception <class 'gdb.error'> No type named alloc::collections::btree::node::Root<bool, bool>.: 
    Python Exception <class 'gdb.error'> No type named alloc::collections::btree::node::Root<i32, pretty_std_collections::MyLeafNode.: 

    I suspect type-names.rs may be fixed by this gdb patch series (not yet landed). However, I couldn't test this, as above.

    compiletest seems confused by what the git gdb prints as its version number. (I tried to hack around this...)

    Which versions of gdb ought to be tested? It's been a while since I looked at this stuff, so I no longer remember the state.

  14. tromey commented on Apr 22, 2020

    @tromey
    Contributor

    compiletest seems confused by what the git gdb prints as its version number. (I tried to hack around this...)

    I have a patch for this that I will send soon.

  15. tromey commented on Apr 22, 2020

    @tromey
    Contributor

    See #71428

  16. spastorino commented on Apr 23, 2020

    @spastorino
    Member
  17. tromey commented on Apr 23, 2020

    @tromey
    Contributor

    I read the meeting notes. Note that #71428 just fixes a bug that prevents running the tests against git master gdb. It does not touch the tests. I still don't know which versions of gdb are / can be tested or where to look for that. But it sounds like perhaps these tests are deprecated anyway.

  18. jesusprubio commented on Feb 1, 2021

    @jesusprubio
    Contributor

    Just in case it could help. I can confirm they also fail in last Fedora (v33, GDB v10), but working for v9: #79009 (comment)

  19. added a commit that references this issue on Apr 9, 2021
  20. added a commit that references this issue on Mar 25, 2022
  21. changed the title [-]Debuginfo tests are not running[/-] [+]Some debuginfo tests are not running[/+] on Mar 31, 2023
  22. added a commit that references this issue on May 17, 2023
  23. Enselic commented on Jul 17, 2025

    @Enselic
    Member

    Triage: As far as can tell this issue was closed by #128913.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)A-testsuiteArea: The testsuite used to check the correctness of rustcC-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions