rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
98.7k stars 12.75k forks source link

Is anyone running our gdb-based Android debuginfo tests? #129139

Open saethlin opened 3 months ago

saethlin commented 3 months ago

This is mostly directed at @chriswailes, @maurer, and @mgeisler because you are the target maintainers for our Android targets.

I've been looking through our debuginfo tests, and I've found that a few of them were disabled years ago never revisited. Some of those tests are disabled only on Android. Based on the history linked from https://github.com/rust-lang/rust/issues/10381, the last attempt to re-enable some of the mass-ignored android debuginfo tests was in 2015. So I'm not expecting any of you to really know the history here.

But currently (and I do not know for how long) we do not run any debuginfo tests on Android: https://github.com/rust-lang-ci/rust/actions/runs/10409799292/job/28830241725#step:25:23109

It seems like this is because compiletest looks for a gdb: https://github.com/rust-lang/rust/blob/0f442e265c165c0a78633bef98de18517815150c/src/tools/compiletest/src/lib.rs#L1038-L1085 but since compiletest doesn't find one, we skip the entire suite.

There is a fair amount of code in compiletest for handling debuginfo tests on Android. Since none of any of the code associated with running debuginfo tests on Android is currently being exercised, I suspect all of that code is just a time bomb for whoever eventually decides that we need those tests to be enabled.

In https://github.com/rust-lang/rust/pull/128913 I am removing a number of ignore-test annotations from the test suite, and replacing them with more specific ignores where required. Because the entire suite is ignored for Android, I cannot do this.

So I have a few questions:

maurer commented 3 months ago

I'm not currently working to re-enable these tests, and I don't expect to have time to do so soon.

If someone wanted to do this, rather than installing gdb-multiarch, use either ndk-lldb or ndk-gdb which are installed as part of the NDK we're fetching. Those should:

  1. Have the right arch support
  2. Know how to connect to a process running in the emulator to debug it

If someone was going to spend time getting one set of tests working, lldb would be massively preferred.

mgeier commented 3 months ago

@saethlin I think you meant to tag someone else, I'm not a maintainer for any target.

saethlin commented 3 months ago

Right you are. Sorry about that.