[llvm] 511286d - [Instrumentor][test] Ensure dir is writeable (#196466)

via llvm-commits llvm-commits at lists.llvm.org
Thu May 7 22:17:15 PDT 2026


Author: Jordan Rupprecht
Date: 2026-05-08T05:17:10Z
New Revision: 511286d5cffd612fb1e996dd21d8b18f98b04520

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

LOG: [Instrumentor][test] Ensure dir is writeable (#196466)

When running the test in a runner where the source directory is read
only, this test fails w/ `error: failed to open instrumentor stub
runtime file for writing: Permission denied`. Run the test in a
writeable test dir `%t` to ensure we can actually write to the current
directory.

Added: 
    

Modified: 
    llvm/test/Instrumentation/Instrumentor/generate_rt.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/Instrumentation/Instrumentor/generate_rt.ll b/llvm/test/Instrumentation/Instrumentor/generate_rt.ll
index b879437d79b8a..de6576501a5b5 100644
--- a/llvm/test/Instrumentation/Instrumentor/generate_rt.ll
+++ b/llvm/test/Instrumentation/Instrumentor/generate_rt.ll
@@ -1,2 +1,3 @@
+; RUN: rm -rf %t && mkdir -p %t && cd %t
 ; RUN: opt < %s -passes=instrumentor -instrumentor-read-config-file=%S/rt_config.json -S
 ; RUN: 
diff  -b rt.c %S/default_rt


        


More information about the llvm-commits mailing list