From 2846e7674b74130ec3f1ec01520a443747c50d0d Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Tue, 2 Apr 2024 22:54:22 -0700 Subject: [PATCH] [test] add --implicit-check-not=error and avoid expensive .* regex --- lld/test/ELF/aarch64-reloc-pauth-ro.s | 2 +- lld/test/ELF/aarch64-reloc-pauth.s | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lld/test/ELF/aarch64-reloc-pauth-ro.s b/lld/test/ELF/aarch64-reloc-pauth-ro.s index 5bc9d805b481a7..1be78ba4666e9f 100644 --- a/lld/test/ELF/aarch64-reloc-pauth-ro.s +++ b/lld/test/ELF/aarch64-reloc-pauth-ro.s @@ -3,7 +3,7 @@ # RUN: llvm-mc -filetype=obj -triple=aarch64 %p/Inputs/shared2.s -o %t.so.o # RUN: ld.lld -shared %t.so.o -soname=so -o %t.so # RUN: llvm-mc -filetype=obj -triple=aarch64 %s -o %t.o -# RUN: not ld.lld -pie %t.o %t.so -o %t2 2>&1 | FileCheck -DFILE=%t %s +# RUN: not ld.lld -pie %t.o %t.so -o %t2 2>&1 | FileCheck -DFILE=%t %s --implicit-check-not=error: # CHECK: error: relocation R_AARCH64_AUTH_ABS64 cannot be used against symbol 'zed2'; recompile with -fPIC # CHECK-NEXT: >>> defined in [[FILE]].so diff --git a/lld/test/ELF/aarch64-reloc-pauth.s b/lld/test/ELF/aarch64-reloc-pauth.s index 399dae25817f98..b603d8ffdcabd3 100644 --- a/lld/test/ELF/aarch64-reloc-pauth.s +++ b/lld/test/ELF/aarch64-reloc-pauth.s @@ -43,9 +43,10 @@ # PIE: Section Headers: # PIE-NEXT: Name Type Address Off Size ES Flg Lk Inf Al -# PIE: .rela.dyn RELA {{0*}}[[ADDR1:.*]] {{0*}}[[ADDR1]] 000108 18 A 1 0 8 +# PIE: .rela.dyn RELA {{0*}}[[#%x,ADDR1:]] +# PIE-SAME: {{0*}}[[#ADDR1]] 000108 18 A 1 0 8 -# PIE: Relocation section '.rela.dyn' at offset 0x[[ADDR1]] contains 11 entries: +# PIE: Relocation section '.rela.dyn' at offset 0x[[#ADDR1]] contains 11 entries: # PIE-NEXT: Offset Info Type Symbol's Value Symbol's Name + Addend # PIE-NEXT: 0000000000030470 0000000000000411 R_AARCH64_AUTH_RELATIVE 1 # PIE-NEXT: 0000000000030478 0000000000000411 R_AARCH64_AUTH_RELATIVE 30472