Skip to content

debuginfo-gdb test failures #39838

Closed
Closed
@amboar

Description

@amboar

Recently I started looking at issues with the Rust test suite on powerpc64le as part of an effort to package Rust for Debian on POWER. I'm using 81bd267 as the basis for my testing, which contains the resolution for #39522, but I still see a large number of failures. I'm testing on Ubuntu Yakkety (16.10), both on powerpc64le and x86_64.

I made a couple of comments on #39522, but I have created a new issue to track my problem as I don't want to hijack a closed issue.

On Ubuntu Yakkety with a clean build of rust at 81bd267, invoking ./x.py test src/test/debuginfo/ gives me the output gdb-ubuntu-rust-debuginfo.txt, which has the summary test result: FAILED. 54 passed; 40 failed; 13 ignored; 0 measured.

Yakkety's gdb reports:

$ /usr/bin/gdb --version
GNU gdb (Ubuntu 7.11.90.20161005-0ubuntu1) 7.11.90.20161005-git

Given the issues with different gdb versions as outlined in #39522, I figured I'd try building gdb from the tip of binutils-gdb master, which at the time was commit 10ddfe62f8979cfe380b07c4f827e72681cc612a:

$ /usr/local/bin/gdb --version
GNU gdb (GDB) 7.12.50.20170213-git

This was built with ./configure --with-python=python3, as is done for Ubuntu (though with many more configure options in Ubuntu's case).

Using my own gdb build I get the output gdb-master-rust-debuginfo.txt and a result summary of test result: FAILED. 53 passed; 51 failed; 3 ignored; 0 measured. Presumably the tests ignored by the patch for #39522 with gdb 7.11.90 are now functional as we have 10 less tests ignored.

However, the plot thickened before I realised that Ubuntu built gdb with Python support, as building a gdb with ./configure && make gave me a binary that passed many more debuginfo tests. After jumping through several hoops I found I could simulate a lack of Python support in gdb by breaking a part of the Rust source tree with mv -f src/etc/debugger_pretty_printers_common.py{,.disabled} && touch src/etc/debugger_pretty_printers_common.py. With this configuration, for both the stock Ubuntu gdb and my custom build, I now get the following logs:

gdb-ubuntu-rust-debuginfo-no-pp.txt

test result: FAILED. 90 passed; 4 failed; 13 ignored; 0 measured

gdb-master-rust-debuginfo-no-pp.txt:

test result: FAILED. 98 passed; 6 failed; 3 ignored; 0 measured

This means one of two things

  1. The gdbr-check annotations in the tests are out of sync with the pretty printer scripts, and the tests are expecting the wrong output. If this is the case, I have a commit at amboar/rust@67bffe3 which makes the expectations match the output. This commit was mechanically generated and the script used is included in the commit message.
  2. Alternatively, gdb is loading the pretty printer scripts when it shouldn't be, and this is negatively affecting the test results.

Miscellaneous testing gotchas:

  1. Rust caches the test results and won't re-run tests that succeeded previous: need to rm -rf ./build/x86_64-unknown-linux-gnu/test/debuginfo/*
  2. Changing the gdb invoked by the test suite: Use sed -ri '/CFG_GDB/s|/usr/bin/gdb|/usr/local/bin/gdb|' config.mk, and switch the search and replace patterns around as necessary
  3. Build gdb with Python support

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 rustc

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions