[lld] 71c83fb - [LLD] Improve the lit tests added by 272bd6f9cc86bf6b4dd6bd51e85c46db10e8b86a

Haojian Wu via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 19 04:47:40 PDT 2023


Author: Haojian Wu
Date: 2023-09-19T13:47:08+02:00
New Revision: 71c83fb8b618b4ed5142e62572ba73d5721dc828

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

LOG: [LLD] Improve the lit tests added by 272bd6f9cc86bf6b4dd6bd51e85c46db10e8b86a

The `cp` command will copy the permission bits from the original file to
the new one, which will cause permission denied (no written access) for the
following "echo" command in some system.

Switch to use `cat` which is more robust.

Added: 
    

Modified: 
    lld/test/ELF/lto/devirt_validate_vtable_typeinfos.ll
    lld/test/ELF/lto/devirt_validate_vtable_typeinfos_no_rtti.ll
    lld/test/ELF/lto/devirt_validate_vtable_typeinfos_ref.ll

Removed: 
    


################################################################################
diff  --git a/lld/test/ELF/lto/devirt_validate_vtable_typeinfos.ll b/lld/test/ELF/lto/devirt_validate_vtable_typeinfos.ll
index d6ac53f9fb936b0..74e437747df3b8b 100644
--- a/lld/test/ELF/lto/devirt_validate_vtable_typeinfos.ll
+++ b/lld/test/ELF/lto/devirt_validate_vtable_typeinfos.ll
@@ -3,7 +3,7 @@
 ;; Common artifacts
 ; RUN: opt --thinlto-bc -o %t1.o %s
 ; RUN: opt --thinlto-bc --thinlto-split-lto-unit -o %t1_hybrid.o %s
-; RUN: cp %s %t1_regular.ll
+; RUN: cat %s > %t1_regular.ll
 ; RUN: echo '!llvm.module.flags = !{!12, !13}' >> %t1_regular.ll
 ; RUN: echo '!12 = !{i32 1, !"ThinLTO", i32 0}' >> %t1_regular.ll
 ; RUN: echo '!13 = !{i32 1, !"EnableSplitLTOUnit", i32 1}' >> %t1_regular.ll

diff  --git a/lld/test/ELF/lto/devirt_validate_vtable_typeinfos_no_rtti.ll b/lld/test/ELF/lto/devirt_validate_vtable_typeinfos_no_rtti.ll
index 30bd75606f7d2d0..3f3ea2cc5a3755e 100644
--- a/lld/test/ELF/lto/devirt_validate_vtable_typeinfos_no_rtti.ll
+++ b/lld/test/ELF/lto/devirt_validate_vtable_typeinfos_no_rtti.ll
@@ -3,7 +3,7 @@
 ;; Common artifacts
 ; RUN: opt --thinlto-bc -o %t1.o %s
 ; RUN: opt --thinlto-bc --thinlto-split-lto-unit -o %t1_hybrid.o %s
-; RUN: cp %s %t1_regular.ll
+; RUN: cat %s > %t1_regular.ll
 ; RUN: echo '!llvm.module.flags = !{!6, !7}' >> %t1_regular.ll
 ; RUN: echo '!6 = !{i32 1, !"ThinLTO", i32 0}' >> %t1_regular.ll
 ; RUN: echo '!7 = !{i32 1, !"EnableSplitLTOUnit", i32 1}' >> %t1_regular.ll

diff  --git a/lld/test/ELF/lto/devirt_validate_vtable_typeinfos_ref.ll b/lld/test/ELF/lto/devirt_validate_vtable_typeinfos_ref.ll
index 4ef048d6b6c601b..2318af4b16ab46e 100644
--- a/lld/test/ELF/lto/devirt_validate_vtable_typeinfos_ref.ll
+++ b/lld/test/ELF/lto/devirt_validate_vtable_typeinfos_ref.ll
@@ -3,7 +3,7 @@
 ;; Common artifacts
 ; RUN: opt --thinlto-bc -o %t1.o %s
 ; RUN: opt --thinlto-bc --thinlto-split-lto-unit -o %t1_hybrid.o %s
-; RUN: cp %s %t1_regular.ll
+; RUN: cat %s > %t1_regular.ll
 ; RUN: echo '!llvm.module.flags = !{!2, !3}' >> %t1_regular.ll
 ; RUN: echo '!2 = !{i32 1, !"ThinLTO", i32 0}' >> %t1_regular.ll
 ; RUN: echo '!3 = !{i32 1, !"EnableSplitLTOUnit", i32 1}' >> %t1_regular.ll


        


More information about the llvm-commits mailing list