diff --git a/src/tools/tidy/src/allowed_run_make_makefiles.txt b/src/tools/tidy/src/allowed_run_make_makefiles.txt index feb31e25e5f..57bb326ac95 100644 --- a/src/tools/tidy/src/allowed_run_make_makefiles.txt +++ b/src/tools/tidy/src/allowed_run_make_makefiles.txt @@ -108,7 +108,6 @@ run-make/llvm-ident/Makefile run-make/long-linker-command-lines-cmd-exe/Makefile run-make/long-linker-command-lines/Makefile run-make/longjmp-across-rust/Makefile -run-make/ls-metadata/Makefile run-make/lto-dylib-dep/Makefile run-make/lto-empty/Makefile run-make/lto-linkage-used-attr/Makefile diff --git a/tests/run-make/ls-metadata/Makefile b/tests/run-make/ls-metadata/Makefile deleted file mode 100644 index f03569baef7..00000000000 --- a/tests/run-make/ls-metadata/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -# ignore-cross-compile -include ../tools.mk - -all: - $(RUSTC) foo.rs - $(RUSTC) -Z ls=root $(TMPDIR)/foo - touch $(TMPDIR)/bar - $(RUSTC) -Z ls=root $(TMPDIR)/bar diff --git a/tests/run-make/ls-metadata/rmake.rs b/tests/run-make/ls-metadata/rmake.rs new file mode 100644 index 00000000000..61dcd3774a1 --- /dev/null +++ b/tests/run-make/ls-metadata/rmake.rs @@ -0,0 +1,17 @@ +// Passing invalid files to -Z ls (which lists the symbols +// defined by a library crate) used to cause a segmentation fault. +// As this was fixed in #11262, this test checks that no segfault +// occurs when passing the invalid file `bar` to -Z ls. +// See https://github.com/rust-lang/rust/issues/11259 + +//@ ignore-cross-compile + +use run_make_support::fs_wrapper; +use run_make_support::{rmake_out_path, rustc}; + +fn main() { + rustc().input("foo.rs"); + rustc().arg("-Zls=root").input(rmake_out_path("foo")); + fs_wrapper::create_file(rmake_out_path("bar")); + rustc().arg("-Zls=root").input(rmake_out_path("bar")); +}