Skip to content

Commit

Permalink
Auto merge of #102724 - pcc:scs-fix-test, r=Mark-Simulacrum
Browse files Browse the repository at this point in the history
Fix the sanitizer_scs_attr_check.rs test

The test is failing when targeting aarch64 Android. The intent appears to have been to look for a function attributes comment (or the absence of one) on the line preceding the function declaration. But this isn't quite possible with FileCheck and the test as written was looking for a line with `no_scs` after a line with `scs`, which doesn't appear in the output. Instead, match on the function attributes comment on the line following the demangled function name comment.
  • Loading branch information
bors committed Oct 11, 2022
2 parents 518263d + 5f3a424 commit 3655784
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/test/codegen/sanitizer_scs_attr_check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
#![crate_type = "lib"]
#![feature(no_sanitize)]

// CHECK: ; Function Attrs:{{.*}}shadowcallstack
// CHECK-NEXT: scs
// CHECK: ; sanitizer_scs_attr_check::scs
// CHECK-NEXT: ; Function Attrs:{{.*}}shadowcallstack
pub fn scs() {}

// CHECK: ; sanitizer_scs_attr_check::no_scs
// CHECK-NOT: ; Function Attrs:{{.*}}shadowcallstack
// CHECK-NEXT: no_scs
#[no_sanitize(shadow_call_stack)]
pub fn no_scs() {}

0 comments on commit 3655784

Please sign in to comment.