This is an archive of the discontinued LLVM Phabricator instance.

[lld] Remove fragile regex from test
ClosedPublic

Authored by garious on Jan 12 2015, 2:50 PM.

Details

Summary

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.

Diff Detail

Repository
rL LLVM

Event Timeline

garious updated this revision to Diff 18048.Jan 12 2015, 2:50 PM
garious retitled this revision from to [lld] Remove fragile regex from test.
garious updated this object.
garious edited the test plan for this revision. (Show Details)
garious added reviewers: ruiu, shankarke.
garious set the repository for this revision to rL LLVM.
garious added a project: lld.
garious added a subscriber: Unknown Object (MLST).
ruiu added inline comments.Jan 12 2015, 2:56 PM
test/elf/dynamic-undef.test
30

I don't fully understand why now you need to split this into two lines. If "Undefined symbol" is not on the same line as "shared.so-x86-64: puts", why the previous test succeeded?

garious added inline comments.Jan 12 2015, 3:24 PM
test/elf/dynamic-undef.test
30

I suspect FileCheck looks for "no more than one newline". How about {{.+[\\/]}} instead?

ruiu added inline comments.Jan 12 2015, 3:34 PM
test/elf/dynamic-undef.test
30

Maybe

EXEC: Undefined symbol: {{.*}}/shared.so-x86-64: puts

is enough?

garious updated this revision to Diff 18055.Jan 12 2015, 3:36 PM

Attempt 2: Use a regex that accepts any set of characters that ends in a [back]slash.

garious added inline comments.Jan 12 2015, 3:39 PM
test/elf/dynamic-undef.test
30

Would that work if cross-compiling on Windows?

This revision was automatically updated to reflect the committed changes.