Commit a8aa4192 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(PROTECTED_FDS): Added a comment that refers to ../Makefile.am. Check

	that valgrind_fd is set properly.
(lyskomd_host): This is now set in site.exp, not here.
(l2g_start): Use valgrind_fd instead of hardcoding the value.
(spawn_lyskomd): Ditto.
(dbck_run): Ditto.
parent d9a032fa
......@@ -49,8 +49,18 @@ set timeout [expr {3 * $timeout + 2}]
#set timeout 5
# This constant is also defined in src/include/kom-config.h.
# It also affects VALGRIND_FD in ../Makefile.am.
set PROTECTED_FDS [expr 13 + 9]
# The file descriptor used for valgrind support. We use the
# last of the protected FD:s. If this changes, you must
# change VALGRIND_FD in ../Makefile.am.
if {$valgrind_fd != $PROTECTED_FDS - 1} {
error "Mismatch between valgrind_fd ($valgrind_fd) and PROTECTED_FDS ($PROTECTED_FDS)"
}
set valgrind_fd [expr $PROTECTED_FDS - 1]
# Some useful constants.
set nl "\r?\n"
set any "\[ -\]"
......@@ -76,9 +86,6 @@ set stty_init "-echo -onlcr -istrip -isig erase '^-' kill '^-' werase '^-'"
set line_leader ""
set meta_line_leader ""
# Values that show up in protocol messages
set lyskomd_host [lindex [exec ../../libraries/adns/client/adnshost -i 127.0.0.1] 2]
# valgrind support
set valgrindix 0
......@@ -187,11 +194,12 @@ proc l2g_start {} {
global test
global MEMTRACE
global valgrind
global valgrind_fd
obtain_lock
if {$valgrind != ""} {
spawn ./valgrind.wrap valgrind-l2g.log --suppressions=lyskomd.supp --num-callers=40 --leak-check=yes --logfile-fd=25 --show-reachable=yes $l2g
spawn ./valgrind.wrap valgrind-l2g.log --suppressions=lyskomd.supp --num-callers=40 --leak-check=yes --logfile-fd=$valgrind_fd --show-reachable=yes $l2g
} else {
spawn $l2g
}
......@@ -433,6 +441,7 @@ proc unanchored_expect {regex testname} {
proc spawn_lyskomd {logfile arg} {
global valgrind
global spawn_id
global valgrind_fd
set cmd "spawn"
if {$valgrind != ""} {
......@@ -442,7 +451,7 @@ proc spawn_lyskomd {logfile arg} {
set cmd "$cmd --num-callers=40"
set cmd "$cmd --suppressions=lyskomd.supp"
set cmd "$cmd --leak-check=yes"
set cmd "$cmd --logfile-fd=25"
set cmd "$cmd --logfile-fd=$valgrind_fd"
set cmd "$cmd --show-reachable=yes"
}
set cmd "$cmd ../lyskomd"
......@@ -978,9 +987,10 @@ proc dbck_run {} {
global DBCK_MEMTRACE
global valgrind
global spawn_id
global valgrind_fd
if {$valgrind != ""} {
spawn ./valgrind.wrap valgrind-dbck.log --suppressions=lyskomd.supp --num-callers=40 --logfile-fd=25 --show-reachable=yes ../dbck -d config/lyskomd-config
spawn ./valgrind.wrap valgrind-dbck.log --suppressions=lyskomd.supp --num-callers=40 --logfile-fd=$valgrind_fd --show-reachable=yes ../dbck -d config/lyskomd-config
} else {
spawn ../dbck -d config/lyskomd-config
}
......
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