Skip to content

Commit 6bcb830

Browse files
authored
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 78ac8eb + cf02667 commit 6bcb830

5 files changed

+8
-12
lines changed

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

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

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

151-
let mut skip_tests = vec![
151+
let skip_tests = vec![
152152
// Fails because of linker errors, as of June 2023.
153153
"tests/ui/process/nofile-limit.rs".to_string(),
154154
];
155155

156-
if is_aarch64 {
157-
skip_tests.extend([
158-
// Those tests fail only inside of Docker on aarch64, as of December 2024
159-
"tests/ui/consts/promoted_running_out_of_memory_issue-130687.rs".to_string(),
160-
"tests/ui/consts/large_const_alloc.rs".to_string(),
161-
]);
162-
}
163-
164156
let checkout_dir = Utf8PathBuf::from("/checkout");
165157
let env = EnvironmentBuilder::default()
166158
.host_tuple(target_triple)

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)