@@ -30,24 +30,18 @@ var skip_frames: AddrArray = undefined;
30
30
const expect_signal_frame_overflow =
31
31
(native_arch == .arm and link_libc ); // loops above main()
32
32
33
- // not reliably loopy?
34
- // ((native_arch == .aarch64 or
35
- // native_arch == .aarch64_be) and !link_libc); // loops on first step
36
-
37
33
// Getting the backtrace inside the signal handler (with the ucontext_t)
38
34
// does not contain the expected content on some systems:
39
35
const expect_signal_frame_useless =
40
36
(native_arch == .x86_64 and link_libc and builtin .abi .isGnu ()) or // stuck on pthread_kill?
41
37
(native_arch == .x86_64 and link_libc and builtin .abi .isMusl () and builtin .omit_frame_pointer ) or // immediately confused backtrace
42
- //((native_arch == .aarch64 or
43
- // native_arch == .aarch64_be) and link_libc) or // loops on first step -- not reliably loopy?
44
38
(native_arch == .riscv64 and link_libc ) or // `ucontext_t` not defined yet
45
39
native_arch == .mips or
46
40
native_arch == .mipsel or
47
41
native_arch == .mips64 or
48
42
native_arch == .mips64el or
49
43
native_arch == .powerpc64 or
50
- native_arch == .powerpc64le ; // loops on first step
44
+ native_arch == .powerpc64le ;
51
45
52
46
// Signal handler to test backtraces from the given signal context.
53
47
fn testFromSigUrg (sig : i32 , info : * const posix.siginfo_t , ctx_ptr : ? * anyopaque ) callconv (.c ) void {
@@ -249,14 +243,13 @@ pub fn main() !void {
249
243
}
250
244
251
245
if (signal_frames .len == signal_frames .capacity ()) {
252
- std .debug .print ("signal_frames contains too many frames: {}\n " , .{signal_frames .len });
253
- fail_count += 1 ;
254
- }
255
-
256
- if (expect_signal_frame_overflow ) {
257
- // The signal_frames backtrace overflows. Ignore this for now.
258
- try testing .expectEqual (1 , fail_count );
259
- fail_count = 0 ;
246
+ if (expect_signal_frame_overflow ) {
247
+ // The signal_frames backtrace overflows. Ignore this for now.
248
+ std .debug .print ("(expected) signal_frames overflow: {}\n " , .{signal_frames .len });
249
+ } else {
250
+ std .debug .print ("signal_frames contains too many frames: {}\n " , .{signal_frames .len });
251
+ fail_count += 1 ;
252
+ }
260
253
}
261
254
262
255
var found = false ;
@@ -276,7 +269,6 @@ pub fn main() !void {
276
269
found = true ;
277
270
}
278
271
}
279
- //try testing.expectEqual(found, true);
280
272
if (! found ) {
281
273
std .debug .print ("full_frames[...] does not include expected[0..4]\n " , .{});
282
274
fail_count += 1 ;
@@ -294,12 +286,10 @@ pub fn main() !void {
294
286
found = true ;
295
287
}
296
288
}
297
- //try testing.expectEqual(found, true);
298
- if (expect_signal_frame_useless ) {
299
- std .debug .print ("(expected) signal_frames[...] does not include expected[0..4]\n " , .{});
300
- try testing .expectEqual (false , found );
301
- } else {
302
- if (! found ) {
289
+ if (! found ) {
290
+ if (expect_signal_frame_useless ) {
291
+ std .debug .print ("(expected) signal_frames[...] does not include expected[0..4]\n " , .{});
292
+ } else {
303
293
std .debug .print ("signal_frames[...] does not include expected[0..4]\n " , .{});
304
294
fail_count += 1 ;
305
295
}
0 commit comments