[Lldb-commits] [PATCH] D43048: [lldb-test/WIP] Allow a way to test autocompletion
Zachary Turner via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Feb 12 12:48:00 PST 2018
zturner added a comment.
In https://reviews.llvm.org/D43048#1005513, @jasonmolenda wrote:
> No, the unwind unittests that exist today should stay written as unit tests. These are testing the conversion of native unwind formats -- for instance, eh_frame, compact unwind, or instruction analysis -- into the intermediate UnwindPlan representation in lldb. They are runtime invariant, unit tests are the best approach to these. If there were anything to say about these, it would be that we need more testing here - armv7 (AArch32) into UnwindPlan is not tested. eh_frame and compact_unwind into UnwindPlan is not tested.
That's exactly the type of thing that FileCheck tests work best for. I'm not sure why you're saying that unittests are better than FileCheck tests for this scenario.
> The part of unwind that is difficult to test is the runtime unwind behavior, and FileCheck style tests don't make that easier in any way. We need a live register context, stack memory, symbols and UnwindPlans to test this correctly -- we either need a full ProcessMock with SymbolVendorMock etc, or we need corefiles, or we need tests with hand-written assembly code.
I don't think we'd necessarily need a live register context or stack memory. A mock register context and stack memory should be sufficient, with an emulator that understands only a handful of instructions.
More information about the lldb-commits