Skip to content

Fix msvc-specific differences in debuginfo tests - #162412

Open
Walnut356 wants to merge 2 commits into
rust-lang:mainfrom
Walnut356:msvc_revision
Open

Fix msvc-specific differences in debuginfo tests#162412
Walnut356 wants to merge 2 commits into
rust-lang:mainfrom
Walnut356:msvc_revision

Conversation

@Walnut356

@Walnut356 Walnut356 commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

As part of #161657

Fixes ~every test that fails due to an msvc-specific problem. I tried to modify the lldb-check commands in-place where possible. If I couldn't, I used revisions.

There is 1 very tiny visualizer bug fix that I lumped in here that affects summaries of empty arrays on msvc (] -> [])

basic-types-globals.rs- msvc stores globals under the statics category, and LLDB-with-PDB-debug-info requires that those be access by a fully qualified name (which shouldn't pose any issue for dwarf debug info, which IIRC can access via the qualified or unqualified name). I enforced the crate name through compiler flags, so even if this file moves around or is renamed, it shouldn't break.

The above also applies to no_mangle-info.rs except, for some reason, non-msvc targets are only able to access the top level static through the unqualified path. I'm not 100% sure if this is an LLDB bug or not, but it's not a huge deal for us since we can just use revisions.

The only test that changed behaviorally is thread-names.rs, which now uses a script command to print all threads, and then compiletest can pick the 2 it cares about out of that list. On windows, the spawned thread isn't thread 2, since there's typically a bunch of ntdll.dll threads. Even for non-windows, relying on exact thread numbers seems pretty fragile so this should help all around.

After this patch, the remainder of the 22 test failures on windows-msvc are the <variable has been optimized out> issue and the variable shadowing issue. The variable shadowing is a bug on their end, but we can work around it. I need to look into the <variable has been optimized out> issue a bit more to see what's going on there.

r? @Kobzol , @jieyouxu

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Sep 7, 2026
@rustbot

rustbot commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

Kobzol is not on the review rotation at the moment.
They may take a while to respond.

@Kobzol

Kobzol commented Sep 7, 2026

Copy link
Copy Markdown
Member

Do you perhaps want to move those tests to the new format first, to avoid having to modify these diffs by hand?

@Walnut356

Walnut356 commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

In the short term, I'm aiming to get windows-gnu and windows-msvc into a state where all the tests pass so we can actually run them in CI (and so that running them locally is useful). Once those are running in CI, we can transition the tests over on all targets at once. That way we don't have to disable them on windows-msvc in the interim, nor do we have blessed files that aren't being tested.

I forgot to mention it in the main comment, but this patch fixes the last failing test on windows-gnu (at least on my machine lol) so we can start testing that in CI whenever, we'd just need to do like the other patch and acquire LLDB on the windows runners. LLVM distributes via winget, and you can explicitly download a specific version, so it should be pretty much the same change as #161574

@jieyouxu jieyouxu self-assigned this Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants