From: Julian Seward Date: Sun, 22 Jan 2006 01:08:40 +0000 (+0000) Subject: Test to check that cachegrind's BB_info management system isn't X-Git-Tag: svn/VALGRIND_3_2_0~332 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=15519cf9760baa8c6cda6cffd61f6dbb2301939e;p=thirdparty%2Fvalgrind.git Test to check that cachegrind's BB_info management system isn't confused by function wrapping. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5579 --- diff --git a/cachegrind/tests/Makefile.am b/cachegrind/tests/Makefile.am index 15c35060b6..7370c04bd1 100644 --- a/cachegrind/tests/Makefile.am +++ b/cachegrind/tests/Makefile.am @@ -23,11 +23,13 @@ noinst_SCRIPTS = filter_stderr filter_cachesim_discards EXTRA_DIST = $(noinst_SCRIPTS) \ chdir.vgtest chdir.stderr.exp \ clreq.vgtest clreq.stderr.exp \ - dlclose.vgtest dlclose.stderr.exp dlclose.stdout.exp + dlclose.vgtest dlclose.stderr.exp dlclose.stdout.exp \ + wrap5.vgtest wrap5.stderr.exp wrap5.stdout.exp check_PROGRAMS = \ - chdir clreq dlclose myprint.so + chdir clreq dlclose myprint.so wrap5 +AM_CPPFLAGS = -I$(top_srcdir)/include AM_CFLAGS = $(WERROR) -Winline -Wall -Wshadow -g $(AM_FLAG_M3264_PRI) # C ones diff --git a/cachegrind/tests/wrap5.c b/cachegrind/tests/wrap5.c new file mode 120000 index 0000000000..c8e8aa496f --- /dev/null +++ b/cachegrind/tests/wrap5.c @@ -0,0 +1 @@ +../../memcheck/tests/wrap5.c \ No newline at end of file diff --git a/cachegrind/tests/wrap5.stderr.exp b/cachegrind/tests/wrap5.stderr.exp new file mode 100644 index 0000000000..8eaf65446c --- /dev/null +++ b/cachegrind/tests/wrap5.stderr.exp @@ -0,0 +1,17 @@ + + +I refs: +I1 misses: +L2i misses: +I1 miss rate: +L2i miss rate: + +D refs: +D1 misses: +L2d misses: +D1 miss rate: +L2d miss rate: + +L2 refs: +L2 misses: +L2 miss rate: diff --git a/cachegrind/tests/wrap5.stdout.exp b/cachegrind/tests/wrap5.stdout.exp new file mode 100644 index 0000000000..1924a84185 --- /dev/null +++ b/cachegrind/tests/wrap5.stdout.exp @@ -0,0 +1,37 @@ +computing fact1(7) +in wrapper1-pre: fact(7) +in wrapper2-pre: fact(6) +in wrapper1-pre: fact(5) +in wrapper2-pre: fact(4) +in wrapper1-pre: fact(3) +in wrapper2-pre: fact(2) +in wrapper1-pre: fact(1) +in wrapper2-pre: fact(0) +in wrapper2-post: fact(0) = 1 +in wrapper1-post: fact(1) = 1 +in wrapper2-post: fact(2) = 2 +in wrapper1-post: fact(3) = 6 +in wrapper2-pre: fact(2) +in wrapper1-pre: fact(1) +in wrapper2-pre: fact(0) +in wrapper2-post: fact(0) = 1 +in wrapper1-post: fact(1) = 1 +in wrapper2-post: fact(2) = 2 +in wrapper2-post: fact(4) = 32 +in wrapper1-post: fact(5) = 160 +in wrapper2-pre: fact(2) +in wrapper1-pre: fact(1) +in wrapper2-pre: fact(0) +in wrapper2-post: fact(0) = 1 +in wrapper1-post: fact(1) = 1 +in wrapper2-post: fact(2) = 2 +in wrapper2-post: fact(6) = 972 +in wrapper1-post: fact(7) = 6804 +in wrapper2-pre: fact(2) +in wrapper1-pre: fact(1) +in wrapper2-pre: fact(0) +in wrapper2-post: fact(0) = 1 +in wrapper1-post: fact(1) = 1 +in wrapper2-post: fact(2) = 2 +fact1(7) = 6806 +allocated 51 Lards diff --git a/cachegrind/tests/wrap5.vgtest b/cachegrind/tests/wrap5.vgtest new file mode 100644 index 0000000000..add0500d1b --- /dev/null +++ b/cachegrind/tests/wrap5.vgtest @@ -0,0 +1,2 @@ +prog: wrap5 +cleanup: rm cachegrind.out.*