Skip to content

Commit a5b8780

Browse files
committed
Auto merge of #136004 - mrkajetanp:aarch64-skip-large-const-alloc-tests, r=<try>
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 #135952. Prerequisite for #135960. r? `@Kobzol` cc `@workingjubilee` try-job: dist-aarch64-linux
2 parents 8231e85 + dde618b commit a5b8780

File tree

6 files changed

+9
-13
lines changed

6 files changed

+9
-13
lines changed

src/ci/github-actions/jobs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ envs:
8787
# - not running `opt-dist`'s post-optimization smoke tests on the resulting toolchain
8888
#
8989
# If you *want* these to happen however, temporarily uncomment it before triggering a try build.
90-
DIST_TRY_BUILD: 1
90+
# DIST_TRY_BUILD: 1
9191

9292
auto:
9393
<<: *production

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)