futriix/tests/integration/logging.tcl
John Sully 949270801e Signals can happen on any thread, so look for the signal handler not the command on the callstack
Former-commit-id: f1d2b2945007f8811528b197480e255c6b35559c
2019-10-24 23:30:08 -04:00

25 lines
833 B
Tcl

set server_path [tmpdir server.log]
set system_name [string tolower [exec uname -s]]
if {$system_name eq {linux} || $system_name eq {darwin}} {
start_server [list overrides [list dir $server_path]] {
test "Server is able to generate a stack trace on selected systems" {
r config set watchdog-period 200
r debug sleep 1
set pattern "*watchdogSignalHandler*"
set retry 10
while {$retry} {
set result [exec tail -100 < [srv 0 stdout]]
if {[string match $pattern $result]} {
break
}
incr retry -1
after 1000
}
if {$retry == 0} {
error "assertion:expected stack trace not found into log file"
}
}
}
}