[PATCH] D37689: [ELF] Fix flaky test
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 11 07:44:07 PDT 2017
jhenderson created this revision.
Herald added a subscriber: emaste.
'@' is a valid character in file paths, but the linker script tokenizer treats it as a separate token. I have quoted the path to prevent this happening.
An alternative would have been to add '@' to the list of "unquoted tokens" in ScriptLexer.cpp, but I checked and ld.bfd has the same behaviour as the current LLD, so I have changed the test instead.
https://reviews.llvm.org/D37689
Files:
test/ELF/linkerscript/include-cycle.s
Index: test/ELF/linkerscript/include-cycle.s
===================================================================
--- test/ELF/linkerscript/include-cycle.s
+++ test/ELF/linkerscript/include-cycle.s
@@ -1,11 +1,11 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
-# RUN: echo INCLUDE %t1.script > %t1.script
+# RUN: echo INCLUDE "%t1.script" > %t1.script
# RUN: not ld.lld %t.o %t1.script 2>&1 | FileCheck %s
-# RUN: echo INCLUDE %t2.script > %t1.script
-# RUN: echo INCLUDE %t1.script > %t2.script
+# RUN: echo INCLUDE "%t2.script" > %t1.script
+# RUN: echo INCLUDE "%t1.script" > %t2.script
# RUN: not ld.lld %t.o %t1.script 2>&1 | FileCheck %s
# CHECK: there is a cycle in linker script INCLUDEs
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37689.114605.patch
Type: text/x-patch
Size: 761 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170911/87650280/attachment.bin>
More information about the llvm-commits
mailing list