<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Tue, Feb 14, 2017 at 12:33 PM Dimitry Andric <<a href="mailto:dimitry@andric.com">dimitry@andric.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Dean,<br class="gmail_msg">
<br class="gmail_msg">
I have been trying to figure out one llvm-xray test failure that occurs while testing the release_40 branch (but this same failure also shows up for me on trunk):<br class="gmail_msg">
<br class="gmail_msg">
FAIL: LLVM :: tools/llvm-xray/X86/convert-with-debug-syms.txt (30283 of 37661)<br class="gmail_msg">
******************** TEST 'LLVM :: tools/llvm-xray/X86/convert-with-debug-syms.txt' FAILED ********************<br class="gmail_msg">
Script:<br class="gmail_msg">
--<br class="gmail_msg">
/home/dim/obj/llvm-294803-rel40-freebsd12-i386-ninja-rel-1/./bin/llvm-xray convert -m /share/dim/src/llvm/release_40/test<br class="gmail_msg">
/tools/llvm-xray/X86/Inputs/elf64-sample-o2.bin -y /share/dim/src/llvm/release_40/test/tools/llvm-xray/X86/Inputs/naive-l<br class="gmail_msg">
og-simple.xray -f=yaml -o - 2>&1 | /home/dim/obj/llvm-294803-rel40-freebsd12-i386-ninja-rel-1/./bin/FileCheck /share/dim/<br class="gmail_msg">
src/llvm/release_40/test/tools/llvm-xray/X86/convert-with-debug-syms.txt<br class="gmail_msg">
--<br class="gmail_msg">
Exit Code: 1<br class="gmail_msg">
<br class="gmail_msg">
Command Output (stderr):<br class="gmail_msg">
--<br class="gmail_msg">
/share/dim/src/llvm/release_40/test/tools/llvm-xray/X86/convert-with-debug-syms.txt:13:15: error: expected string not fou<br class="gmail_msg">
nd in input<br class="gmail_msg">
; CHECK-NEXT: - { type: 0, func-id: 2, function: {{.*foo.*}}, cpu: 37, thread: 84697, kind: function-enter,<br class="gmail_msg">
              ^<br class="gmail_msg">
<stdin>:11:2: note: scanning from here<br class="gmail_msg">
 - { type: 0, func-id: 2, function: 'foo(void)', cpu: 37, thread: 84697,<br class="gmail_msg">
 ^<br class="gmail_msg">
<stdin>:19:2: note: possible intended match here<br class="gmail_msg">
 - { type: 0, func-id: 3, function: main, cpu: 37, thread: 84697, kind: function-exit,<br class="gmail_msg">
 ^<br class="gmail_msg">
<br class="gmail_msg">
--<br class="gmail_msg">
<br class="gmail_msg">
********************<br class="gmail_msg">
<br class="gmail_msg">
What happens here is that the test/tools/llvm-xray/X86/convert-with-debug-syms.txt test case has the following CHECK-NEXT lines:<br class="gmail_msg">
<br class="gmail_msg">
; CHECK-NEXT:   - { type: 0, func-id: 2, function: {{.*foo.*}}, cpu: 37, thread: 84697, kind: function-enter,<br class="gmail_msg">
; CHECK-NEXT:       tsc: 3315356841454542 }<br class="gmail_msg">
<br class="gmail_msg">
However, on my FreeBSD-based systems, the output for the 'foo' and 'bar' lines is formatted slightly differently, wrapping at the 'kind' key instead of the 'tsc' key:<br class="gmail_msg">
<br class="gmail_msg">
  - { type: 0, func-id: 2, function: 'foo(void)', cpu: 37, thread: 84697,<br class="gmail_msg">
      kind: function-enter, tsc: 3315356841454542 }<br class="gmail_msg">
<br class="gmail_msg">
Any idea what causes this?  Maybe the yaml outputter is retrieving the terminal size differently somehow, and thus wrapping it at another margin?<br class="gmail_msg">
<br class="gmail_msg">
If so, maybe there is some way of ensuring the output either never wraps, or always wraps at the same margin?<br class="gmail_msg">
<br class="gmail_msg"></blockquote><div><br></div><div>Interesting. I've not found this before. We're currently just using the defaults for the yaml printer. There could be a way to not pretty-print, but I haven't explored that specifically.</div><div><br></div><div>Can you file a bug on this so that I don't forget to have a look? If you have time to actually try and fix it, I'd be more than happy to review a patch for it.</div><div><br></div><div>Cheers</div><div><br></div></div></div>