Skip to content

Commit 5e6ea24

Browse files
committedMay 15, 2019
[lld] Remove 2>&1 from --trace-symbol tests
The tracing goes to stdout so this is not needed. Also remove the "not" from the final check in ELF/trace-symbols.s. According the comment the check is that we don't crash, so we should be checking for success here. Previously this step is error'ing with undefined symbols because it didn't include all the needed objects. Differential Revision: https://reviews.llvm.org/D61928 llvm-svn: 360794
1 parent 07c7257 commit 5e6ea24

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed
 

‎lld/test/ELF/trace-symbols.s

+11-11
Original file line numberDiff line numberDiff line change
@@ -14,46 +14,46 @@
1414
# RUN: llvm-ar rcs %t2.a %t2
1515

1616
# RUN: ld.lld -y foo -trace-symbol common -trace-symbol=hsymbol \
17-
# RUN: %t %t1 %t2 -o %t3 2>&1 | FileCheck -check-prefix=OBJECTRFOO %s
17+
# RUN: %t %t1 %t2 -o %t3 | FileCheck -check-prefix=OBJECTRFOO %s
1818
# OBJECTRFOO: trace-symbols.s.tmp: reference to foo
1919

2020
# RUN: ld.lld -y foo -trace-symbol=common -trace-symbol=hsymbol \
21-
# RUN: %t %t1 %t2 -o %t3 2>&1 | FileCheck -check-prefix=OBJECTDCOMMON %s
21+
# RUN: %t %t1 %t2 -o %t3 | FileCheck -check-prefix=OBJECTDCOMMON %s
2222
# OBJECTDCOMMON: trace-symbols.s.tmp1: common definition of common
2323

2424
# RUN: ld.lld -y foo -trace-symbol=common -trace-symbol=hsymbol \
25-
# RUN: %t %t1 %t2 -o %t3 2>&1 | FileCheck -check-prefix=OBJECTD1FOO %s
25+
# RUN: %t %t1 %t2 -o %t3 | FileCheck -check-prefix=OBJECTD1FOO %s
2626
# OBJECTD1FOO: trace-symbols.s.tmp: reference to foo
2727
# OBJECTD1FOO: trace-symbols.s.tmp1: common definition of common
2828
# OBJECTD1FOO: trace-symbols.s.tmp1: definition of foo
2929
# OBJECTD1FOO: trace-symbols.s.tmp2: definition of foo
3030

3131
# RUN: ld.lld -y foo -trace-symbol=common -trace-symbol=hsymbol \
32-
# RUN: %t %t1 %t2 -o %t3 2>&1 | FileCheck -check-prefix=OBJECTD2FOO %s
32+
# RUN: %t %t1 %t2 -o %t3 | FileCheck -check-prefix=OBJECTD2FOO %s
3333
# RUN: ld.lld -y foo -y common --trace-symbol=hsymbol \
34-
# RUN: %t %t2 %t1 -o /dev/null 2>&1 | FileCheck -check-prefix=OBJECTD2FOO %s
35-
# RUN: ld.lld -y foo -y common %t %t1.so %t2 -o %t3 2>&1 | \
34+
# RUN: %t %t2 %t1 -o /dev/null | FileCheck -check-prefix=OBJECTD2FOO %s
35+
# RUN: ld.lld -y foo -y common %t %t1.so %t2 -o %t3 | \
3636
# RUN: FileCheck -check-prefix=OBJECTD2FOO %s
3737
# OBJECTD2FOO: trace-symbols.s.tmp2: definition of foo
3838

39-
# RUN: ld.lld -y foo -y common %t %t2 %t1.a -o %t3 2>&1 | \
39+
# RUN: ld.lld -y foo -y common %t %t2 %t1.a -o %t3 | \
4040
# RUN: FileCheck -check-prefix=FOO_AND_COMMON %s
4141
# FOO_AND_COMMON: trace-symbols.s.tmp: reference to foo
4242
# FOO_AND_COMMON: trace-symbols.s.tmp2: definition of foo
4343
# FOO_AND_COMMON: trace-symbols.s.tmp1.a: lazy definition of common
4444

45-
# RUN: ld.lld -y foo -y common %t %t1.so %t2 -o %t3 2>&1 | \
45+
# RUN: ld.lld -y foo -y common %t %t1.so %t2 -o %t3 | \
4646
# RUN: FileCheck -check-prefix=SHLIBDCOMMON %s
4747
# SHLIBDCOMMON: trace-symbols.s.tmp1.so: shared definition of common
4848

49-
# RUN: ld.lld -y foo -y common %t %t2.so %t1.so -o %t3 2>&1 | \
49+
# RUN: ld.lld -y foo -y common %t %t2.so %t1.so -o %t3 | \
5050
# RUN: FileCheck -check-prefix=SHLIBD2FOO %s
5151
# RUN: ld.lld -y foo %t %t1.a %t2.so -o %t3 | \
5252
# RUN: FileCheck -check-prefix=NO-SHLIBD2FOO %s
5353
# SHLIBD2FOO: trace-symbols.s.tmp2.so: shared definition of foo
5454
# NO-SHLIBD2FOO-NOT: trace-symbols.s.tmp2.so: definition of foo
5555

56-
# RUN: ld.lld -y foo -y common %t %t2 %t1.a -o %t3 2>&1 | \
56+
# RUN: ld.lld -y foo -y common %t %t2 %t1.a -o %t3 | \
5757
# RUN: FileCheck -check-prefix=ARCHIVEDCOMMON %s
5858
# ARCHIVEDCOMMON-NOT: trace-symbols.s.tmp1.a(trace-symbols.s.tmp1): definition of \
5959
# common
@@ -79,7 +79,7 @@
7979
# STARTLIB: trace-symbols.s.tmp1: reference to bar
8080

8181
## Check we do not crash when trying to trace special symbol.
82-
# RUN: not ld.lld -trace-symbol=_end %t -o /dev/null
82+
# RUN: ld.lld -trace-symbol=_end %t %t1 %t2 -o /dev/null
8383

8484
.hidden hsymbol
8585
.globl _start

‎lld/test/wasm/trace-symbol.ll

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
; RUN: llc -filetype=obj %p/Inputs/ret32.ll -o %t.ret32.o
22
; RUN: llc -filetype=obj -o %t.o %s
3-
; RUN: wasm-ld -o %t.wasm %t.o %t.ret32.o -y ret32 -y _start 2>&1 | FileCheck %s -check-prefix=BOTH
3+
; RUN: wasm-ld -o %t.wasm %t.o %t.ret32.o -y ret32 -y _start | FileCheck %s -check-prefix=BOTH
44

55
; check alias
6-
; RUN: wasm-ld -o %t.wasm %t.o %t.ret32.o -trace-symbol=_start 2>&1 | FileCheck %s -check-prefixes=JUST-START
6+
; RUN: wasm-ld -o %t.wasm %t.o %t.ret32.o -trace-symbol=_start | FileCheck %s -check-prefixes=JUST-START
77

88
target triple = "wasm32-unknown-unknown"
99

0 commit comments

Comments
 (0)
Please sign in to comment.