[llvm-branch-commits] [llvm] ba3bc2f - [mac/arm] Deflake 3 check-llvm tests

Nico Weber via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sat Dec 12 18:18:56 PST 2020


Author: Nico Weber
Date: 2020-12-12T21:14:45-05:00
New Revision: ba3bc2fd41b8428904fc779e353d3769074d8982

URL: https://github.com/llvm/llvm-project/commit/ba3bc2fd41b8428904fc779e353d3769074d8982
DIFF: https://github.com/llvm/llvm-project/commit/ba3bc2fd41b8428904fc779e353d3769074d8982.diff

LOG: [mac/arm] Deflake 3 check-llvm tests

On macOS/arm, signature verification has kill semantics by default.
Signature verification is cached with a file's inode (actually, vnode),
and if a new executable is copied over an existing file (which reuses
the inode), the cache isn't invalidated. So when the new executable
is executed, the kernel still has the old content's signature cached
and the kills the executable because the old signatue doesn't match
the new contents (https://openradar.appspot.com/FB8914243).

As workaround, rm the desitnation files first, to ensure they have
a fresh vnode (and hence no stale cached signature) after the copy.

Part of PR46647. See also e0e334a9c1ac for a similar change.

Added: 
    

Modified: 
    llvm/test/tools/llvm-isel-fuzzer/aarch64-execname-options.ll
    llvm/test/tools/llvm-isel-fuzzer/execname-options.ll
    llvm/test/tools/llvm-opt-fuzzer/exec-options.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/tools/llvm-isel-fuzzer/aarch64-execname-options.ll b/llvm/test/tools/llvm-isel-fuzzer/aarch64-execname-options.ll
index 2cab8c747999..a4a8f9737715 100644
--- a/llvm/test/tools/llvm-isel-fuzzer/aarch64-execname-options.ll
+++ b/llvm/test/tools/llvm-isel-fuzzer/aarch64-execname-options.ll
@@ -8,6 +8,11 @@
 
 ; RUN: echo > %t.input
 
+; workaround for https://openradar.appspot.com/FB8914243
+; RUN: rm -f %t.bin--aarch64
+; RUN: rm -f %t.bin--aarch64-O1
+; RUN: rm -f %t.bin--O3-aarch64
+
 ; RUN: cp llvm-isel-fuzzer %t.bin--aarch64
 ; RUN: %t.bin--aarch64 %t.input 2>&1 | FileCheck -check-prefix=AARCH64 %s
 ; AARCH64: Injected args: -mtriple=aarch64

diff  --git a/llvm/test/tools/llvm-isel-fuzzer/execname-options.ll b/llvm/test/tools/llvm-isel-fuzzer/execname-options.ll
index dfce73ed2e24..3dc9892fdc4d 100644
--- a/llvm/test/tools/llvm-isel-fuzzer/execname-options.ll
+++ b/llvm/test/tools/llvm-isel-fuzzer/execname-options.ll
@@ -7,6 +7,11 @@
 
 ; RUN: echo > %t.input
 
+; workaround for https://openradar.appspot.com/FB8914243
+; RUN: rm -f %t.bin--gisel
+; RUN: rm -f %t.bin--gisel-O2
+; RUN: rm -f %t.bin--unexist
+
 ; RUN: cp llvm-isel-fuzzer %t.bin--gisel
 ; RUN: not %t.bin--gisel %t.input 2>&1 | FileCheck -check-prefix=GISEL %s
 ; GISEL: Injected args: -global-isel -O0

diff  --git a/llvm/test/tools/llvm-opt-fuzzer/exec-options.ll b/llvm/test/tools/llvm-opt-fuzzer/exec-options.ll
index 1dd0fa5c46b7..ab2f1d1f349a 100644
--- a/llvm/test/tools/llvm-opt-fuzzer/exec-options.ll
+++ b/llvm/test/tools/llvm-opt-fuzzer/exec-options.ll
@@ -15,6 +15,12 @@
 ; Temporary bitcode file
 ; RUN: opt -o %t.input %s
 
+; workaround for https://openradar.appspot.com/FB8914243
+; RUN: rm -f %t.bin--
+; RUN: rm -f %t.bin--x86_64
+; RUN: rm -f %t.bin--x86_64-unknown
+; RUN: rm -f %t.bin--x86_64-instcombine
+
 ; RUN: cp llvm-opt-fuzzer %t.bin--
 ; RUN: not %t.bin-- %t.input 2>&1 | FileCheck -check-prefix=EMPTY %s
 ; EMPTY: -mtriple must be specified


        


More information about the llvm-branch-commits mailing list