summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/all.tcl23
-rw-r--r--tests/pkgIndex.tcl2
-rw-r--r--tools/valgrind_suppress33
-rw-r--r--unix/Makefile.in4
4 files changed, 51 insertions, 11 deletions
diff --git a/tests/all.tcl b/tests/all.tcl
index ad372db..d6434fb 100644
--- a/tests/all.tcl
+++ b/tests/all.tcl
@@ -14,18 +14,23 @@ package prefer latest
package require Tcl 8.5-
package require tcltest 2.2
namespace import tcltest::*
-configure {*}$argv -testdir [file dir [info script]]
-if {[singleProcess]} {
- interp debug {} -frame 1
-}
-set testsdir [file dirname [file dirname [file normalize [info script]/...]]]
-lappend auto_path $testsdir {*}[apply {{testsdir args} {
- lmap x $args {
+apply {args {
+ global auto_path
+ set testsdir [file dirname [file dirname [file normalize [
+ info script]/...]]]
+
+ configure {*}$args -testdir $testsdir
+
+ if {[singleProcess]} {
+ interp debug {} -frame 1
+ }
+
+ set auto_path [lmap x $auto_path[set auto_path {}] {
if {$x eq $testsdir} continue
lindex $x
- }
-}} $testsdir {*}$auto_path]
+ }]
+}} {*}$argv
runAllTests
proc exit args {}
diff --git a/tests/pkgIndex.tcl b/tests/pkgIndex.tcl
index 0feb0eb..854b943 100644
--- a/tests/pkgIndex.tcl
+++ b/tests/pkgIndex.tcl
@@ -1,6 +1,6 @@
#! /usr/bin/env tclsh
package ifneeded tcltests 0.1 "
- source [list $dir]/tcltests.tcl
+ source [list $dir/tcltests.tcl]
package provide tcltests 0.1
"
diff --git a/tools/valgrind_suppress b/tools/valgrind_suppress
new file mode 100644
index 0000000..e8f0204
--- /dev/null
+++ b/tools/valgrind_suppress
@@ -0,0 +1,33 @@
+{
+ TclpGetPwNam/getpwname_r/__nss_next2/calloc
+ Memcheck:Leak
+ match-leak-kinds: reachable
+ fun:calloc
+ ...
+ fun:__nss_next2
+ ...
+ fun:TclpGetPwNam
+}
+
+{
+ TclpGetPwNam/getpwname_r/__nss_next2/malloc
+ Memcheck:Leak
+ match-leak-kinds: reachable
+ fun:malloc
+ ...
+ fun:__nss_next2
+ ...
+ fun:TclpGetPwNam
+}
+
+{
+ TclpGetPwNam/getpwname_r/_nss_systemd_getpwnam_r/malloc
+ Memcheck:Leak
+ match-leak-kinds: reachable
+ fun:malloc
+ ...
+ fun:_nss_systemd_getpwnam_r
+ ...
+ fun:TclpGetPwNam
+}
+
diff --git a/unix/Makefile.in b/unix/Makefile.in
index 4277fad..060148f 100644
--- a/unix/Makefile.in
+++ b/unix/Makefile.in
@@ -262,7 +262,9 @@ GDB = gdb
TRACE = strace
TRACE_OPTS =
VALGRIND = valgrind
-VALGRINDARGS = --tool=memcheck --num-callers=8 --leak-resolution=high --leak-check=yes --show-reachable=yes -v
+VALGRINDARGS = --tool=memcheck --num-callers=24 \
+ --leak-resolution=high --leak-check=yes --show-reachable=yes -v \
+ --suppressions=$(TOOL_DIR)/valgrind_suppress
#--------------------------------------------------------------------------
# The information below should be usable as is. The configure script won't