Commit 17b63fb5 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(lyskomd_start): Handle TRACED_ALLOCATIONS.

(lyskomd_fail_start): Likewise.
parent 44d8dbb3
......@@ -5,6 +5,10 @@ set attach 0
# Set this to 1 if test-l2g was linked with Electric Fence.
set efence 0
# Set MEMTRACE to the file where the trace should be sent.
# This is typically the tty where you are running the attached gdb.
# set MEMTRACE /dev/null
# Set the timeout value to something small for quicker testing
# set timeout 5
......@@ -211,6 +215,8 @@ proc lyskomd_start {{aux_item_conf_file ""} \
global lyskomd_pid
global top_srcdir
global debug_calls
global mem_trace
global MEMTRACE
if { $aux_item_conf_file == "" } {
set aux_item_conf_file $aux_item_default_conf_file
......@@ -263,7 +269,25 @@ proc lyskomd_start {{aux_item_conf_file ""} \
set t $timeout
set timeout [expr {2 * $timeout}]
set debug_calls 0
set mem_trace 0
set unattached $attach
expect {
-re "Where does the trace want to go today. .stderr." {
pass "Tracing is activated ($MEMTRACE)"
if {$unattached} {
send_user "Please attach to lyskomd pid $pid and hit RETURN\n"
set timeout 3600
set t 3600
expect_user {
-re .
}
send_user "Continuing with timeout set to $timeout\n"
set unattached 0
}
send "$MEMTRACE\n"
set mem_trace 1
continue -expect
}
-re "WARNING: This server was compiled with --with-debug-calls" {
pass "debug calls are enabled"
set debug_calls 1
......@@ -276,7 +300,7 @@ proc lyskomd_start {{aux_item_conf_file ""} \
}
set timeout $t
if {$attach} {
if {$unattached} {
send_user "Please attach to lyskomd process $pid and press RETURN\n"
set timeout 3600
expect_user {
......@@ -303,6 +327,7 @@ proc lyskomd_fail_start {{aux_item_conf_file "" }
global aux_item_default_conf_file
global lyskomd_pid
global top_srcdir
global MEMTRACE
if { $aux_item_conf_file == "" } {
set aux_item_conf_file $aux_item_default_conf_file
......@@ -352,6 +377,11 @@ proc lyskomd_fail_start {{aux_item_conf_file "" }
set timeout [expr {2 * $timeout}]
expect {
-re "Where does the trace want to go today. .stderr." {
pass "Tracing is activated ($MEMTRACE)"
send "$MEMTRACE\n"
continue -expect
}
-re "Search for the core" { pass "$test" }
timeout {fail "$test (timeout)" }
buffer_full {fail "$test (buffer_full)" }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment