<div class="gmail_quote">On Tue, May 1, 2012 at 12:19 AM, Jonathan Gray <span dir="ltr"><<a href="mailto:jsg@jsg.id.au" target="_blank">jsg@jsg.id.au</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On Mon, Apr 30, 2012 at 07:04:46PM -0700, Douglas Gregor wrote:<br>
><br>
> On Apr 30, 2012, at 7:02 PM, Chandler Carruth <<a href="mailto:chandlerc@google.com">chandlerc@google.com</a>> wrote:<br>
><br>
> > On Mon, Apr 30, 2012 at 6:43 PM, Douglas Gregor <<a href="mailto:dgregor@apple.com">dgregor@apple.com</a>> wrote:<br>
> ><br>
> > On Mar 21, 2012, at 3:07 AM, Jonathan Gray <<a href="mailto:jsg@jsg.id.au">jsg@jsg.id.au</a>> wrote:<br>
> ><br>
> > > In test/Driver/clang-g-opts.c with tests of the form<br>
> > ><br>
> > > // RUN: %clang -S -v -o %t %s 2>&1 | not grep -w -- -g<br>
> > ><br>
> > > using 'not' here isn't portable and doesn't work on at least<br>
> > > OpenBSD and likely other systems (bash builtin?).<br>
> > ><br>
> > > patch to move this to FileCheck attached<br>
> ><br>
> > Committed as r155874, thanks!<br>
> ><br>
> > See my comments on the commit, I don't think this is a correct patch.<br>
> ><br>
> > Move-over, 'not' *is* portable, as we build the 'not' command out of the LLVM tree?<br>
> ><br>
> > I fully support moving it to filecheck, but the reason as stated doesn't comute for me.<br>
><br>
</div></div>> And? I completely misread the patch. Reverted in r155878.<br>
><br>
> - Doug<br>
<br>
I don't follow why this was reverted, could someone explain the reasoning?<br>
<br>
Before the diff the test fails when it shouldn't have.<br>
</blockquote></div><br><div>I've not dug into the issue you're seeing or this specific tests, but there were two abstract issues with the patch as proposed:</div><div><br></div><div>1) FileCheck asserts *all* of the checks on each run. There are several distinct runs in the test, and only one of the assertions applied to each run. FileCheck supports this use case, but you must use --check-prefix(sp?). Look for that flag in the test suite. The patch as proposed caused test suite failures for most build bots as a consequence.</div>
<div><br></div><div>2) I don't understand the claim that 'not' is unportable. We build our own 'not' binary out of the LLVM source code. It is not expected to be installed on the system. What is the actual failure you are seeing? It is more likely a functional failure than anything to do with the 'not' binary.</div>