]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Added one regression test for each of addrcheck, lackey, and helgrind, each of
authorNicholas Nethercote <njn@valgrind.org>
Fri, 4 Oct 2002 11:35:47 +0000 (11:35 +0000)
committerNicholas Nethercote <njn@valgrind.org>
Fri, 4 Oct 2002 11:35:47 +0000 (11:35 +0000)
which had none previously.  They all run tests/true (added as well), just to
automatically catch any total b0rkage errors.

Also fixed up filter_stderr_basic to account for changes to startup message;
my changes from yesterday broke all the --stable tests.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1179

26 files changed:
addrcheck/Makefile.am
addrcheck/tests/.cvsignore [new file with mode: 0644]
addrcheck/tests/Makefile.am [new file with mode: 0644]
addrcheck/tests/filter_stderr [new file with mode: 0755]
addrcheck/tests/true.stderr.exp [new file with mode: 0644]
addrcheck/tests/true.stderr.exp.hd [new file with mode: 0644]
addrcheck/tests/true.vgtest [new file with mode: 0644]
configure.in
helgrind/Makefile.am
helgrind/tests/.cvsignore [new file with mode: 0644]
helgrind/tests/Makefile.am [new file with mode: 0644]
helgrind/tests/filter_stderr [new file with mode: 0755]
helgrind/tests/true.stderr.exp [new file with mode: 0644]
helgrind/tests/true.stderr.exp.hd [new file with mode: 0644]
helgrind/tests/true.vgtest [new file with mode: 0644]
lackey/Makefile.am
lackey/tests/.cvsignore [new file with mode: 0644]
lackey/tests/Makefile.am [new file with mode: 0644]
lackey/tests/filter_stderr [new file with mode: 0755]
lackey/tests/true.stderr.exp [new file with mode: 0644]
lackey/tests/true.stderr.exp.hd [new file with mode: 0644]
lackey/tests/true.vgtest [new file with mode: 0644]
memcheck/tests/filter_stderr
tests/Makefile.am
tests/filter_stderr_basic
tests/true.c [new file with mode: 0644]

index 69bda72798fcb91990972bb0d4d1bee0c4904d97..27ee63b2532d7604cee9383e264eb8fc2acf8828 100644 (file)
@@ -1,5 +1,5 @@
 
-SUBDIRS = . docs
+SUBDIRS = . docs tests
 
 INCLUDES = -I$(top_srcdir)/include
 
