<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Oct 29, 2020 at 11:40 AM Chris Lattner <<a href="mailto:clattner@nondot.org">clattner@nondot.org</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 style="overflow-wrap: break-word;"><div>On Oct 29, 2020, at 10:28 AM, Mircea Trofin via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br><blockquote type="cite"><br><div><div dir="ltr"><div>Hello all,<br></div><div><br></div><div>TL;DR; if you used FileCheck --check-prefixes and you missed (misspelled, for instance) one of the prefixes in your test, FileCheck silently ignores that and the test passes. </div><div><br></div><div>1579 tests have this property. </div></div></div></blockquote><div><br></div><div>Wow, that is quite a “whoops”.  Thank you for catching this, your plan sounds really great.<br></div></div></div></blockquote><div><br></div><div>Thanks, credit also goes to maskray for helping flesh out the plan.</div><div><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 style="overflow-wrap: break-word;"><div><div></div><div><br></div><div>-Chris</div><div><br></div><br><blockquote type="cite"><div><div dir="ltr"><div><br></div><div><b><br></b></div><div><b>The details</b></div><div><b>=========</b></div><div>Please refer to <a href="https://reviews.llvm.org/D90281" target="_blank">https://reviews.llvm.org/D90281</a> and the discussion there for more details (make sure you open "older changes" for full context)</div><div><br></div><div>The problem is covered by the TL;DR;. </div><div><br></div><div>The proposal is to add an explicit flag to FileCheck, --allow-unused-prefixes, to indicate whether the current behavior is intended (for instance, jdoerfert contributed a scenario where that is the case). </div><div><br></div><div>We want the default behavior to be 'strict', i.e. --allow-unused-prefixes=false. Doing that right now would lead to 1500 test failures.</div><div><br></div><div>To get there (thanks, maskray, for suggestion), we propose we:</div><div>* land D90281 where the flag is introduced, but is flipped to match today's behavior</div><div>* employ a 'busy beavers' approach, where test maintainers patch their tests:</div><div>  - either leveraging the flag, to explicitly indicate that unused prefixes is intended (i.e. add --allow-unused-patches=true); or</div><div>  - fix the test (e.g. maybe there was a misspelling issue/omission/etc).</div><div><br></div><div>A spreadsheet with the failing tests is available <a href="https://docs.google.com/spreadsheets/d/1o6q3XH1n3DDyyccnYZ_kVfhFbTDzC_S09e973_cwYuw/edit?usp=sharing" target="_blank">here</a> [1].</div><div><br></div><div>The request to the community members is to please sign up for their respective area in the spreadsheet, and then mark it completed when that's the case (yes/no in the respective column).</div><div><br></div><div>When all the tests are fixed, we will then flip --allow-unused-prefixes to false by default.</div><div><br></div><div>Meanwhile, please consider leveraging the flag explicitly when you author new tests that use --check-prefixes. That can be then cleaned up easily after we switch to the 'strict' behavior.</div><div><br></div><div>Thanks!</div><div><br></div><div>[1] <a href="https://docs.google.com/spreadsheets/d/1o6q3XH1n3DDyyccnYZ_kVfhFbTDzC_S09e973_cwYuw/edit?usp=sharing" target="_blank">https://docs.google.com/spreadsheets/d/1o6q3XH1n3DDyyccnYZ_kVfhFbTDzC_S09e973_cwYuw/edit?usp=sharing</a></div></div>
_______________________________________________<br>LLVM Developers mailing list<br><a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br><a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br></div></blockquote></div><br></div></blockquote></div></div>