rust-lang / rust

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

Some tests fail when built with debuginfo #61117

Open petrochenkov opened 5 years ago

petrochenkov commented 5 years ago

Discovered while working on https://github.com/rust-lang/rust/pull/60568.

The lists of failing tests are below, testing was done on x86_64-pc-windows-gnu target.

petrochenkov commented 5 years ago

Tests failing with debuginfo-level-tests = 2:

// Non-codegen tests
incremental/krate-inherent.rs
mir-opt/inline-closure-borrows-arg.rs
run-pass/issues/issue-29466.rs

// Codegen tests
codegen/adjustments.rs
codegen/alloc-optimisation.rs
codegen/c-variadic.rs
codegen/call-metadata.rs
codegen/dealloc-no-unwind.rs
codegen/function-arguments.rs
codegen/issue-32031.rs
codegen/issue-34947-pow-i32.rs
codegen/link_section.rs
codegen/match-optimizes-away.rs
codegen/move-val-init.rs
codegen/nontemporal.rs
codegen/refs.rs
codegen/repeat-trusted-len.rs
codegen/repr-transparent.rs
codegen/scalar-pair-bool.rs
codegen/stores.rs
codegen/union-abi.rs
codegen/vec-iter-collect-len.rs
petrochenkov commented 5 years ago

Tests failing with debuginfo-level-tests = 1:

// Non-codegen tests
incremental/krate-inherent.rs
run-pass/issues/issue-29466.rs

// Codegen tests
codegen/call-metadata.rs
codegen/link_section.rs
codegen/nontemporal.rs
petrochenkov commented 5 years ago

cc @michaelwoerister @nagisa

michaelwoerister commented 5 years ago

Since debuginfo influences what LLVM IR the compiler generates, I'm not surprised. I think that codegen tests should not inherit any debuginfo settings from the environment.

davidtwco commented 5 years ago

A data point: I was using debuginfo-level-tests = 1 (or the previous equivalent) for a little while on a NixOS system and was experiencing a failure on run-pass/issues/issue-29466.rs. I posted about it on Zulip at the time.

workingjubilee commented 2 years ago

I am somewhat doubtful this is actionable for the codegen or assembly tests but it is probably worth examining for the non-codegen tests. Interesting, none of the mir-opt tests seem to have trouble anymore.

