[lld] r339137 - [LLD][ELF] - Add test cases for ScriptParser::readDynamicList(). NFCI.
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 7 06:13:19 PDT 2018
Author: grimar
Date: Tue Aug 7 06:13:19 2018
New Revision: 339137
URL: http://llvm.org/viewvc/llvm-project?rev=339137&view=rev
Log:
[LLD][ELF] - Add test cases for ScriptParser::readDynamicList(). NFCI.
This 2 test cases covers the following code:
https://github.com/llvm-mirror/lld/blob/master/ELF/ScriptParser.cpp#L185
https://github.com/llvm-mirror/lld/blob/master/ELF/ScriptParser.cpp#L189
Added:
lld/trunk/test/ELF/dynamic-list-locals.s
lld/trunk/test/ELF/dynamic-list-unexpected-end.s
Added: lld/trunk/test/ELF/dynamic-list-locals.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/dynamic-list-locals.s?rev=339137&view=auto
==============================================================================
--- lld/trunk/test/ELF/dynamic-list-locals.s (added)
+++ lld/trunk/test/ELF/dynamic-list-locals.s Tue Aug 7 06:13:19 2018
@@ -0,0 +1,7 @@
+# REQUIRES: x86
+
+# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
+# RUN: echo "{ local: *; };" > %t.list
+# RUN: not ld.lld -dynamic-list %t.list -shared %t.o -o %t.so 2>&1 | FileCheck %s
+
+# CHECK: error: {{.*}}:1: "local:" scope not supported in --dynamic-list
Added: lld/trunk/test/ELF/dynamic-list-unexpected-end.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/dynamic-list-unexpected-end.s?rev=339137&view=auto
==============================================================================
--- lld/trunk/test/ELF/dynamic-list-unexpected-end.s (added)
+++ lld/trunk/test/ELF/dynamic-list-unexpected-end.s Tue Aug 7 06:13:19 2018
@@ -0,0 +1,7 @@
+# REQUIRES: x86
+
+# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
+# RUN: echo "{ }; foo;" > %t.list
+# RUN: not ld.lld -dynamic-list %t.list -shared %t.o -o %t.so 2>&1 | FileCheck %s
+
+# CHECK: error: {{.*}}:1: EOF expected, but got foo
More information about the llvm-commits
mailing list