<div dir="ltr">Okay, so I'm not a fan of the flaky tests myself, nor of test suites taking longer to run than needed.<div><br></div><div>Enrico is going to add a new 'flakey' category to the test categorization.</div><div><br></div><div>Scratch all the other complexity I offered up. What we're going to ask is if a test is flakey, please add it to the 'flakey' category. We won't do anything different with the category by default, so everyone will still get flakey tests running the same manner they do now. However, on our test runners, we will be disabling the category entirely using the skipCategories mechanism since those are generating too much noise.</div><div><br></div><div>We may need to add a per-test-method category mechanism since right now our only mechanism to add categories (1) specify a dot-file to the directory to have everything in it get tagged with a category, or (2) override the categorization for the TestCase getCategories() mechanism.</div><div><br></div><div>-Todd</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 19, 2015 at 1:03 PM, Zachary Turner <span dir="ltr"><<a href="mailto:zturner@google.com" target="_blank">zturner@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><br><div class="gmail_quote"><span class=""><div dir="ltr">On Mon, Oct 19, 2015 at 12:50 PM Todd Fiala via lldb-dev <<a href="mailto:lldb-dev@lists.llvm.org" target="_blank">lldb-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi all,<div><br></div><div>I'd like unexpected successes (i.e. tests marked as unexpected failure that in fact pass) to retain the actionable meaning that something is wrong. The wrong part is that either (1) the test now passes consistently and the author of the fix just missed updating the test definition (or perhaps was unaware of the test), or (2) the test is not covering the condition it is testing completely, and some change to the code just happened to make the test pass (due to the test being not comprehensive enough). Either of those requires some sort of adjustment by the developers.</div></div></blockquote></span><div>I'dd add #3. The test is actually flaky but is tagged incorrectly.</div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>We have a category of test known as "flaky" or "flakey" (both are valid spellings, for those who care: <a href="http://www.merriam-webster.com/dictionary/flaky" target="_blank">http://www.merriam-webster.com/dictionary/flaky</a>, although flaky is considered the primary). Flaky tests are tests that we can't get to pass 100% of the time. This might be because it is extremely difficult to write the test as such and deemed not worth the effort, or it is a condition that is just not going to present itself successfully 100% of the time. </div></div></blockquote></span><div>IMO if it's not worth the effort to write the test correctly, we should delete the test. Flaky is useful as a temporary status, but if nobody ends up fixing the flakiness, I think the test should be deleted (more reasons follow).</div><span class=""><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>These are tests we still want to exercise, but we don't want to have them start generating test failures if they don't pass 100% of the time. Currently the flaky test mechanism requires a test to pass one in two times. That is okay for a test that exhibits a slim degree of flakiness. For others, that is not a large enough sample of runs to elicit a successful result. Those tests get marked as XFAIL, and generate a non-actionable "unexpected success" result when they do happen to pass.</div><div><br></div><div>GOAL</div><div><br></div><div>* Enhance expectedFlakey* test decorators. Allow specification of the number of times in which a flaky test should be run to be expected to pass at least once. Call that MAX_RUNS.</div></div></blockquote></span><div>I think it's worth considering it it's a good idea include the date at which they were declared flakey. After a certain amount of time has passed, if it's still flakey they can be relegated to hard failures. I don't think flakey should be a permanent state.</div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>* When running a flaky test, run it up MAX_RUNS number of times. The first time it passes, mark it as a successful test completion. The test event system will be given the number of times it was run before passing. Whether we consume this info or not is TBD (and falls into the purview of the test results formatter).</div></div></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>* If the test does not pass within MAX_RUNS time, mark it as a flaky fail. For purposes of the standard output, this can look like FAIL: (flaky) or something similar so fail scanners still see it. (Note it's highly likely I'll do the normal output counts with the TestResults formatter-based output at the same time, so we get accurate test method counts and the like).</div></div></blockquote></span><div>The concern I have here (and the reason I would like to delete flakey tests if the flakiness isn't removed after certain amount of time) is because some of our tests are slow. Repeating them many times is going to have an impact on how long the test suite takes to run. It's already tripled over the past 3 weeks, and I think we need to be careful to keep out things that have the potential to lead to significant slowness of the test suite runner.<br></div><div> </div></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">-Todd</div></div>
</div>