[lld] r259559 - ELF: Rewrite "echo" command arguments in hope that would fix a test breakage.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 2 13:03:57 PST 2016
Author: ruiu
Date: Tue Feb 2 15:03:56 2016
New Revision: 259559
URL: http://llvm.org/viewvc/llvm-project?rev=259559&view=rev
Log:
ELF: Rewrite "echo" command arguments in hope that would fix a test breakage.
Previously, we used both single quotes and double quotes, and
some single-quoted tokens are concatenated with next tokens because
there were no spaces between them. That may be a cause of test flakiness
on Windows, which is reported as https://llvm.org/bugs/show_bug.cgi?id=26388.
The new test commands are more straightforward than before.
Modified:
lld/trunk/test/ELF/as-needed.s
lld/trunk/test/ELF/linkerscript.s
lld/trunk/test/ELF/linkerscript2.s
lld/trunk/test/ELF/progname.s
Modified: lld/trunk/test/ELF/as-needed.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/as-needed.s?rev=259559&r1=259558&r2=259559&view=diff
==============================================================================
--- lld/trunk/test/ELF/as-needed.s (original)
+++ lld/trunk/test/ELF/as-needed.s Tue Feb 2 15:03:56 2016
@@ -20,11 +20,11 @@
/// GROUP directive is the same as --as-needed.
-// RUN: echo 'GROUP("'%t2.so'" "'%t3.so'" "'%t4.so'")' > %t.script
+// RUN: echo "GROUP(\"%t2.so\" \"%t3.so\" \"%t4.so\")" > %t.script
// RUN: ld.lld %t.o %t.script -o %t2
// RUN: llvm-readobj -dynamic-table %t2 | FileCheck %s
-// RUN: echo 'GROUP(AS_NEEDED("'%t2.so'" "'%t3.so'" "'%t4.so'"))' > %t.script
+// RUN: echo "GROUP(AS_NEEDED(\"%t2.so\" \"%t3.so\" \"%t4.so\"))" > %t.script
// RUN: ld.lld %t.o %t.script -o %t2
// RUN: llvm-readobj -dynamic-table %t2 | FileCheck -check-prefix=CHECK2 %s
Modified: lld/trunk/test/ELF/linkerscript.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/linkerscript.s?rev=259559&r1=259558&r2=259559&view=diff
==============================================================================
--- lld/trunk/test/ELF/linkerscript.s (original)
+++ lld/trunk/test/ELF/linkerscript.s Tue Feb 2 15:03:56 2016
@@ -10,43 +10,43 @@
# RUN: ld.lld %t -o %t2 %t.script
# RUN: llvm-readobj %t2 > /dev/null
-# RUN: echo 'GROUP("'%t'")' > %t.script
+# RUN: echo "GROUP(\"%t\")" > %t.script
# RUN: ld.lld -o %t2 %t.script
# RUN: llvm-readobj %t2 > /dev/null
-# RUN: echo 'INPUT("'%t'")' > %t.script
+# RUN: echo "INPUT(\"%t\")" > %t.script
# RUN: ld.lld -o %t2 %t.script
# RUN: llvm-readobj %t2 > /dev/null
-# RUN: echo 'GROUP("'%t'" libxyz.a )' > %t.script
+# RUN: echo "GROUP(\"%t\" libxyz.a )" > %t.script
# RUN: not ld.lld -o %t2 %t.script
# RUN: ld.lld -o %t2 %t.script -L%t.dir
# RUN: llvm-readobj %t2 > /dev/null
-# RUN: echo 'GROUP("'%t'" =libxyz.a )' > %t.script
+# RUN: echo "GROUP(\"%t\" =libxyz.a )" > %t.script
# RUN: not ld.lld -o %t2 %t.script
# RUN: ld.lld -o %t2 %t.script --sysroot=%t.dir
# RUN: llvm-readobj %t2 > /dev/null
-# RUN: echo 'GROUP("'%t'" -lxyz )' > %t.script
+# RUN: echo "GROUP(\"%t\" -lxyz )" > %t.script
# RUN: not ld.lld -o %t2 %t.script
# RUN: ld.lld -o %t2 %t.script -L%t.dir
# RUN: llvm-readobj %t2 > /dev/null
-# RUN: echo 'GROUP("'%t'" libxyz.a )' > %t.script
+# RUN: echo "GROUP(\"%t\" libxyz.a )" > %t.script
# RUN: not ld.lld -o %t2 %t.script
# RUN: ld.lld -o %t2 %t.script -L%t.dir
# RUN: llvm-readobj %t2 > /dev/null
-# RUN: echo 'GROUP("'%t'" /libxyz.a )' > %t.script
-# RUN: echo 'GROUP("'%t'" /libxyz.a )' > %t.dir/xyz.script
+# RUN: echo "GROUP(\"%t\" /libxyz.a )" > %t.script
+# RUN: echo "GROUP(\"%t\" /libxyz.a )" > %t.dir/xyz.script
# RUN: not ld.lld -o %t2 %t.script
# RUN: not ld.lld -o %t2 %t.script --sysroot=%t.dir
# RUN: ld.lld -o %t2 %t.dir/xyz.script --sysroot=%t.dir
# RUN: llvm-readobj %t2 > /dev/null
-# RUN: echo 'GROUP("'%t.script2'")' > %t.script1
-# RUN: echo 'GROUP("'%t'")' > %t.script2
+# RUN: echo "GROUP(\"%t.script2\")" > %t.script1
+# RUN: echo "GROUP(\"%t\")" > %t.script2
# RUN: ld.lld -o %t2 %t.script1
# RUN: llvm-readobj %t2 > /dev/null
@@ -70,16 +70,16 @@
# ENTRY-OVERLOAD: Name: _start
# ENTRY-OVERLOAD-NEXT: Value: [[ENTRY]]
-# RUN: echo 'OUTPUT_FORMAT("elf64-x86-64") /*/*/ GROUP("'%t'" )' > %t.script
+# RUN: echo "OUTPUT_FORMAT(elf64-x86-64) /*/*/ GROUP(\"%t\" )" > %t.script
# RUN: ld.lld -o %t2 %t.script
# RUN: llvm-readobj %t2 > /dev/null
-# RUN: echo 'GROUP(AS_NEEDED("'%t'"))' > %t.script
+# RUN: echo "GROUP(AS_NEEDED(\"%t\"))" > %t.script
# RUN: ld.lld -o %t2 %t.script
# RUN: llvm-readobj %t2 > /dev/null
# RUN: rm -f %t.out
-# RUN: echo 'OUTPUT("'%t.out'")' > %t.script
+# RUN: echo "OUTPUT(\"%t.out\")" > %t.script
# RUN: ld.lld %t.script %t
# RUN: llvm-readobj %t.out > /dev/null
@@ -95,8 +95,8 @@
# RUN: ld.lld %t.script %t
# RUN: llvm-readobj %t.out > /dev/null
-# RUN: echo 'INCLUDE "'%t.script2'" OUTPUT("'%t.out'")' > %t.script1
-# RUN: echo 'GROUP("'%t'")' > %t.script2
+# RUN: echo "INCLUDE \"%t.script2\" OUTPUT(\"%t.out\")" > %t.script1
+# RUN: echo "GROUP(\"%t\")" > %t.script2
# RUN: ld.lld %t.script1
# RUN: llvm-readobj %t2 > /dev/null
Modified: lld/trunk/test/ELF/linkerscript2.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/linkerscript2.s?rev=259559&r1=259558&r2=259559&view=diff
==============================================================================
--- lld/trunk/test/ELF/linkerscript2.s (original)
+++ lld/trunk/test/ELF/linkerscript2.s Tue Feb 2 15:03:56 2016
@@ -4,7 +4,7 @@
# RUN: %p/Inputs/libsearch-dyn.s -o %tdyn.o
# RUN: mkdir -p %t.dir
# RUN: ld.lld -shared %tdyn.o -o %t.dir/libls.so
-# RUN: echo 'SEARCH_DIR("'%t.dir'")' > %t.script
+# RUN: echo "SEARCH_DIR(\"%t.dir\")" > %t.script
# RUN: ld.lld -o %t2 --script %t.script -lls %t
.globl _start,_bar
Modified: lld/trunk/test/ELF/progname.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/progname.s?rev=259559&r1=259558&r2=259559&view=diff
==============================================================================
--- lld/trunk/test/ELF/progname.s (original)
+++ lld/trunk/test/ELF/progname.s Tue Feb 2 15:03:56 2016
@@ -1,5 +1,5 @@
// RUN: llvm-mc -filetype=obj -triple=i686-unknown-linux %s -o %t.o
-// RUN: echo '.global __progname' > %t2.s
+// RUN: echo .global __progname > %t2.s
// RUN: llvm-mc -filetype=obj -triple=i686-unknown-linux %t2.s -o %t2.o
// RUN: ld.lld -shared %t2.o -o %t2.so
// RUN: ld.lld -o %t %t.o %t2.so
More information about the llvm-commits
mailing list