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

Original change: https://android-review.googlesource.com/c/platform/system/core/+/1529980

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I3768f2b74e0fd943636f599a15dd919c9a768178
This commit is contained in:
Treehugger Robot 2020-12-15 18:48:18 +00:00 committed by Automerger Merge Worker
commit 2a90da3ea8
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> {