Skip to content

Commit 3f77eae

Browse files
authored
Unrolled build for #142301
Rollup merge of #142301 - Gelbpunkt:duplicated-path-in-error-musl, r=workingjubilee,fmease,jieyouxu tests: Fix duplicated-path-in-error fail with musl musl's dlopen returns a different error than glibc, which contains the name of the file. This would cause the test to fail, since the filename would appear twice in the output (once in the error from rustc, once in the error message from musl). Split the expected test outputs for the different libc implementations. Fixes #128474
2 parents a9fb610 + ae1b1b4 commit 3f77eae

File tree

4 files changed

+10
-0
lines changed

4 files changed

+10
-0
lines changed

src/tools/compiletest/src/directives.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -971,6 +971,7 @@ const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
971971
"only-mips64",
972972
"only-msp430",
973973
"only-msvc",
974+
"only-musl",
974975
"only-nightly",
975976
"only-nvptx64",
976977
"only-powerpc",
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
error: couldn't load codegen backend /non-existing-one.so: Error loading shared library /non-existing-one.so: No such file or directory
2+

tests/ui/codegen/duplicated-path-in-error.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
1+
//@ revisions: musl gnu
12
//@ only-linux
3+
//@ ignore-cross-compile because this relies on host libc behaviour
24
//@ compile-flags: -Zcodegen-backend=/non-existing-one.so
5+
//@[gnu] only-gnu
6+
//@[musl] only-musl
37

48
// This test ensures that the error of the "not found dylib" doesn't duplicate
59
// the path of the dylib.
10+
//
11+
// glibc and musl have different dlopen error messages, so the expected error
12+
// message differs between the two.
613

714
fn main() {}
815

0 commit comments

Comments
 (0)