Writing tests that are<br><br>A) as easy as possible to write and understand<br>B) built on a multiprocessing infrastructure that is battle tested and known to not be flaky<br>C) Familiar to other llvm developers, so as to not discourage subject matter experts from other areas to make relevant improvements to LLDB<br><br><br>For example, I assume you are on board at least to some extent with lldbinline tests. After all, they're simpler than the other style of test. Now, suppose there were some hypothetical DSL that allowed every test to be an inline test but still test equally complicated scenarios in half the code. Then suppose it also ran on a more robust multiprocessing infrastructure than dotest.py. That's all we're really talking about<br><div class="gmail_quote"><div dir="ltr">On Wed, May 31, 2017 at 12:06 PM Jim Ingham via lldb-commits <<a href="mailto:lldb-commits@lists.llvm.org">lldb-commits@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">Before we get past "it's hard" to "just to do it", it would help me to be clear first on what you are actually trying to achieve with this proposal. It's not clear to me what problem are people trying to solve here? If it is writing tests for the decomposable parts of lldb - like the tests Jason wrote for the unwinder recently - why was the gtest path not a good way to do this? If it is rewriting the parts of the testsuite that exercise the debugger on live targets what would a lit-based suite do that we can't do with the current testsuite? Or maybe you are thinking of some other good I'm missing?<br>
<br>
Jim<br>
<br>
<br>
> On May 31, 2017, at 10:37 AM, Zachary Turner via Phabricator via lldb-commits <<a href="mailto:lldb-commits@lists.llvm.org" target="_blank">lldb-commits@lists.llvm.org</a>> wrote:<br>
><br>
> zturner added a comment.<br>
><br>
> In <a href="https://reviews.llvm.org/D32930#767820" rel="noreferrer" target="_blank">https://reviews.llvm.org/D32930#767820</a>, @beanz wrote:<br>
><br>
>> One small comment below. In general I agree with the thoughts here, and I think that this is a huge step forward for testing the debug server components.<br>
>><br>
>> I also agree with Zachary in principal that it would be nice to come up with lit-based test harnesses for more parts of LLDB, although I'm skeptical about whether or not that is actually the best way to test the debug server pieces. Either way, this is a huge step forward from what we have today, so we should go with it.<br>
><br>
><br>
> It would be nice if, at some point, we could move past "It's hard" and start getting into the details of what's hard about it. (Note this goes for LLDB client as well as lldb server). I see a lot of general hand-wavy comments about how conditionals are needed, or variables, etc, but that doesn't really do anything to convince me that it's hard. After all, we wrote a C++ compiler! And I'm pretty sure that the compiler-rt and sanitizer test suite is just as complicated as, if not more complicated than any hypothetical lldb test suite. And those have been solved.<br>
><br>
> What *would* help would be to ignore how difficult it may or may not be, and just take a couple of tests and re-write them in some DSL that you invent specifically for this purpose that is as concise as possible yet as expressive as you need, and we go from there. I did this with a couple of fairly hairy tests a few months ago and it didn't seem that bad to me.<br>
><br>
> The thing is, the set of people who are experts on the client side of LLDB and the set of people who are experts on the client side of LLVM/lit/etc are mostly disjoint, so nothing is ever going to happen without some sort of collaboration. For example, I'm more than willing to help out writing the lit bits of it, but I would need a specification of what the test language needs to look like to support all of the use cases. And someone else has to provide that since we want to get the design right. Even if implementing the language is hard, deciding what it needs to look like is supposed to be the easy part!<br>
><br>
><br>
> <a href="https://reviews.llvm.org/D32930" rel="noreferrer" target="_blank">https://reviews.llvm.org/D32930</a><br>
><br>
><br>
><br>
> _______________________________________________<br>
> lldb-commits mailing list<br>
> <a href="mailto:lldb-commits@lists.llvm.org" target="_blank">lldb-commits@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits</a><br>
<br>
_______________________________________________<br>
lldb-commits mailing list<br>
<a href="mailto:lldb-commits@lists.llvm.org" target="_blank">lldb-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits</a><br>
</blockquote></div>