[llvm] b5516da - [PGO][test] Ensure test input is writeable after copying. (#158356)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 12 13:49:42 PDT 2025
Author: jtstogel
Date: 2025-09-12T15:49:39-05:00
New Revision: b5516dad6e18db91858449bfa96a5e1271568037
URL: https://github.com/llvm/llvm-project/commit/b5516dad6e18db91858449bfa96a5e1271568037
DIFF: https://github.com/llvm/llvm-project/commit/b5516dad6e18db91858449bfa96a5e1271568037.diff
LOG: [PGO][test] Ensure test input is writeable after copying. (#158356)
This test errors when trying to append to the `%t` file when run in an
environment where the source tree is mounted read-only, since `cp`
preserves the read-only file permission.
Added:
Modified:
llvm/test/Verifier/llvm.loop.estimated_trip_count.ll
Removed:
################################################################################
diff --git a/llvm/test/Verifier/llvm.loop.estimated_trip_count.ll b/llvm/test/Verifier/llvm.loop.estimated_trip_count.ll
index 3c0bc8a39ebeb..b1e456f5b0ad6 100644
--- a/llvm/test/Verifier/llvm.loop.estimated_trip_count.ll
+++ b/llvm/test/Verifier/llvm.loop.estimated_trip_count.ll
@@ -26,36 +26,43 @@ exit:
; No value.
; RUN: cp %s %t
+; RUN: chmod u+w %t
; RUN: echo '!1 = !{!"llvm.loop.estimated_trip_count"}' >> %t
; RUN: not %{RUN} TOO-FEW
; i16 value.
; RUN: cp %s %t
+; RUN: chmod u+w %t
; RUN: echo '!1 = !{!"llvm.loop.estimated_trip_count", i16 5}' >> %t
; RUN: %{RUN} GOOD
; i32 value.
; RUN: cp %s %t
+; RUN: chmod u+w %t
; RUN: echo '!1 = !{!"llvm.loop.estimated_trip_count", i32 5}' >> %t
; RUN: %{RUN} GOOD
; i64 value.
; RUN: cp %s %t
+; RUN: chmod u+w %t
; RUN: echo '!1 = !{!"llvm.loop.estimated_trip_count", i64 5}' >> %t
; RUN: not %{RUN} BAD-VALUE
; MDString value.
; RUN: cp %s %t
+; RUN: chmod u+w %t
; RUN: echo '!1 = !{!"llvm.loop.estimated_trip_count", !"5"}' >> %t
; RUN: not %{RUN} BAD-VALUE
; MDNode value.
; RUN: cp %s %t
+; RUN: chmod u+w %t
; RUN: echo '!1 = !{!"llvm.loop.estimated_trip_count", !2}' >> %t
; RUN: echo '!2 = !{i32 5}' >> %t
; RUN: not %{RUN} BAD-VALUE
; Too many values.
; RUN: cp %s %t
+; RUN: chmod u+w %t
; RUN: echo '!1 = !{!"llvm.loop.estimated_trip_count", i32 5, i32 5}' >> %t
; RUN: not %{RUN} TOO-MANY
More information about the llvm-commits
mailing list