[PATCH] [lld] Remove fragile regex from test

Greg Fitzgerald garious at gmail.com
Mon Jan 12 14:50:16 PST 2015


Hi ruiu, shankarke,

These tests were checking for absolute paths and could fail if it included any valid path character that was not included in that regex.  This patch avoids the issue by removing the path checks.

REPOSITORY
  rL LLVM

http://reviews.llvm.org/D6937

Files:
  test/elf/dynamic-undef.test
  test/elf/filenotfound.test

Index: test/elf/dynamic-undef.test
===================================================================
--- test/elf/dynamic-undef.test
+++ test/elf/dynamic-undef.test
@@ -26,9 +26,11 @@
 RUN: --use-shlib-undefines --no-allow-shlib-undefined  2> %t2
 RUN: llvm-readobj -symbols %t.useundefines | FileCheck -check-prefix=SHLIB-UNDEF-SYMBOLS %s
 
-EXEC: Undefined symbol: {{[+-_A-Za-z0-9.\\/:]+}}shared.so-x86-64: puts
-SHLIB: Undefined symbol: {{[+-_A-Za-z0-9.\\/:]+}}shared.so-x86-64: puts
-EXEC-NOT: Undefined symbol: {{[+-_A-Za-z0-9.\\/:]+}}shared.so-x86-64: weakfoo
-SHLIB-NOT: Undefined symbol: {{[+-_A-Za-z0-9.\\/:]+}}shared.so-x86-64: weakfoo
+EXEC: Undefined symbol:
+EXEC-NEXT: shared.so-x86-64: puts
+SHLIB: Undefined symbol:
+SHLIB-NEXT: shared.so-x86-64: puts
+EXEC-NOT: shared.so-x86-64: weakfoo
+SHLIB-NOT: shared.so-x86-64: weakfoo
 SHLIB-NOUNDEF-NOT: Name: puts
 SHLIB-UNDEF-SYMBOLS: Name: puts
Index: test/elf/filenotfound.test
===================================================================
--- test/elf/filenotfound.test
+++ test/elf/filenotfound.test
@@ -1,3 +1,4 @@
 # Check that a file that cannot be found results in a proper error message
 RUN: not lld -flavor gnu -target x86_64 %p/Inputs/nofile.o 2>&1 | FileCheck %s
-#CHECK: lld: cannot find file {{[+-_A-Za-z0-9.\\/:]+}}nofile.o
+#CHECK: lld: cannot find file
+#CHECK-NEXT: nofile.o

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6937.18048.patch
Type: text/x-patch
Size: 1363 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150112/543f00f0/attachment.bin>


More information about the llvm-commits mailing list