wolfpld / tracy

Frame profiler
https://tracy.nereid.pl/
Other
10.24k stars 691 forks source link

[test] Trigger failures via USR1/USR2 #833

Closed Arpafaucon closed 4 months ago

Arpafaucon commented 4 months ago

Add signal handlers to trigger special conditions in tracy-test. This proves useful when working on the capture utility to check edge conditions.

USR1: abort the program

example of call & output

maim_2024-07-17T17-01-39+02-00

in the profiler:

maim_2024-07-17T16-38-32+02-00

USR2: send buggy TracyFree event, to trigger an instrumentation failure

❯ timeout --signal USR2 0.4 ./tracy-test
Triggering instrumentation failure
terminate called without an active exception
timeout: the monitored command dumped core

maim_2024-07-17T17-01-09+02-00