mdbx-test: add coredump status.

Change-Id: I9003a891744eb78d91a3e279e20efcb4c1ad736c
This commit is contained in:
Leonid Yuriev 2019-07-07 02:33:35 +03:00
parent 7e1e142104
commit 30ac62ceec
4 changed files with 17 additions and 4 deletions

View File

@ -38,7 +38,8 @@ enum actor_status {
as_running,
as_successful,
as_killed,
as_failed
as_failed,
as_coredump,
};
const char *testcase2str(const actor_testcase);

View File

@ -199,7 +199,9 @@ retry:
if (WIFEXITED(status))
childs[pid] =
(WEXITSTATUS(status) == EXIT_SUCCESS) ? as_successful : as_failed;
else if (WIFSIGNALED(status) || WCOREDUMP(status))
else if (WCOREDUMP(status))
childs[pid] = as_coredump;
else if (WIFSIGNALED(status))
childs[pid] = as_killed;
else if (WIFSTOPPED(status))
childs[pid] = as_debuging;

View File

@ -312,14 +312,22 @@ actor_status osal_actor_info(const mdbx_pid_t pid) {
case EXIT_SUCCESS:
status = as_successful;
break;
// case EXCEPTION_BREAKPOINT:
case EXCEPTION_BREAKPOINT:
case EXCEPTION_SINGLE_STEP:
status = as_debuging;
break;
case STATUS_CONTROL_C_EXIT:
case EXCEPTION_NONCONTINUABLE_EXCEPTION:
status = as_killed;
break;
case EXCEPTION_ACCESS_VIOLATION:
case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
case EXCEPTION_DATATYPE_MISALIGNMENT:
case EXCEPTION_STACK_OVERFLOW:
case EXCEPTION_INVALID_DISPOSITION:
case EXCEPTION_ILLEGAL_INSTRUCTION:
case EXCEPTION_NONCONTINUABLE_EXCEPTION:
status = as_coredump;
break;
default:
status = as_failed;
break;

View File

@ -55,6 +55,8 @@ const char *status2str(actor_status status) {
return "killed";
case as_failed:
return "failed";
case as_coredump:
return "coredump";
}
}