Skip to content

Commit 21d3790

Browse files
committed
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. Signed-off-by: Jens Reidel <adrian@travitia.xyz>
1 parent 100199c commit 21d3790

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed
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: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
//@ revisions: musl gnu
12
//@ only-linux
23
//@ compile-flags: -Zcodegen-backend=/non-existing-one.so
4+
//@[gnu] only-gnu
5+
//@[musl] only-musl
36

47
// This test ensures that the error of the "not found dylib" doesn't duplicate
58
// the path of the dylib.

0 commit comments

Comments
 (0)