From: Pierre-Marc Fournier Date: Tue, 2 Mar 2010 05:46:31 +0000 (-0500) Subject: tests: add test-nevents X-Git-Tag: v0.4~56 X-Git-Url: http://git.lttng.org/?p=ust.git;a=commitdiff_plain;h=25ea915c3c33bf3aafa4436b66a6699f0292bb4b tests: add test-nevents --- diff --git a/configure.ac b/configure.ac index 514a1f4..f0c99e6 100644 --- a/configure.ac +++ b/configure.ac @@ -119,6 +119,7 @@ AC_CONFIG_FILES([ tests/fork/Makefile tests/simple_include/Makefile tests/snprintf/Makefile + tests/test-nevents/Makefile libmallocwrap/Makefile libinterfork/Makefile ustd/Makefile diff --git a/tests/Makefile.am b/tests/Makefile.am index abe446e..061f5e2 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1 +1 @@ -SUBDIRS = hello hello2 basic basic_long fork simple_include snprintf +SUBDIRS = hello hello2 basic basic_long fork simple_include snprintf test-nevents diff --git a/tests/test-nevents/Makefile.am b/tests/test-nevents/Makefile.am new file mode 100644 index 0000000..502d6c4 --- /dev/null +++ b/tests/test-nevents/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-nevents/prog.c b/tests/test-nevents/prog.c new file mode 100644 index 0000000..71c03e0 --- /dev/null +++ b/tests/test-nevents/prog.c @@ -0,0 +1,23 @@ +#include +#include +#include + +#define N_ITER 100000 + +int main() +{ + int i; + const char teststr[] = "Hello World! 1234567890abc"; + void *ptrs[N_ITER]; + + for(i=0; i