diff options
| author | Oneirical <manchot@videotron.ca> | 2024-06-06 14:51:55 -0400 |
|---|---|---|
| committer | Oneirical <manchot@videotron.ca> | 2024-06-18 12:54:55 -0400 |
| commit | 594135ea370085bfd80ce56f7f08b146cb97f3ca (patch) | |
| tree | e8af66c3893924b693e6c9e9dfb0ab6b5f76f7a9 | |
| parent | fa2b6122135ad18640e2e9b47450f50fa873c54a (diff) | |
| download | rust-594135ea370085bfd80ce56f7f08b146cb97f3ca.tar.gz rust-594135ea370085bfd80ce56f7f08b146cb97f3ca.zip | |
Rewrite ls-metadata to rmake
| -rw-r--r-- | src/tools/tidy/src/allowed_run_make_makefiles.txt | 1 | ||||
| -rw-r--r-- | tests/run-make/ls-metadata/Makefile | 8 | ||||
| -rw-r--r-- | tests/run-make/ls-metadata/rmake.rs | 17 |
3 files changed, 17 insertions, 9 deletions
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")); +} |
