Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b5516da

Browse files
authored
[PGO][test] Ensure test input is writeable after copying. (llvm#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.
1 parent e1efb51 commit b5516da

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

llvm/test/Verifier/llvm.loop.estimated_trip_count.ll

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,36 +26,43 @@ exit:
2626

2727
; No value.
2828
; RUN: cp %s %t
29+
; RUN: chmod u+w %t
2930
; RUN: echo '!1 = !{!"llvm.loop.estimated_trip_count"}' >> %t
3031
; RUN: not %{RUN} TOO-FEW
3132

3233
; i16 value.
3334
; RUN: cp %s %t
35+
; RUN: chmod u+w %t
3436
; RUN: echo '!1 = !{!"llvm.loop.estimated_trip_count", i16 5}' >> %t
3537
; RUN: %{RUN} GOOD
3638

3739
; i32 value.
3840
; RUN: cp %s %t
41+
; RUN: chmod u+w %t
3942
; RUN: echo '!1 = !{!"llvm.loop.estimated_trip_count", i32 5}' >> %t
4043
; RUN: %{RUN} GOOD
4144

4245
; i64 value.
4346
; RUN: cp %s %t
47+
; RUN: chmod u+w %t
4448
; RUN: echo '!1 = !{!"llvm.loop.estimated_trip_count", i64 5}' >> %t
4549
; RUN: not %{RUN} BAD-VALUE
4650

4751
; MDString value.
4852
; RUN: cp %s %t
53+
; RUN: chmod u+w %t
4954
; RUN: echo '!1 = !{!"llvm.loop.estimated_trip_count", !"5"}' >> %t
5055
; RUN: not %{RUN} BAD-VALUE
5156

5257
; MDNode value.
5358
; RUN: cp %s %t
59+
; RUN: chmod u+w %t
5460
; RUN: echo '!1 = !{!"llvm.loop.estimated_trip_count", !2}' >> %t
5561
; RUN: echo '!2 = !{i32 5}' >> %t
5662
; RUN: not %{RUN} BAD-VALUE
5763

5864
; Too many values.
5965
; RUN: cp %s %t
66+
; RUN: chmod u+w %t
6067
; RUN: echo '!1 = !{!"llvm.loop.estimated_trip_count", i32 5, i32 5}' >> %t
6168
; RUN: not %{RUN} TOO-MANY

0 commit comments

Comments
 (0)