From: Pierre-Marc Fournier Date: Tue, 2 Mar 2010 20:04:07 +0000 (-0500) Subject: tests: add test-libmallocwrap X-Git-Tag: v0.4~53 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=e6ef41119258799ca3720c5f2c5af4db327b2720;p=ust.git tests: add test-libmallocwrap --- diff --git a/configure.ac b/configure.ac index f0c99e6..e428a49 100644 --- a/configure.ac +++ b/configure.ac @@ -120,6 +120,7 @@ AC_CONFIG_FILES([ tests/simple_include/Makefile tests/snprintf/Makefile tests/test-nevents/Makefile + tests/test-libmallocwrap/Makefile libmallocwrap/Makefile libinterfork/Makefile ustd/Makefile diff --git a/tests/Makefile.am b/tests/Makefile.am index eca4e20..2429332 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,3 +1,3 @@ -SUBDIRS = hello hello2 basic basic_long fork simple_include snprintf test-nevents +SUBDIRS = hello hello2 basic basic_long fork simple_include snprintf test-nevents test-libmallocwrap noinst_SCRIPTS = test_loop runtests trace_matches diff --git a/tests/test-libmallocwrap/Makefile.am b/tests/test-libmallocwrap/Makefile.am new file mode 100644 index 0000000..502d6c4 --- /dev/null +++ b/tests/test-libmallocwrap/Makefile.am @@ -0,0 +1,5 @@ +#AM_CPPFLAGS = -I$(top_srcdir)/include + +noinst_PROGRAMS = prog +prog_SOURCES = prog.c +prog_LDADD = $(top_builddir)/libust/libust.la $(top_builddir)/libust-initializer.o diff --git a/tests/test-libmallocwrap/prog.c b/tests/test-libmallocwrap/prog.c new file mode 100644 index 0000000..6958a77 --- /dev/null +++ b/tests/test-libmallocwrap/prog.c @@ -0,0 +1,28 @@ +#include +#include + +#define N_ITER 1000 + +int main() +{ + int i; + const char teststr[] = "Hello World! 1234567890abc"; + void *ptrs[N_ITER]; + + for(i=0; i