[lld] r360794 - [lld] Remove 2>&1 from --trace-symbol tests

Sam Clegg via llvm-commits llvm-commits at lists.llvm.org
Wed May 15 12:01:52 PDT 2019


Author: sbc
Date: Wed May 15 12:01:51 2019
New Revision: 360794

URL: http://llvm.org/viewvc/llvm-project?rev=360794&view=rev
Log:
[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

Modified:
    lld/trunk/test/ELF/trace-symbols.s
    lld/trunk/test/wasm/trace-symbol.ll

Modified: lld/trunk/test/ELF/trace-symbols.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/trace-symbols.s?rev=360794&r1=360793&r2=360794&view=diff
==============================================================================
--- lld/trunk/test/ELF/trace-symbols.s (original)
+++ lld/trunk/test/ELF/trace-symbols.s Wed May 15 12:01:51 2019
@@ -14,46 +14,46 @@
 # RUN: llvm-ar rcs %t2.a %t2
 
 # RUN: ld.lld -y foo -trace-symbol common -trace-symbol=hsymbol \
-# RUN:   %t %t1 %t2 -o %t3 2>&1 | FileCheck -check-prefix=OBJECTRFOO %s
+# RUN:   %t %t1 %t2 -o %t3 | FileCheck -check-prefix=OBJECTRFOO %s
 # OBJECTRFOO: trace-symbols.s.tmp: reference to foo
 
 # RUN: ld.lld -y foo -trace-symbol=common -trace-symbol=hsymbol \
-# RUN:   %t %t1 %t2 -o %t3 2>&1 | FileCheck -check-prefix=OBJECTDCOMMON %s
+# RUN:   %t %t1 %t2 -o %t3 | FileCheck -check-prefix=OBJECTDCOMMON %s
 # OBJECTDCOMMON: trace-symbols.s.tmp1: common definition of common
 
 # RUN: ld.lld -y foo -trace-symbol=common -trace-symbol=hsymbol \
-# RUN:   %t %t1 %t2 -o %t3 2>&1 | FileCheck -check-prefix=OBJECTD1FOO %s
+# RUN:   %t %t1 %t2 -o %t3 | FileCheck -check-prefix=OBJECTD1FOO %s
 # OBJECTD1FOO: trace-symbols.s.tmp: reference to foo
 # OBJECTD1FOO: trace-symbols.s.tmp1: common definition of common
 # OBJECTD1FOO: trace-symbols.s.tmp1: definition of foo
 # OBJECTD1FOO: trace-symbols.s.tmp2: definition of foo
 
 # RUN: ld.lld -y foo -trace-symbol=common -trace-symbol=hsymbol \
-# RUN:   %t %t1 %t2 -o %t3 2>&1 | FileCheck -check-prefix=OBJECTD2FOO %s
+# RUN:   %t %t1 %t2 -o %t3 | FileCheck -check-prefix=OBJECTD2FOO %s
 # RUN: ld.lld -y foo -y common --trace-symbol=hsymbol \
-# RUN:   %t %t2 %t1 -o /dev/null 2>&1 | FileCheck -check-prefix=OBJECTD2FOO %s
-# RUN: ld.lld -y foo -y common %t %t1.so %t2 -o %t3 2>&1 | \
+# RUN:   %t %t2 %t1 -o /dev/null | FileCheck -check-prefix=OBJECTD2FOO %s
+# RUN: ld.lld -y foo -y common %t %t1.so %t2 -o %t3 | \
 # RUN:   FileCheck -check-prefix=OBJECTD2FOO %s
 # OBJECTD2FOO: trace-symbols.s.tmp2: definition of foo
 
-# RUN: ld.lld -y foo -y common %t %t2 %t1.a -o %t3 2>&1 | \
+# RUN: ld.lld -y foo -y common %t %t2 %t1.a -o %t3 | \
 # RUN:   FileCheck -check-prefix=FOO_AND_COMMON %s
 # FOO_AND_COMMON: trace-symbols.s.tmp: reference to foo
 # FOO_AND_COMMON: trace-symbols.s.tmp2: definition of foo
 # FOO_AND_COMMON: trace-symbols.s.tmp1.a: lazy definition of common
 
-# RUN: ld.lld -y foo -y common %t %t1.so %t2 -o %t3 2>&1 | \
+# RUN: ld.lld -y foo -y common %t %t1.so %t2 -o %t3 | \
 # RUN:   FileCheck -check-prefix=SHLIBDCOMMON %s
 # SHLIBDCOMMON: trace-symbols.s.tmp1.so: shared definition of common
 
-# RUN: ld.lld -y foo -y common %t %t2.so %t1.so -o %t3 2>&1 | \
+# RUN: ld.lld -y foo -y common %t %t2.so %t1.so -o %t3 | \
 # RUN:   FileCheck -check-prefix=SHLIBD2FOO %s
 # RUN: ld.lld -y foo %t %t1.a %t2.so -o %t3 | \
 # RUN:   FileCheck -check-prefix=NO-SHLIBD2FOO %s
 # SHLIBD2FOO:        trace-symbols.s.tmp2.so: shared definition of foo
 # NO-SHLIBD2FOO-NOT: trace-symbols.s.tmp2.so: definition of foo
 
-# RUN: ld.lld -y foo -y common %t %t2 %t1.a -o %t3 2>&1 | \
+# RUN: ld.lld -y foo -y common %t %t2 %t1.a -o %t3 | \
 # RUN:   FileCheck -check-prefix=ARCHIVEDCOMMON %s
 # ARCHIVEDCOMMON-NOT: trace-symbols.s.tmp1.a(trace-symbols.s.tmp1): definition of \
 # common
@@ -79,7 +79,7 @@
 # STARTLIB: trace-symbols.s.tmp1: reference to bar
 
 ## Check we do not crash when trying to trace special symbol.
-# RUN: not ld.lld -trace-symbol=_end %t -o /dev/null
+# RUN: ld.lld -trace-symbol=_end %t %t1 %t2 -o /dev/null
 
 .hidden hsymbol
 .globl	_start

Modified: lld/trunk/test/wasm/trace-symbol.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/trace-symbol.ll?rev=360794&r1=360793&r2=360794&view=diff
==============================================================================
--- lld/trunk/test/wasm/trace-symbol.ll (original)
+++ lld/trunk/test/wasm/trace-symbol.ll Wed May 15 12:01:51 2019
@@ -1,9 +1,9 @@
 ; RUN: llc -filetype=obj %p/Inputs/ret32.ll -o %t.ret32.o
 ; RUN: llc -filetype=obj -o %t.o %s
-; RUN: wasm-ld -o %t.wasm %t.o %t.ret32.o -y ret32 -y _start 2>&1 | FileCheck %s -check-prefix=BOTH
+; RUN: wasm-ld -o %t.wasm %t.o %t.ret32.o -y ret32 -y _start | FileCheck %s -check-prefix=BOTH
 
 ; check alias
-; RUN: wasm-ld -o %t.wasm %t.o %t.ret32.o -trace-symbol=_start 2>&1 | FileCheck %s -check-prefixes=JUST-START
+; RUN: wasm-ld -o %t.wasm %t.o %t.ret32.o -trace-symbol=_start | FileCheck %s -check-prefixes=JUST-START
 
 target triple = "wasm32-unknown-unknown"
 




More information about the llvm-commits mailing list