This is an archive of the discontinued LLVM Phabricator instance.

Re-enable libc++ gdb-pretty-printer tests for all versions of clang.
ClosedPublic

Authored by saugustine on Apr 27 2022, 4:01 PM.

Details

Reviewers
ldionne
Group Reviewers
Restricted Project
Summary

The bootstrap tests were failing because the environment has a version
of gdb too old to read dwarf5 as generated by clang. The problem isn't
just pretty printer tests--this version of gdb will fail to read any
program compiled with those versions of clang.

More discussion here:

https://discourse.llvm.org/t/gdb-10-1-cant-read-clangs-dwarf-v5/6035/11

Diff Detail

Event Timeline

saugustine created this revision.Apr 27 2022, 4:01 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 27 2022, 4:01 PM
saugustine requested review of this revision.Apr 27 2022, 4:02 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 27 2022, 4:02 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
jgorbe added a subscriber: jgorbe.Apr 27 2022, 4:03 PM

Note the pre-commit CI uses Ubuntu 20.04 which contains gdb 9.1. Ubuntu 22.04 has just been released, @ldionne how do you feel about moving the CI to Ubuntu 22.04?

Alternatively we can try to add -gdwarf-4 to the RUN line.

Note the pre-commit CI uses Ubuntu 20.04 which contains gdb 9.1. Ubuntu 22.04 has just been released, @ldionne how do you feel about moving the CI to Ubuntu 22.04?

Alternatively we can try to add -gdwarf-4 to the RUN line.

I'm fine with moving to Ubuntu 22.04! As you know, however, platform updates are not always super smooth for the CI, so I think it may be good to do it over the week-end.

ldionne accepted this revision.May 5 2022, 11:52 AM

This LGTM once we've moved to Ubuntu 22.04. Please wait for that and then rebase to you can get a clean CI run.

This revision is now accepted and ready to land.May 5 2022, 11:52 AM

We have now moved to Ubuntu 22.04, let's rebase this and give it a shot. We've been seeing issues with these tests so it might help.

I can't manage to get the buildbot environment working to test this. It consistently fails with

clang: error: unable to execute command: posix_spawn failed: Operation not permitted

Not sure the best thing to do here. I think it should work fine, but am stumped on how to test it.

I can't manage to get the buildbot environment working to test this. It consistently fails with

clang: error: unable to execute command: posix_spawn failed: Operation not permitted

Not sure the best thing to do here. I think it should work fine, but am stumped on how to test it.

Can you rebase the patch so we can see the exact errors in our CI.
Note there are probably some merge conflicts since I added more builds to the exception list.

Rebased changes

Thanks! I see different errors now. I'll see what I can do about it. At the moment our CI is rather unstable so I'll look at it when that's fixed.

libcxx/test/libcxx/gdb/gdb_pretty_printer_test.sh.cpp
15

This hunk can probably also be removed. But I'll investigate the build issue first.

@Mordante ping on this - be nice to get this back up and running since the pretty printers have regressed recently (string_view regressed/broke due to a member rename from data to data_)

Circling back to this.

Reenable libc++ gdb-pretty-printer tests
_and_ update the pretty printer for bitrot.

Will push this shortly as we had already agree it should be done.

daltenty added a subscriber: daltenty.EditedOct 12 2022, 6:33 AM

Seems like this is breaking in the libc++ CI: https://buildkite.com/llvm-project/libcxx-ci/builds/14027

Seems like this is breaking in the libc++ CI: https://buildkite.com/llvm-project/libcxx-ci/builds/14027

looks like this came good one way or another? (at least I see some recent green runs)