<div dir="ltr"><div dir="ltr"><div>lit's internal shell has its own env implementation.  I think that's what runs for me (in Ubuntu).  It seems your bot is somehow using the external shell and thus uses the system env.  Michal's bot must be too because lit's env supports -u.  Why would your bots be using the external shell?</div><div></div><div><br></div><div>Joel<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jul 26, 2019 at 1:08 PM <<a href="mailto:paul.robinson@sony.com">paul.robinson@sony.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div lang="EN-US">
<div class="gmail-m_1878218654608298764WordSection1">
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri","sans-serif";color:rgb(31,73,125)">googletest-format.py generates a %t.out, which among other things emits these two lines:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri","sans-serif";color:rgb(31,73,125)">I am subTest B, I FAIL<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri","sans-serif";color:rgb(31,73,125)">And I have two lines of output<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri","sans-serif";color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri","sans-serif";color:rgb(31,73,125)">A hexdump of the .out file was very informative.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri","sans-serif";color:rgb(31,73,125)">If there is no 'env' in front of the %{python} in the %{lit} substitution, those lines are separate by CR CR LF.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri","sans-serif";color:rgb(31,73,125)">If there IS 'env' in front of %{python}, those lines are separated by CR CR CR LF.  And that causes the CHECK-NEXT of the second line of output to fail.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri","sans-serif";color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri","sans-serif";color:rgb(31,73,125)">This is likely some peculiar interaction of python and GnuWin32 'env' on Windows.  It still bugs me that Windows bots are not running into this.  Yes we are
 pursuing that internally.  We might decide to XFAIL a bunch of the lit test suite tests just to get our auto-integration moving again, although I am not too happy about that tactic.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri","sans-serif";color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri","sans-serif";color:rgb(31,73,125)">Thanks,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri","sans-serif";color:rgb(31,73,125)">--paulr<u></u><u></u></span></p>
<p class="MsoNormal"><a name="m_1878218654608298764__MailEndCompose"><span style="font-size:11pt;font-family:"Calibri","sans-serif";color:rgb(31,73,125)"><u></u> <u></u></span></a></p>
<div style="border-color:currentcolor currentcolor currentcolor blue;border-style:none none none solid;border-width:medium medium medium 1.5pt;padding:0in 0in 0in 4pt">
<div>
<div style="border-color:rgb(181,196,223) currentcolor currentcolor;border-style:solid none none;border-width:1pt medium medium;padding:3pt 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10pt;font-family:"Tahoma","sans-serif""> Joel E. Denny [mailto:<a href="mailto:jdenny.ornl@gmail.com" target="_blank">jdenny.ornl@gmail.com</a>]
<br>
<b>Sent:</b> Friday, July 26, 2019 12:35 PM<br>
<b>To:</b> Robinson, Paul<br>
<b>Cc:</b> <a href="mailto:mgorny@gentoo.org" target="_blank">mgorny@gentoo.org</a>; <a href="mailto:reviews%2BD65156%2Bpublic%2B5784c7837e421597@reviews.llvm.org" target="_blank">reviews+D65156+public+5784c7837e421597@reviews.llvm.org</a>; Dan Liew; Thomas Preud'homme; LLVM Commits<br>
<b>Subject:</b> Re: [PATCH] D65156: [lit] Protect full test suite from FILECHECK_OPTS<u></u><u></u></span></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<div>
<p class="MsoNormal">Hi Paul,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">On Fri, Jul 26, 2019 at 11:56 AM <<a href="mailto:paul.robinson@sony.com" target="_blank">paul.robinson@sony.com</a>> wrote:<u></u><u></u></p>
</div>
<blockquote style="border-color:currentcolor currentcolor currentcolor rgb(204,204,204);border-style:none none none solid;border-width:medium medium medium 1pt;padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal">> We have had an internal bot get 9 failures in the lit test suite<br>
> since this patch went in; I will see if the suggested patches help.<br>
> --paulr<br>
<br>
They don't help.  It appears the gnuwin32 'env' does understand -u so<br>
that wasn't the problem.<u></u><u></u></p>
</blockquote>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Bummer.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<blockquote style="border-color:currentcolor currentcolor currentcolor rgb(204,204,204);border-style:none none none solid;border-width:medium medium medium 1pt;padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal"><br>
Picking apart 'googletest-format.py' and doing the steps manually,<br>
so that I can get FileCheck to tell me what's going on, it appears<br>
that the .out file generated by the test has an extra line terminator,<br>
so a CHECK-NEXT on the .out file fails.<u></u><u></u></p>
</blockquote>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Where does that line terminator appear?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<blockquote style="border-color:currentcolor currentcolor currentcolor rgb(204,204,204);border-style:none none none solid;border-width:medium medium medium 1pt;padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal"><br>
If I hack the lit.cfg so it's just 'env %{python} etc' (not trying<br>
to set or unset) the same failure occurs; so, something about running<br>
python or lit.py under GnuWin32 'env' is making this occur.<br>
<br>
env version 5.3.0<br>
python version 2.7.12 on Windows version 7<br>
python version 2.7.14 on Windows version 10<u></u><u></u></p>
</blockquote>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">If you're pursuing this, let me know.  Otherwise, I'll move to windows and try to figure this out.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Thanks for the details.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Joel<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<blockquote style="border-color:currentcolor currentcolor currentcolor rgb(204,204,204);border-style:none none none solid;border-width:medium medium medium 1pt;padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal" style="margin-bottom:12pt"><br>
--paulr<br>
<br>
> <br>
> > -----Original Message-----<br>
> > From: Michał Górny [mailto:<a href="mailto:mgorny@gentoo.org" target="_blank">mgorny@gentoo.org</a>]<br>
> > Sent: Friday, July 26, 2019 10:28 AM<br>
> > To: Joel E. Denny;<br>
> <a href="mailto:reviews%2BD65156%2Bpublic%2B5784c7837e421597@reviews.llvm.org" target="_blank">
reviews+D65156+public+5784c7837e421597@reviews.llvm.org</a><br>
> > Cc: Robinson, Paul; Dan Liew; Thomas Preud'homme; LLVM Commits<br>
> > Subject: Re: [PATCH] D65156: [lit] Protect full test suite from<br>
> > FILECHECK_OPTS<br>
> ><br>
> > On Fri, 2019-07-26 at 10:17 -0400, Joel E. Denny wrote:<br>
> > > Hi Michał,<br>
> > ><br>
> > > On Fri, Jul 26, 2019 at 10:12 AM Michał Górny via Phabricator <<br>
> > > <a href="mailto:reviews@reviews.llvm.org" target="_blank">reviews@reviews.llvm.org</a>> wrote:<br>
> > ><br>
> > > > mgorny added a comment.<br>
> > > ><br>
> > > > This change broke NetBSD buildbots, e.g.:<br>
> > > > <a href="http://lab.llvm.org:8011/builders/netbsd-" target="_blank">http://lab.llvm.org:8011/builders/netbsd-</a><br>
> ><br>
> amd64/builds/21152/steps/run%20unit%20tests/logs/FAIL%3A%20lit%3A%3A%20goo<br>
> > gletest-upstream-format.py<br>
> > ><br>
> > > I didn't receive an automated email for this.  Should I have?<br>
> > ><br>
> ><br>
> > To be honest, I don't really know.  The bot hasn't managed to get green<br>
> > for quite some time already, and I don't know if it pings you if there<br>
> > is a constant breakage.<br>
> ><br>
> > --<br>
> > Best regards,<br>
> > Michał Górny<u></u><u></u></p>
</blockquote>
</div>
</div>
</div>
</div>
</div>

</blockquote></div></div>