Merge "init: don't generate tombstones for expected test failures" am: 0b8d2fef69 am: 2a90da3ea8
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1529980 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I96debd5144ce163cdab07a7018208858e17658f4
This commit is contained in:
commit
2d50616415
2 changed files with 4 additions and 0 deletions
|
|
@ -79,6 +79,8 @@ TEST(firmware_handler, HandleAbort) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int HandleAbort(int argc, char** argv) {
|
int HandleAbort(int argc, char** argv) {
|
||||||
|
// Since this is an expected failure, disable debuggerd to not generate a tombstone.
|
||||||
|
signal(SIGABRT, SIG_DFL);
|
||||||
abort();
|
abort();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -202,6 +202,8 @@ BuiltinFunctionMap BuildTestFunctionMap() {
|
||||||
|
|
||||||
// For RecoverAfterAbort
|
// For RecoverAfterAbort
|
||||||
auto do_cause_log_fatal = [](const BuiltinArguments& args) -> Result<void> {
|
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');
|
return Error() << std::string(4097, 'f');
|
||||||
};
|
};
|
||||||
auto do_generate_sane_error = [](const BuiltinArguments& args) -> Result<void> {
|
auto do_generate_sane_error = [](const BuiltinArguments& args) -> Result<void> {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue