Skip to content

Commit 93586fc

Browse files
authored
Unrolled build for rust-lang#136004
Rollup merge of rust-lang#136004 - mrkajetanp:aarch64-skip-large-const-alloc-tests, r=Kobzol tests: Skip const OOM tests on aarch64-unknown-linux-gnu Skip const OOM tests on AArch64 Linux through explicit annotations instead of inside opt-dist. Intended to avoid confusion in cases like rust-lang#135952. Prerequisite for rust-lang#135960. r? `@Kobzol` cc `@workingjubilee` try-job: dist-aarch64-linux
2 parents a730edc + b7916fb commit 93586fc

5 files changed

+8
-14
lines changed

src/tools/opt-dist/src/main.rs

+1-11
Original file line numberDiff line numberDiff line change
@@ -148,16 +148,6 @@ fn create_environment(args: Args) -> anyhow::Result<(Environment, Vec<String>)>
148148

149149
let is_aarch64 = target_triple.starts_with("aarch64");
150150

151-
let skip_tests = if is_aarch64 {
152-
vec![
153-
// Those tests fail only inside of Docker on aarch64, as of December 2024
154-
"tests/ui/consts/promoted_running_out_of_memory_issue-130687.rs".to_string(),
155-
"tests/ui/consts/large_const_alloc.rs".to_string(),
156-
]
157-
} else {
158-
vec![]
159-
};
160-
161151
let checkout_dir = Utf8PathBuf::from("/checkout");
162152
let env = EnvironmentBuilder::default()
163153
.host_tuple(target_triple)
@@ -169,7 +159,7 @@ fn create_environment(args: Args) -> anyhow::Result<(Environment, Vec<String>)>
169159
.shared_llvm(true)
170160
// FIXME: Enable bolt for aarch64 once it's fixed upstream. Broken as of December 2024.
171161
.use_bolt(!is_aarch64)
172-
.skipped_tests(skip_tests)
162+
.skipped_tests(vec![])
173163
.build()?;
174164

175165
(env, shared.build_args)

tests/ui/consts/large_const_alloc.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
//@ only-64bit
22
// on 32bit and 16bit platforms it is plausible that the maximum allocation size will succeed
3+
// FIXME (#135952) In some cases on AArch64 Linux the diagnostic does not trigger
4+
//@ ignore-aarch64-unknown-linux-gnu
35

46
const FOO: () = {
57
// 128 TiB, unlikely anyone has that much RAM

tests/ui/consts/large_const_alloc.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error[E0080]: evaluation of constant value failed
2-
--> $DIR/large_const_alloc.rs:6:13
2+
--> $DIR/large_const_alloc.rs:8:13
33
|
44
LL | let x = [0_u8; (1 << 47) - 1];
55
| ^^^^^^^^^^^^^^^^^^^^^ tried to allocate more memory than available to compiler
66

77
error[E0080]: could not evaluate static initializer
8-
--> $DIR/large_const_alloc.rs:11:13
8+
--> $DIR/large_const_alloc.rs:13:13
99
|
1010
LL | let x = [0_u8; (1 << 47) - 1];
1111
| ^^^^^^^^^^^^^^^^^^^^^ tried to allocate more memory than available to compiler

tests/ui/consts/promoted_running_out_of_memory_issue-130687.rs

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
44
// Needs the max type size to be much bigger than the RAM people typically have.
55
//@ only-64bit
6+
// FIXME (#135952) In some cases on AArch64 Linux the diagnostic does not trigger
7+
//@ ignore-aarch64-unknown-linux-gnu
68

79
pub struct Data([u8; (1 << 47) - 1]);
810
const _: &'static Data = &Data([0; (1 << 47) - 1]);

tests/ui/consts/promoted_running_out_of_memory_issue-130687.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0080]: evaluation of constant value failed
2-
--> $DIR/promoted_running_out_of_memory_issue-130687.rs:8:32
2+
--> $DIR/promoted_running_out_of_memory_issue-130687.rs:10:32
33
|
44
LL | const _: &'static Data = &Data([0; (1 << 47) - 1]);
55
| ^^^^^^^^^^^^^^^^^^ tried to allocate more memory than available to compiler

0 commit comments

Comments
 (0)