Fix msvc-specific differences in debuginfo tests - #162412
Conversation
|
|
|
Do you perhaps want to move those tests to the new format first, to avoid having to modify these diffs by hand? |
|
In the short term, I'm aiming to get I forgot to mention it in the main comment, but this patch fixes the last failing test on |
|
@bors try |
This comment has been minimized.
This comment has been minimized.
Fix msvc-specific differences in debuginfo tests try-job: test-aarch64-msvc-1 try-job: test-x86_64-msvc-1 try-job: test-aarch64-gnu-debug try-job: test-x86_64-mingw-1 try-job: test-aarch64-apple-1
| // We use the python API to do this because `thread list` refuses to print anything inside the test | ||
| // harness for some reason. |
|
I tested this locally, yeah essentially remaining ones are shadowing / optimized out. Thanks |
Fix msvc-specific differences in debuginfo tests As part of rust-lang#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 --- try-job: test-aarch64-msvc-1 try-job: test-x86_64-msvc-1 try-job: test-aarch64-gnu-debug try-job: test-x86_64-mingw-1 try-job: test-aarch64-apple-1
As part of #161657
Fixes ~every test that fails due to an msvc-specific problem. I tried to modify the
lldb-checkcommands 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 thestaticscategory, 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.rsexcept, 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 ascriptcommand to print all threads, and thencompiletestcan 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 ofntdll.dllthreads. 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-msvcare 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
try-job: test-aarch64-msvc-1
try-job: test-x86_64-msvc-1
try-job: test-aarch64-gnu-debug
try-job: test-x86_64-mingw-1
try-job: test-aarch64-apple-1