[lldb] Set return status to failed when adding a command error
There is a common pattern: result.AppendError(...); result.SetStatus(eReturnStatusFailed); I found that some commands don't actually "fail" but only print "error: ..." because the second line got missed. This can cause you to miss a failed command when you're using the Python interface during testing. (and produce some confusing script results) I did not find any place where you would want to add an error without setting the return status, so just set eReturnStatusFailed whenever you add an error to a command result. This change does not remove any of the now redundant SetStatus. This should allow us to see if there are any tests that have commands unexpectedly fail with this change. (the test suite passes for me but I don't have access to all the systems we cover so there could be some corner cases) Some tests that failed on x86 and AArch64 have been modified to work with the new behaviour. Differential Revision: https://reviews.llvm.org/D103701
Loading
Please register or sign in to comment