Skip to content

profile_trim_paths split-debuginfo tests fail on riscv64gc-unknown-linux-gnu #17255

Description

@yuzibo

Problem

When running ./x test --stage 2 src/tools/cargo, get:

...
test lto::fresh_swapping_commands has been running for a long time                                                              
test lto::test_all has been running for a long time                                                                             
test lto::test_all_and_bench has been running for a long time                                                                   
........                                                                                                                        
                                                                                                                                
failures:                                                                                                                       
                                                                                                                                
---- profile_trim_paths::object_works::with_split_debuginfo_packed stdout ----                                                  
running `/home/jenkins/rust/rust/build/riscv64gc-unknown-linux-gnu/stage2-tools/riscv64gc-unknown-linux-gnu/release/cargo build`
running `/home/jenkins/rust/rust/build/riscv64gc-unknown-linux-gnu/stage2-tools/riscv64gc-unknown-linux-gnu/release/cargo clean`
running `/home/jenkins/rust/rust/build/riscv64gc-unknown-linux-gnu/stage2-tools/riscv64gc-unknown-linux-gnu/release/cargo build 
--verbose -Ztrim-paths --config 'profile.dev.trim-paths="object"'`                                                              
                                                                                                                                
thread 'profile_trim_paths::object_works::with_split_debuginfo_packed' (115881) panicked at src/tools/cargo/tests/testsuite/prof
ile_trim_paths.rs:681:10:                                                                                                       
                                                                                                                                
--- Expected                                                                                                                    ++++ actual:   stderr                                                                                                           
   1    1 | [COMPILING] bar v0.0.1                                                                                                 2      - [RUNNING] `rustc [..]-C split-debuginfo=packed [..]--remap-path-scope=object --remap-path-prefix=[ROOT]/home/.cargo/
registry/src= --remap-path-prefix=[..]/lib/rustlib/src/rust=/rustc/[..]                                                                 2 + [RUNNING] `rustc --crate-name bar --edition=2015 [ROOT]/home/.cargo/registry/src/-[HASH]/bar-0.0.1/src/lib.rs --erro
r-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=400 --crate-type lib --emit=dep-info,
metadata,link -C embed-bitcode=no -C debuginfo=2 --remap-path-scope=object --remap-path-prefix=[ROOT]/home/.cargo/registry/src= 
--remap-path-prefix=[ROOT]/foo/target=/cargo/build-dir --remap-path-prefix=/home/jenkins/rust/rust/build/[HOST_TARGET]/stage1/li
b/rustlib/src/rust=/rustc/unknown --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values())' -C metadata=d1760f1d0491eb
bd -C extra-filename=-77e8666ce9d43413 --out-dir [ROOT]/foo/target/debug/deps -L dependency=[ROOT]/foo/target/debug/deps --cap-l
ints allow`                                                                                                                     
   3    3 | [COMPILING] foo v0.0.1 ([ROOT]/foo)
   4      - [RUNNING] `rustc [..]-C split-debuginfo=packed [..]--remap-path-scope=object --remap-path-prefix=[ROOT]/foo=. --rema
p-path-prefix=[..]/lib/rustlib/src/rust=/rustc/[..]
        4 + [RUNNING] `rustc --crate-name foo --edition=2015 src/main.rs --error-format=json --json=diagnostic-rendered-ansi,art
ifacts,future-incompat --diagnostic-width=400 --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 --remap-p
ath-scope=object --remap-path-prefix=[ROOT]/foo=. --remap-path-prefix=[ROOT]/foo/target=/cargo/build-dir --remap-path-prefix=/ho
me/jenkins/rust/rust/build/[HOST_TARGET]/stage1/lib/rustlib/src/rust=/rustc/unknown --check-cfg 'cfg(docsrs,test)' --check-cfg '
cfg(feature, values())' -C metadata=934160cce5ed7112 -C extra-filename=-3de1ee8c5e007dc7 --out-dir [ROOT]/foo/target/debug/deps 
-L dependency=[ROOT]/foo/target/debug/deps --extern bar=[ROOT]/foo/target/debug/deps/libbar-[HASH].rlib --verbose`
   5    5 | [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s



---- profile_trim_paths::object_works::with_split_debuginfo_packed stdout end ----
---- profile_trim_paths::object_works::with_split_debuginfo_unpacked stdout ----
running `/home/jenkins/rust/rust/build/riscv64gc-unknown-linux-gnu/stage2-tools/riscv64gc-unknown-linux-gnu/release/cargo build`
running `/home/jenkins/rust/rust/build/riscv64gc-unknown-linux-gnu/stage2-tools/riscv64gc-unknown-linux-gnu/release/cargo clean`
running `/home/jenkins/rust/rust/build/riscv64gc-unknown-linux-gnu/stage2-tools/riscv64gc-unknown-linux-gnu/release/cargo build 
--verbose -Ztrim-paths --config 'profile.dev.trim-paths="object"'`
...

Detected by Ruyici.

Steps

I test it by some simple commands also:

jenkins@a18891accb0a:~/rust/rust$ $RUSTC /tmp/test.rs -C debuginfo=2 -C split-debuginfo=packed -o /tmp/test-packed
error: `-Csplit-debuginfo=packed` is unstable on this platform

error: aborting due to 1 previous error

jenkins@a18891accb0a:~/rust/rust$ $RUSTC /tmp/test.rs -C debuginfo=2 -C split-debuginfo=unpacked -o /tmp/test-unpacked
error: `-Csplit-debuginfo=unpacked` is unstable on this platform

error: aborting due to 1 previous error

jenkins@a18891accb0a:~/rust/rust$ $RUSTC /tmp/test.rs -Z unstable-options -C debuginfo=2 -C split-debuginfo=unpacked -o /tmp/test-unpacked
jenkins@a18891accb0a:~/rust/rust$ $RUSTC /tmp/test.rs -Z unstable-options -C debuginfo=2 -C split-debuginfo=unpacked -o /tmp/test-unpacked

Possible Solution(s)

The test should either explicitly enable the required unstable option on platforms where these split-debuginfo modes are unstable, or otherwise account for the target capability.

Or ideal situation to support split-debuginfo on riscv64 ?

Notes

No response

Version

rustc 1.99.0-dev                                                                                                                
binary: rustc                                                                                                                   
commit-hash: unknown                                                                                                            
commit-date: unknown                                                                                                            
host: riscv64gc-unknown-linux-gnu                                                                                               
release: 1.99.0-dev                                                                                                             
LLVM version: 22.1.8

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-testing-cargo-itselfArea: cargo's testsC-bugCategory: bugS-blocked-externalStatus: ❌ blocked on something out of the direct control of the Cargo project, e.g., upstream fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions