<div dir="ltr">Yeah, I'm debugging WinASan test failures, which have a lot of interesting exit codes. :(</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 7, 2016 at 1:17 PM, Aaron Ballman <span dir="ltr"><<a href="mailto:aaron@aaronballman.com" target="_blank">aaron@aaronballman.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Mon, Nov 7, 2016 at 4:06 PM, Reid Kleckner via llvm-commits<br>
<<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br>
> Author: rnk<br>
> Date: Mon Nov 7 15:06:20 2016<br>
> New Revision: 286150<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=286150&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project?rev=286150&view=rev</a><br>
> Log:<br>
> [lit] Print negative exit codes on Windows in hex<br>
><br>
> Negative exit codes are usually exceptions. They're easier to recognize<br>
> in hex. Compare -1073741502 to 0xc0000142.<br>
<br>
</span>Thank you for this! That is going to save a bit of time now and again. :-)<br>
<span class="HOEnZb"><font color="#888888"><br>
~Aaron<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
><br>
> Modified:<br>
> llvm/trunk/utils/lit/lit/<wbr>TestRunner.py<br>
><br>
> Modified: llvm/trunk/utils/lit/lit/<wbr>TestRunner.py<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/TestRunner.py?rev=286150&r1=286149&r2=286150&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/llvm/trunk/utils/lit/<wbr>lit/TestRunner.py?rev=286150&<wbr>r1=286149&r2=286150&view=diff</a><br>
> ==============================<wbr>==============================<wbr>==================<br>
> --- llvm/trunk/utils/lit/lit/<wbr>TestRunner.py (original)<br>
> +++ llvm/trunk/utils/lit/lit/<wbr>TestRunner.py Mon Nov 7 15:06:20 2016<br>
> @@ -555,8 +555,14 @@ def executeScriptInternal(test, litConfi<br>
><br>
> # Show the error conditions:<br>
> if result.exitCode != 0:<br>
> - out += "error: command failed with exit status: %d\n" % (<br>
> - result.exitCode,)<br>
> + # On Windows, a negative exit code indicates a signal, and those are<br>
> + # easier to recognize or look up if we print them in hex.<br>
> + if litConfig.isWindows and result.exitCode < 0:<br>
> + codeStr = hex(int(result.exitCode & 0xFFFFFFFF)).rstrip("L")<br>
> + else:<br>
> + codeStr = str(result.exitCode)<br>
> + out += "error: command failed with exit status: %s\n" % (<br>
> + codeStr,)<br>
> if litConfig.<wbr>maxIndividualTestTime > 0:<br>
> out += 'error: command reached timeout: %s\n' % (<br>
> str(result.timeoutReached),)<br>
><br>
><br>
> ______________________________<wbr>_________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-commits</a><br>
</div></div></blockquote></div><br></div>