Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate and rename issue-47551, issue-35164 and issue-69368 run-make tests to rmake #127624

Merged
merged 3 commits into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/tools/compiletest/src/command-list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
"ignore-watchos",
"ignore-windows",
"ignore-windows-gnu",
"ignore-windows-msvc",
"ignore-x32",
"ignore-x86",
"ignore-x86_64",
Expand Down
2 changes: 1 addition & 1 deletion src/tools/run-make-support/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ impl CompletedProcess {
/// Checks that `stderr` does not contain `unexpected`.
#[track_caller]
pub fn assert_stderr_not_contains<S: AsRef<str>>(&self, unexpected: S) -> &Self {
assert_not_contains(&self.stdout_utf8(), unexpected);
assert_not_contains(&self.stderr_utf8(), unexpected);
jieyouxu marked this conversation as resolved.
Show resolved Hide resolved
self
}

Expand Down
3 changes: 0 additions & 3 deletions src/tools/tidy/src/allowed_run_make_makefiles.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@ run-make/foreign-double-unwind/Makefile
run-make/foreign-exceptions/Makefile
run-make/foreign-rust-exceptions/Makefile
run-make/incr-add-rust-src-component/Makefile
run-make/issue-35164/Makefile
run-make/issue-36710/Makefile
run-make/issue-47551/Makefile
run-make/issue-69368/Makefile
run-make/issue-84395-lto-embed-bitcode/Makefile
run-make/issue-88756-default-output/Makefile
run-make/jobserver-error/Makefile
Expand Down
20 changes: 20 additions & 0 deletions tests/run-make/crate-circular-deps-link/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Test that previously triggered a linker failure with root cause
// similar to one found in the issue #69368.
//
// The crate that provides oom lang item is missing some other lang
// items. Necessary to prevent the use of start-group / end-group.
//
// The weak lang items are defined in a separate compilation units,
// so that linker could omit them if not used.
//
// The crates that need those weak lang items are dependencies of
// crates that provide them.
// See https://github.com/rust-lang/rust/issues/69371

use run_make_support::rustc;

fn main() {
rustc().input("a.rs").run();
rustc().input("b.rs").run();
rustc().input("c.rs").run();
}
4 changes: 0 additions & 4 deletions tests/run-make/issue-35164/Makefile

This file was deleted.

10 changes: 0 additions & 10 deletions tests/run-make/issue-47551/Makefile

This file was deleted.

19 changes: 0 additions & 19 deletions tests/run-make/issue-69368/Makefile

This file was deleted.

15 changes: 15 additions & 0 deletions tests/run-make/json-error-no-offset/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// The byte positions in json format error logging used to have a small, difficult
// to predict offset. This was changed to be the top of the file every time in #42973,
// and this test checks that the measurements appearing in the standard error are correct.
// See https://github.com/rust-lang/rust/issues/35164

use run_make_support::rustc;

fn main() {
rustc()
.input("main.rs")
.error_format("json")
.run()
.assert_stderr_contains(r#""byte_start":23"#)
.assert_stderr_contains(r#""byte_end":29"#);
}
23 changes: 23 additions & 0 deletions tests/run-make/link-eh-frame-terminator/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// The gcc driver is supposed to add a terminator to link files, and the rustc
// driver previously failed to do this, resulting in a segmentation fault
// with an older version of LLVM. This test checks that the terminator is present
// after the fix in #85395.
// See https://github.com/rust-lang/rust/issues/47551

//@ only-linux
// Reason: the ZERO terminator is unique to the Linux architecture.
//@ ignore-32bit
// Reason: the usage of a large array in the test causes an out-of-memory
// error on 32 bit systems.

use run_make_support::{bin_name, llvm_objdump, run, rustc};

fn main() {
rustc().input("eh_frame-terminator.rs").run();
run("eh_frame-terminator").assert_stdout_contains("1122334455667788");
llvm_objdump()
.arg("--dwarf=frames")
.input(bin_name("eh_frame-terminator"))
.run()
.assert_stdout_contains("ZERO terminator");
}
Loading