diff --git a/addrcheck/tests/.cvsignore b/addrcheck/tests/.cvsignore
new file mode 100644 (file)
index 0000000..3dda729
--- /dev/null
@@ -0,0 +1,2 @@
+Makefile.in
+Makefile
diff --git a/addrcheck/tests/Makefile.am b/addrcheck/tests/Makefile.am
new file mode 100644 (file)
index 0000000..c667623
--- /dev/null
@@ -0,0 +1,7 @@
+## Process this file with automake to produce Makefile.in
+
+noinst_SCRIPTS = filter_stderr
+
+EXTRA_DIST = \
+       $(noinst_SCRIPTS) \
+       true.stderr.exp true.stderr.exp.hd true.vgtest
diff --git a/addrcheck/tests/filter_stderr b/addrcheck/tests/filter_stderr
new file mode 100755 (executable)
index 0000000..e7668ba
--- /dev/null
@@ -0,0 +1,8 @@
+#! /bin/sh
+
+# Same as for MemCheck
+
+dir=`dirname $0`
+
+$dir/../../memcheck/tests/filter_stderr
+
diff --git a/addrcheck/tests/true.stderr.exp b/addrcheck/tests/true.stderr.exp
new file mode 100644 (file)
index 0000000..c4aa6f0
--- /dev/null
@@ -0,0 +1,7 @@
+
+
+ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
+malloc/free: in use at exit: 0 bytes in 0 blocks.
+malloc/free: 0 allocs, 0 frees, 0 bytes allocated.
+For a detailed leak analysis,  rerun with: --leak-check=yes
+For counts of detected errors, rerun with: -v
diff --git a/addrcheck/tests/true.stderr.exp.hd b/addrcheck/tests/true.stderr.exp.hd
new file mode 100644 (file)
index 0000000..c4aa6f0
--- /dev/null
@@ -0,0 +1,7 @@
+
+
+ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
+malloc/free: in use at exit: 0 bytes in 0 blocks.
+malloc/free: 0 allocs, 0 frees, 0 bytes allocated.
+For a detailed leak analysis,  rerun with: --leak-check=yes
+For counts of detected errors, rerun with: -v
diff --git a/addrcheck/tests/true.vgtest b/addrcheck/tests/true.vgtest
new file mode 100644 (file)
index 0000000..24fc0a4
--- /dev/null
@@ -0,0 +1 @@
+prog: ../../tests/true
index 5ff0954afae1c12fbd67fd1b263951267248e8db..29918087e223ce175cb9abb0349d9b844a017749 100644 (file)
@@ -303,20 +303,23 @@ AC_OUTPUT(
    coregrind/docs/Makefile
    coregrind/valgrind
    addrcheck/Makefile
+   addrcheck/tests/Makefile
    addrcheck/docs/Makefile
    memcheck/Makefile
    memcheck/tests/Makefile
    memcheck/docs/Makefile
    cachegrind/Makefile
-   cachegrind/cg_annotate
    cachegrind/tests/Makefile
    cachegrind/docs/Makefile
+   cachegrind/cg_annotate
    corecheck/Makefile
    corecheck/tests/Makefile
    corecheck/docs/Makefile
    helgrind/Makefile
+   helgrind/tests/Makefile
    helgrind/docs/Makefile
    lackey/Makefile
+   lackey/tests/Makefile
    lackey/docs/Makefile
    none/Makefile
    none/tests/Makefile
index 677ef16ab5023813e8ab298fab5c6e83d909f0a8..f6e37579c073b44aee23dbec3f73fc450cca6816 100644 (file)
@@ -1,5 +1,5 @@
 
-SUBDIRS = . docs
+SUBDIRS = . docs tests
 
 CFLAGS = $(WERROR) -DVG_LIBDIR="\"$(libdir)"\" \
                -Winline -Wall -Wshadow -O -fomit-frame-pointer @PREFERRED_STACK_BOUNDARY@ -g
diff --git a/helgrind/tests/.cvsignore b/helgrind/tests/.cvsignore
new file mode 100644 (file)
index 0000000..3dda729
--- /dev/null
@@ -0,0 +1,2 @@
+Makefile.in
+Makefile
diff --git a/helgrind/tests/Makefile.am b/helgrind/tests/Makefile.am
new file mode 100644 (file)
index 0000000..c667623
--- /dev/null
@@ -0,0 +1,7 @@
+## Process this file with automake to produce Makefile.in
+
+noinst_SCRIPTS = filter_stderr
+
+EXTRA_DIST = \
+       $(noinst_SCRIPTS) \
+       true.stderr.exp true.stderr.exp.hd true.vgtest
diff --git a/helgrind/tests/filter_stderr b/helgrind/tests/filter_stderr
new file mode 100755 (executable)
index 0000000..0f1c570
--- /dev/null
@@ -0,0 +1,16 @@
+#! /bin/sh
+
+# Same as for MemCheck
+
+dir=`dirname $0`
+
+$dir/../../tests/filter_stderr_basic |
+
+# Output looks like...
+#
+# ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
+# [0] = { }
+# ==27116== 0 possible data races found
+
+sed "/ERROR SUMMARY:/ , /0 possible data races found/ d"
+
diff --git a/helgrind/tests/true.stderr.exp b/helgrind/tests/true.stderr.exp
new file mode 100644 (file)
index 0000000..139597f
--- /dev/null
@@ -0,0 +1,2 @@
+
+
diff --git a/helgrind/tests/true.stderr.exp.hd b/helgrind/tests/true.stderr.exp.hd
new file mode 100644 (file)
index 0000000..139597f
--- /dev/null
@@ -0,0 +1,2 @@
+
+
diff --git a/helgrind/tests/true.vgtest b/helgrind/tests/true.vgtest
new file mode 100644 (file)
index 0000000..24fc0a4
--- /dev/null
@@ -0,0 +1 @@
+prog: ../../tests/true
index da6e4e0c763b33a30d250ec72b97b5b12f87ff7a..572bd043c4f0a874132823c1f9749c785c611625 100644 (file)
@@ -1,5 +1,5 @@
 
-SUBDIRS = . docs
+SUBDIRS = . docs tests
 
 CFLAGS = $(WERROR) -DVG_LIBDIR="\"$(libdir)"\" \
                -Winline -Wall -Wshadow -O -fomit-frame-pointer @PREFERRED_STACK_BOUNDARY@ -g
diff --git a/lackey/tests/.cvsignore b/lackey/tests/.cvsignore
new file mode 100644 (file)
index 0000000..3dda729
--- /dev/null
@@ -0,0 +1,2 @@
+Makefile.in
+Makefile
diff --git a/lackey/tests/Makefile.am b/lackey/tests/Makefile.am
new file mode 100644 (file)
index 0000000..c667623
--- /dev/null
@@ -0,0 +1,7 @@
+## Process this file with automake to produce Makefile.in
+
+noinst_SCRIPTS = filter_stderr
+
+EXTRA_DIST = \
+       $(noinst_SCRIPTS) \
+       true.stderr.exp true.stderr.exp.hd true.vgtest
diff --git a/lackey/tests/filter_stderr b/lackey/tests/filter_stderr
new file mode 100755 (executable)
index 0000000..6fd7ebd
--- /dev/null
@@ -0,0 +1,29 @@
+#! /bin/sh
+
+dir=`dirname $0`
+
+$dir/../../tests/filter_stderr_basic    |
+
+# Output looks like this...
+#
+# Counted 53 calls to _dl_runtime_resolve()
+#  
+#  Executed:
+#    BBs:         47131
+#    x86 instrs:  193330
+#    UInstrs:     523996
+#  
+#  Jccs:
+#    total:       36368
+#    % taken:     58%
+#  
+#  Ratios:
+#    x86 instrs : BB        =  41 : 10
+#       UInstrs : BB        = 111 : 10
+#       UInstrs : x86_instr =  27 : 10
+#
+# ...so chop all lines between first and last (inclusive)
+sed "/^Counted [0-9]\+ calls to _dl_runtime_resolve()$/ ,   \
+     /UInstrs : x86_instrs = [0-9]\+ : [0-9]\+/             \
+     d"
+
diff --git a/lackey/tests/true.stderr.exp b/lackey/tests/true.stderr.exp
new file mode 100644 (file)
index 0000000..139597f
--- /dev/null
@@ -0,0 +1,2 @@
+
+
diff --git a/lackey/tests/true.stderr.exp.hd b/lackey/tests/true.stderr.exp.hd
new file mode 100644 (file)
index 0000000..c4aa6f0
--- /dev/null
@@ -0,0 +1,7 @@
+
+
+ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
+malloc/free: in use at exit: 0 bytes in 0 blocks.
+malloc/free: 0 allocs, 0 frees, 0 bytes allocated.
+For a detailed leak analysis,  rerun with: --leak-check=yes
+For counts of detected errors, rerun with: -v
diff --git a/lackey/tests/true.vgtest b/lackey/tests/true.vgtest
new file mode 100644 (file)
index 0000000..24fc0a4
--- /dev/null
@@ -0,0 +1 @@
+prog: ../../tests/true
index e654aa3f8d9afdbf52aa4b13e8da45f903ba2b8b..511dca07bf4de8951ec8b990d446f0215c7129f4 100755 (executable)
@@ -1,7 +1,5 @@
 #! /bin/sh
 
-# Skip first four lines (valgrind intro)  
-
 dir=`dirname $0`
 
 $dir/../../tests/filter_stderr_basic                    |
index 09d5de7e19cf9e7b88288e62a00ee8608a995eee..5a63e0ac331677d713e0ca83c183fbd734ec9506 100644 (file)
@@ -10,6 +10,15 @@ noinst_SCRIPTS = \
        filter_stderr_basic \
        filter_test_paths
 
+noinst_PROGRAMS = \
+       true
+
+CFLAGS   = $(WERROR) -Winline -Wall -Wshadow -g
+CXXFLAGS = $(CFLAGS)
+
+# generic C ones
+true_SOURCES   = true.c
+
 EXTRA_DIST = \
        $(noinst_SCRIPTS) \
        blocked_syscall.c \
index 398ce6368d4df5cd1c2ab736a8c93d0b5cc5b804..72e8b59ed19ac0508cee7dab1801a67112e761da 100755 (executable)
@@ -6,8 +6,12 @@
 # Remove ==pid== and --pid-- and ++pid++ strings 
 sed "s/\(==\|--\|++\)[0-9]\{3,5\}\1 //"                                |
 
-# Remove "<name>, a <description> for x86-linux." line and the following
-# copyright notice line
+# Remove intro line for 1.0.X branch
+sed "/valgrind-.*, a memory error detector for x86 GNU\/Linux./d"       |
+sed "/cachegrind-.*, an I1.D1.L2 cache profiler for x86 GNU\/Linux./d"  |
+
+# Remove "<name>, a <description> for x86-linux." line 
+# and the following copyright notice line for post-1.0.X branch
 sed "/^.*, .* for x86-linux\./ , /./ d"                                | 
 
 # Remove other introductory lines
diff --git a/tests/true.c b/tests/true.c
new file mode 100644 (file)
index 0000000..e0d6d5d
--- /dev/null
@@ -0,0 +1,4 @@
+int main(void)
+{
+   return 0;
+}