[PATCH] D83834: Add test utility 'split-file'

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 10 01:46:37 PDT 2020


jhenderson added a comment.

In D83834#2201444 <https://reviews.llvm.org/D83834#2201444>, @aeubanks wrote:

> There seem to be newline issues on Windows, causing llvm/test/tools/llvm-strings/radix.test and llvm/test/tools/split-file/basic.test to fail.
>
> $ xxd llvm/test/tools/split-file/Inputs/basic-aa.txt
> 00000000: 0d0a 6161 0d0a                           ..aa..
> $ xxd build_debug/obj/llvm/test/tools/split-file/Output/basic.test.tmp/aa
> 00000000: 0a61 610d 0a                             .aa..
>
> Any simple fix?

Have you got your git line-endings checkout settings correct? It's possible the `\r` is being added when you check out a file somewhere, I guess?

In D83834#2201952 <https://reviews.llvm.org/D83834#2201952>, @ro wrote:

> Some of the new tests `FAIL` when run in the same tree a second time:
>
>   LLVM :: tools/llvm-strings/radix.test
>   LLVM :: tools/split-file/basic.test
>   LLVM :: tools/split-file/empty.test
>   LLVM :: tools/split-file/no-leading-lines.test
>
> The failure mode is always the same, e.g.
>
>   split-file: error: /var/llvm/local-sparcv9-relwithdebinfo-A/test/tools/llvm-strings/Output/radix.test.tmp: File exists
>
> This affects the Solaris buildbots (e.g. the Solaris/sparcv9 one <http://lab.llvm.org:8014/builders/clang-solaris11-sparcv9>) and all others that run with `clean=False`.

I just tried running the tests twice on my Windows machine, and they pass (no cleaning in between). At a guess, this is something different in the Solaris OS behaviour?

@MaskRay, I just noticed that this new code is in llvm/tools, but I think it belongs in llvm/utils, because it is more like tools like FileCheck, not, count etc intended for internal testing. What do you think?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D83834/new/

https://reviews.llvm.org/D83834



More information about the llvm-commits mailing list