Lld test ELF/linkerscript/input-archive.s fails when path contain a @
because is not accepted in unquoted token in linker scripts which leads
to the path being broken in 2 around the @. This commit quotes the path
used in the linker script created by this and similar testcases allowing
the test to pass even in the presence of an @ sign in the path.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
This is ok, but can you fix all tests in one patch? For example, linkerscript/thunk-gen-mips.s has the same problem.
because @ is a keyword in linker script which leads to the path being broken in 2 around the @
@ is not a keyword.
@ is not considered part of an unquoted token.
You did not fix lld/test/ELF/linkerscript/thunk-gen-mips.s initially. This made me wonder how you found the issue of lld/test/ELF/linkerscript/input-archive.s.
Have you invoked ninja check-lld to ensure every test is good now?
Indeed, but that wouldn't have caught it anyway. See comment I've added on thunk-gen-mips.s
lld/test/ELF/linkerscript/thunk-gen-mips.s | ||
---|---|---|
18–20 | CHECK-ANY is not a valid FileCheck directive and the FileCheck invocation uses the default prefix. This test is only testing the presence of SYMBOL TABLE in the output of llvm-objdump -t :-) |
lld/test/ELF/linkerscript/thunk-gen-mips.s | ||
---|---|---|
18–20 | The test seems to have bitrotted as a result. This is the output of objdump -t I get when I run it manually: SYMBOL TABLE: So wrong address and flag for _start, wrong address and size for too_far. I presume CHECK-ANY was meant to be CHECK-DAG and thus the order does not matter. |
lld/test/ELF/linkerscript/thunk-gen-mips.s | ||
---|---|---|
7 | A better fix is to change the outermost " to ' and use unescaped "%t" |
Please add [test] to the commit subject. You can do this before committing arcfilter; git pull --rebase origin master; last-minute-testing(ninja check-lld-elf) && git push origin HEAD:master where arcfilter is a shell function which drops unneeded Phabricator tags (Subscribers:, Summary:, Tags:, Reviewers:) but keeps Differential Revision: and Reviewed By:
arcfilter () { arc amend git log -1 --pretty=%B | awk '/Reviewers:|Subscribers:/{p=1} /Reviewed By:|Differential Revision:/{p=0} !p && !/^Summary:$/ {sub(/^Summary: /,"");print}' | git commit --amend -F - }
A better fix is to change the outermost " to ' and use unescaped "%t"