Merge "init: don't generate tombstones for expected test failures"

This commit is contained in:
Treehugger Robot 2020-12-15 18:22:09 +00:00 committed by Gerrit Code Review
commit 0b8d2fef69
2 changed files with 4 additions and 0 deletions

View file

@ -79,6 +79,8 @@ TEST(firmware_handler, HandleAbort) {
}
int HandleAbort(int argc, char** argv) {
// Since this is an expected failure, disable debuggerd to not generate a tombstone.
signal(SIGABRT, SIG_DFL);
abort();
return 0;
}

View file

@ -202,6 +202,8 @@ BuiltinFunctionMap BuildTestFunctionMap() {
// For RecoverAfterAbort
auto do_cause_log_fatal = [](const BuiltinArguments& args) -> Result<void> {
// Since this is an expected failure, disable debuggerd to not generate a tombstone.
signal(SIGABRT, SIG_DFL);
return Error() << std::string(4097, 'f');
};
auto do_generate_sane_error = [](const BuiltinArguments& args) -> Result<void> {