[lld] 39f3f7c - [ELF][test] Fix several LLD ICF tests
Andrew Ng via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 4 03:11:29 PDT 2021
Author: Andrew Ng
Date: 2021-10-04T11:10:10+01:00
New Revision: 39f3f7c08fb6a2cab8a65f20cb6428754ee577bb
URL: https://github.com/llvm/llvm-project/commit/39f3f7c08fb6a2cab8a65f20cb6428754ee577bb
DIFF: https://github.com/llvm/llvm-project/commit/39f3f7c08fb6a2cab8a65f20cb6428754ee577bb.diff
LOG: [ELF][test] Fix several LLD ICF tests
A number of the ICF tests were not updated to use --print-icf-sections
instead of --verbose and various '-NOT' checks were not updated to the
latest output format of --print-icf-sections. Because these are all
'negative' tests, these issues have gone unnoticed.
Differential Revision: https://reviews.llvm.org/D110353
Added:
Modified:
lld/test/ELF/icf-non-mergeable.s
lld/test/ELF/icf-none.s
lld/test/ELF/icf3.s
lld/test/ELF/icf4.s
lld/test/ELF/icf5.s
lld/test/ELF/icf6.s
Removed:
################################################################################
diff --git a/lld/test/ELF/icf-non-mergeable.s b/lld/test/ELF/icf-non-mergeable.s
index 978ac156b70e0..2e3cbe8e04bce 100644
--- a/lld/test/ELF/icf-non-mergeable.s
+++ b/lld/test/ELF/icf-non-mergeable.s
@@ -8,10 +8,7 @@
// RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux \
// RUN: %p/Inputs/icf-non-mergeable.s -o %t2
-// RUN: ld.lld %t1 %t2 -o /dev/null --icf=all --verbose 2>&1 | FileCheck %s
-
-// CHECK-NOT: selected section '.text.f1'
-// CHECK-NOT: removing identical section '.text.f2'
+// RUN: ld.lld %t1 %t2 -o /dev/null --icf=all --print-icf-sections | count 0
.globl _start, f1, f2, d1, d2
_start:
diff --git a/lld/test/ELF/icf-none.s b/lld/test/ELF/icf-none.s
index 7c73361c2ce3b..86f6a38e596f0 100644
--- a/lld/test/ELF/icf-none.s
+++ b/lld/test/ELF/icf-none.s
@@ -1,9 +1,7 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
-# RUN: ld.lld %t -o /dev/null --icf=all --icf=none --verbose 2>&1 | FileCheck %s
-
-# CHECK-NOT: selected section '.text.f1'
+# RUN: ld.lld %t -o /dev/null --icf=all --icf=none --print-icf-sections | count 0
.globl _start, f1, f2
_start:
diff --git a/lld/test/ELF/icf3.s b/lld/test/ELF/icf3.s
index 7ae4acfb131c9..3636dee87bcf6 100644
--- a/lld/test/ELF/icf3.s
+++ b/lld/test/ELF/icf3.s
@@ -2,10 +2,7 @@
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/icf2.s -o %t2
-# RUN: ld.lld %t1 %t2 -o /dev/null --icf=all --print-icf-sections 2>&1 | FileCheck -allow-empty %s
-
-# CHECK-NOT: selected section '.text.f1' from file
-# CHECK-NOT: selected section '.text.f2' from file
+# RUN: ld.lld %t1 %t2 -o /dev/null --icf=all --print-icf-sections | count 0
.globl _start, f1, f2
_start:
diff --git a/lld/test/ELF/icf4.s b/lld/test/ELF/icf4.s
index 2b047968181cd..ff13a7ebff3da 100644
--- a/lld/test/ELF/icf4.s
+++ b/lld/test/ELF/icf4.s
@@ -1,10 +1,7 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
-# RUN: ld.lld %t -o /dev/null --icf=all --print-icf-sections 2>&1 | FileCheck -allow-empty %s
-
-# CHECK-NOT: selected section '.text.f1'
-# CHECK-NOT: selected section '.text.f2'
+# RUN: ld.lld %t -o /dev/null --icf=all --print-icf-sections | count 0
.globl _start, f1, f2
_start:
diff --git a/lld/test/ELF/icf5.s b/lld/test/ELF/icf5.s
index 86c0bc4b9e401..068ed7f08102e 100644
--- a/lld/test/ELF/icf5.s
+++ b/lld/test/ELF/icf5.s
@@ -1,10 +1,7 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
-# RUN: ld.lld %t -o /dev/null --icf=all --print-icf-sections 2>&1 | FileCheck -allow-empty %s
-
-# CHECK-NOT: selected section '.text.f1'
-# CHECK-NOT: selected section '.text.f2'
+# RUN: ld.lld %t -o /dev/null --icf=all --print-icf-sections | count 0
.globl _start, f1, f2
_start:
diff --git a/lld/test/ELF/icf6.s b/lld/test/ELF/icf6.s
index 0819d51f18447..f01657e2f38b0 100644
--- a/lld/test/ELF/icf6.s
+++ b/lld/test/ELF/icf6.s
@@ -1,10 +1,7 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
-# RUN: ld.lld %t -o /dev/null --icf=all --print-icf-sections 2>&1 | FileCheck -allow-empty %s
-
-# CHECK-NOT: selected section '.text.f1'
-# CHECK-NOT: selected section '.text.f2'
+# RUN: ld.lld %t -o /dev/null --icf=all --print-icf-sections | count 0
.globl _start, f1, f2
_start:
More information about the llvm-commits
mailing list