Failures for codegen + debuginfo-level-tests = 1 ``` [codegen] src/test/codegen/box-maybe-uninit.rs [codegen] src/test/codegen/call-metadata.rs [codegen] src/test/codegen/frame-pointer.rs#aarch64-apple [codegen] src/test/codegen/frame-pointer.rs#aarch64-linux [codegen] src/test/codegen/frame-pointer.rs#force [codegen] src/test/codegen/frame-pointer.rs#x64-apple [codegen] src/test/codegen/frame-pointer.rs#x64-linux [codegen] src/test/codegen/intrinsics/nontemporal.rs [codegen] src/test/codegen/link_section.rs [codegen] src/test/codegen/loads.rs [codegen] src/test/codegen/mem-replace-direct-memcpy.rs [codegen] src/test/codegen/noalias-unpin.rs [codegen] src/test/codegen/target-feature-overrides.rs#COMPAT [codegen] src/test/codegen/target-feature-overrides.rs#INCOMPAT [codegen] src/test/codegen/unwind-abis/aapcs-unwind-abi.rs [codegen] src/test/codegen/unwind-abis/c-unwind-abi.rs [codegen] src/test/codegen/unwind-abis/cdecl-unwind-abi.rs [codegen] src/test/codegen/unwind-abis/fastcall-unwind-abi.rs [codegen] src/test/codegen/unwind-abis/stdcall-unwind-abi.rs [codegen] src/test/codegen/unwind-abis/system-unwind-abi.rs [codegen] src/test/codegen/unwind-abis/sysv64-unwind-abi.rs [codegen] src/test/codegen/unwind-abis/thiscall-unwind-abi.rs [codegen] src/test/codegen/unwind-abis/vectorcall-unwind-abi.rs [codegen] src/test/codegen/unwind-abis/win64-unwind-abi.rs [codegen] src/test/codegen/vecdeque_no_panic.rs test result: FAILED. 289 passed; 25 failed; 26 ignored; 0 measured; 0 filtered out; finished in 2.66s ```
Failures for assembly + debuginfo-level-tests = {1,2} ``` failures: [assembly] src/test/assembly/panic-no-unwind-no-uwtable.rs [assembly] src/test/assembly/static-relocation-model.rs#A64 test result: FAILED. 124 passed; 2 failed; 15 ignored; 0 measured; 0 filtered out; finished in 0.33s ```
Failures for incremental + debuginfo-level-tests = {1,2} ``` failures: [incremental] src/test/incremental/change_symbol_export_status.rs [incremental] src/test/incremental/thinlto/cgu_keeps_identical_fn.rs test result: FAILED. 155 passed; 2 failed; 0 ignored; 0 measured; 0 filtered out; finished in 8.52s ```
Failures for ui + debuginfo-level-tests = 1 ``` failures: [ui] src/test/ui/cmse-nonsecure/cmse-nonsecure-call/params-on-stack.rs [ui] src/test/ui/issues/issue-29466.rs [ui] src/test/ui/panics/issue-47429-short-backtraces.rs#legacy [ui] src/test/ui/panics/issue-47429-short-backtraces.rs#v0 [ui] src/test/ui/panics/runtime-switch.rs#legacy [ui] src/test/ui/panics/runtime-switch.rs#v0 test result: FAILED. 13097 passed; 6 failed; 105 ignored; 0 measured; 0 filtered out; finished in 66.48s ```
Failures for codegen + debuginfo-level-tests = 2 ``` failures: [codegen] src/test/codegen/adjustments.rs [codegen] src/test/codegen/alloc-optimisation.rs [codegen] src/test/codegen/array-equality.rs [codegen] src/test/codegen/box-maybe-uninit.rs [codegen] src/test/codegen/call-metadata.rs [codegen] src/test/codegen/dealloc-no-unwind.rs [codegen] src/test/codegen/fewer-names.rs#NO [codegen] src/test/codegen/fewer-names.rs#YES [codegen] src/test/codegen/frame-pointer.rs#aarch64-apple [codegen] src/test/codegen/frame-pointer.rs#aarch64-linux [codegen] src/test/codegen/frame-pointer.rs#force [codegen] src/test/codegen/frame-pointer.rs#x64-apple [codegen] src/test/codegen/frame-pointer.rs#x64-linux [codegen] src/test/codegen/intrinsics/nontemporal.rs [codegen] src/test/codegen/intrinsics/offset_from.rs [codegen] src/test/codegen/issue-34947-pow-i32.rs [codegen] src/test/codegen/issue-37945.rs [codegen] src/test/codegen/issue-73031.rs [codegen] src/test/codegen/issue-73396-bounds-check-after-position.rs [codegen] src/test/codegen/issue-75546.rs [codegen] src/test/codegen/issue-77812.rs [codegen] src/test/codegen/link_section.rs [codegen] src/test/codegen/loads.rs [codegen] src/test/codegen/match-optimizes-away.rs [codegen] src/test/codegen/mem-replace-direct-memcpy.rs [codegen] src/test/codegen/noalias-unpin.rs [codegen] src/test/codegen/slice-as_chunks.rs [codegen] src/test/codegen/slice-windows-no-bounds-check.rs [codegen] src/test/codegen/target-feature-overrides.rs#COMPAT [codegen] src/test/codegen/target-feature-overrides.rs#INCOMPAT [codegen] src/test/codegen/transmute-scalar.rs [codegen] src/test/codegen/unwind-abis/aapcs-unwind-abi.rs [codegen] src/test/codegen/unwind-abis/c-unwind-abi.rs [codegen] src/test/codegen/unwind-abis/cdecl-unwind-abi.rs [codegen] src/test/codegen/unwind-abis/fastcall-unwind-abi.rs [codegen] src/test/codegen/unwind-abis/stdcall-unwind-abi.rs [codegen] src/test/codegen/unwind-abis/system-unwind-abi.rs [codegen] src/test/codegen/unwind-abis/sysv64-unwind-abi.rs [codegen] src/test/codegen/unwind-abis/thiscall-unwind-abi.rs [codegen] src/test/codegen/unwind-abis/vectorcall-unwind-abi.rs [codegen] src/test/codegen/unwind-abis/win64-unwind-abi.rs [codegen] src/test/codegen/var-names.rs [codegen] src/test/codegen/vec-in-place.rs [codegen] src/test/codegen/vecdeque_no_panic.rs test result: FAILED. 270 passed; 44 failed; 26 ignored; 0 measured; 0 filtered out; finished in 2.66s ```
Failures for ui + debuginfo-level-tests = 2 ``` failures: [ui] src/test/ui/cmse-nonsecure/cmse-nonsecure-call/params-on-stack.rs [ui] src/test/ui/issues/issue-29466.rs [ui] src/test/ui/limits/huge-array-simple-64.rs [ui] src/test/ui/limits/huge-array.rs [ui] src/test/ui/limits/huge-enum.rs [ui] src/test/ui/limits/huge-struct.rs [ui] src/test/ui/limits/issue-15919-64.rs [ui] src/test/ui/mir/ssa-analysis-regression-50041.rs [ui] src/test/ui/panics/issue-47429-short-backtraces.rs#legacy [ui] src/test/ui/panics/issue-47429-short-backtraces.rs#v0 [ui] src/test/ui/panics/runtime-switch.rs#legacy [ui] src/test/ui/panics/runtime-switch.rs#v0 [ui] src/test/ui/recursion/issue-86784.rs test result: FAILED. 13090 passed; 13 failed; 105 ignored; 0 measured; 0 filtered out; finished in 68.03s ```