Skip to content

Commit

Permalink
fix(test) fixed fail e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
YYChen01988 committed Jan 27, 2025
1 parent 3495623 commit 76f493e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ static const char bsg_native_signal_code_names[BSG_HANDLED_SIGNAL_COUNT +
"Trace/breakpoint trap, code 4 (TRAP_HWBKPT)",
"Trace/breakpoint trap, code 5 (TRAP_UNK)",
"Trace/breakpoint trap, code 6 (TRAP_PERF)"},
{},
{0},
{"Bus error (bad memory access), code 1 (BUS_ADRALN)",
"Bus error (bad memory access), code 2 (BUS_ADRERR)",
"Bus error (bad memory access), code 3 (BUS_OBJERR)",
Expand Down Expand Up @@ -280,7 +280,7 @@ void bsg_handle_signal(int signum, siginfo_t *info,
sizeof(bsg_global_env->next_event.error.errorClass));

const char *error_message = bsg_get_signal_code_description(signal);
if (error_message == NULL) {
if (error_message == NULL || *error_message == 0) {
error_message = (char *)bsg_native_signal_msgs[i];
}
bsg_strncpy(bsg_global_env->next_event.error.errorMessage, error_message,
Expand Down
8 changes: 4 additions & 4 deletions features/full_tests/native_crash_handling.feature
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ Feature: Native crash reporting
| SIGILL |
| SIGTRAP |
And the exception "message" equals one of:
| Illegal instruction |
| Trace/breakpoint trap |
| Illegal instruction, code 4 (ILLTRP) |
| Trace/breakpoint trap, code 5 (TRAP_UNK) |
And the exception "type" equals "c"
And the event "severity" equals "error"
And the event "unhandled" is true
Expand Down Expand Up @@ -132,8 +132,8 @@ Feature: Native crash reporting
| SIGILL |
| SIGTRAP |
And the exception "message" equals one of:
| Illegal instruction |
| Trace/breakpoint trap |
| Illegal instruction, code 4 (ILLTRP) |
| Trace/breakpoint trap, code 5 (TRAP_UNK) |
And the exception "type" equals "c"
And the first significant stack frames match:
| something_innocuous | libmonochrome.so | (ignore) |
Expand Down
8 changes: 4 additions & 4 deletions features/full_tests/native_signal_raise.feature
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Feature: Raising native signals
And the error payload contains a completed unhandled native report
And the exception "errorClass" equals "SIGILL"
And the exception "message" equals one of:
| Illegal instruction |
| Trace/breakpoint trap |
| Illegal instruction, code 4 (ILLTRP) |
| Trace/breakpoint trap, code 5 (TRAP_UNK) |
And the exception "type" equals "c"
And the event "severity" equals "error"
And the event "unhandled" is true
Expand Down Expand Up @@ -55,7 +55,7 @@ Feature: Raising native signals
And I wait to receive an error
And the error payload contains a completed unhandled native report
And the exception "errorClass" equals "SIGFPE"
And the exception "message" equals "Floating-point exception"
And the exception "message" equals "Floating-point exception, code 8 (FPE_FLTSUB)"
And the exception "type" equals "c"
And the event "severity" equals "error"
And the event "unhandled" is true
Expand All @@ -66,7 +66,7 @@ Feature: Raising native signals
And I wait to receive an error
And the error payload contains a completed unhandled native report
And the exception "errorClass" equals "SIGTRAP"
And the exception "message" equals "Trace/breakpoint trap"
And the exception "message" equals "Trace/breakpoint trap, code 5 (TRAP_UNK)"
And the exception "type" equals "c"
And the event "severity" equals "error"
And the event "unhandled" is true

0 comments on commit 76f493e

Please sign in to comment.