File tree Expand file tree Collapse file tree 5 files changed +41
-8
lines changed
tests_02_syscall_wrappers Expand file tree Collapse file tree 5 files changed +41
-8
lines changed Original file line number Diff line number Diff line change @@ -69,8 +69,17 @@ for mode in debug release; do
69
69
fail " exited successfully but was supposed to fail"
70
70
else
71
71
exit_code=$?
72
- # expecting illegal instruction as it should fail with an unacceptable errno
73
- assert_equal $(( 128 + 4 )) $exit_code # 4 == SIGILL
72
+
73
+ # expecting irrecoverable error as process should be terminated through fatalError/precondition/assert
74
+ architecture=$( uname -m)
75
+ if [[ $architecture =~ ^(arm| aarch) ]]; then
76
+ assert_equal $exit_code $(( 128 + 5 )) # 5 == SIGTRAP aka trace trap, expected on ARM
77
+ elif [[ $architecture =~ ^(x86| i386) ]]; then
78
+ assert_equal $exit_code $(( 128 + 4 )) # 4 == SIGILL aka illegal instruction, expected on x86
79
+ else
80
+ fail " unknown CPU architecture for which we don't know the expected signal for a crash"
81
+ fi
82
+
74
83
if [[ " $mode " == " debug" ]]; then
75
84
grep -q unacceptable\ errno " $temp_file "
76
85
fi
Original file line number Diff line number Diff line change @@ -87,8 +87,17 @@ for mode in debug release; do
87
87
fail " exited successfully but was supposed to fail"
88
88
else
89
89
exit_code=$?
90
- # expecting illegal instruction as it should fail with an unacceptable errno
91
- assert_equal $(( 128 + 4 )) $exit_code # 4 == SIGILL
90
+
91
+ # expecting irrecoverable error as process should be terminated through fatalError/precondition/assert
92
+ architecture=$( uname -m)
93
+ if [[ $architecture =~ ^(arm| aarch) ]]; then
94
+ assert_equal $exit_code $(( 128 + 5 )) # 5 == SIGTRAP aka trace trap, expected on ARM
95
+ elif [[ $architecture =~ ^(x86| i386) ]]; then
96
+ assert_equal $exit_code $(( 128 + 4 )) # 4 == SIGILL aka illegal instruction, expected on x86
97
+ else
98
+ fail " unknown CPU architecture for which we don't know the expected signal for a crash"
99
+ fi
100
+
92
101
if [[ " $mode " == " debug" ]]; then
93
102
grep -q unacceptable\ errno " $temp_file "
94
103
fi
Original file line number Diff line number Diff line change @@ -38,5 +38,14 @@ if "$tmp/test"; then
38
38
fail " should have crashed"
39
39
else
40
40
exit_code=$?
41
- assert_equal $(( 128 + 4 )) $exit_code # 4 == SIGILL
41
+
42
+ # expecting irrecoverable error as process should be terminated through fatalError/precondition/assert
43
+ architecture=$( uname -m)
44
+ if [[ $architecture =~ ^(arm| aarch) ]]; then
45
+ assert_equal $exit_code $(( 128 + 5 )) # 5 == SIGTRAP aka trace trap, expected on ARM
46
+ elif [[ $architecture =~ ^(x86| i386) ]]; then
47
+ assert_equal $exit_code $(( 128 + 4 )) # 4 == SIGILL aka illegal instruction, expected on x86
48
+ else
49
+ fail " unknown CPU architecture for which we don't know the expected signal for a crash"
50
+ fi
42
51
fi
Original file line number Diff line number Diff line change @@ -98,8 +98,14 @@ func main() throws {
98
98
regex: String ,
99
99
runResult: RunResult ) throws -> InterpretedRunResult {
100
100
struct NoOutputFound : Error { }
101
-
102
- guard case . signal( Int ( SIGILL) ) = runResult else {
101
+ #if arch(i386) || arch(x86_64)
102
+ let expectedSignal = SIGILL
103
+ #elseif arch(arm) || arch(arm64)
104
+ let expectedSignal = SIGTRAP
105
+ #else
106
+ #error("unknown CPU architecture for which we don't know the expected signal for a crash")
107
+ #endif
108
+ guard case . signal( Int ( expectedSignal) ) = runResult else {
103
109
return . unexpectedRunResult( runResult)
104
110
}
105
111
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ services:
36
36
- MAX_ALLOCS_ALLOWED_1000_udp_reqs=12050
37
37
- MAX_ALLOCS_ALLOWED_1000_udpbootstraps=2050
38
38
- MAX_ALLOCS_ALLOWED_1000_udpconnections=81050
39
- - MAX_ALLOCS_ALLOWED_1_reqs_1000_conn=405000
39
+ - MAX_ALLOCS_ALLOWED_1_reqs_1000_conn=409000
40
40
- MAX_ALLOCS_ALLOWED_bytebuffer_lots_of_rw=2050
41
41
- MAX_ALLOCS_ALLOWED_creating_10000_headers=0
42
42
- MAX_ALLOCS_ALLOWED_decode_1000_ws_frames=2050
You can’t perform that action at this time.
0 commit comments