From: Pierre-Marc Fournier Date: Tue, 8 Sep 2009 17:56:39 +0000 (-0400) Subject: add basic_long test program X-Git-Tag: v0.1~156 X-Git-Url: http://git.liburcu.org/?p=ust.git;a=commitdiff_plain;h=5f04cdcbbea9d600b3f325dd739b217ab2a8f78a add basic_long test program --- diff --git a/configure.ac b/configure.ac index a8accce..500765b 100644 --- a/configure.ac +++ b/configure.ac @@ -81,6 +81,8 @@ AC_CONFIG_FILES([ tests/Makefile tests/hello/Makefile tests/hello2/Makefile + tests/basic/Makefile + tests/basic_long/Makefile libmallocwrap/Makefile libinterfork/Makefile ustd/Makefile diff --git a/tests/Makefile.am b/tests/Makefile.am index 0308483..644b80f 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1 +1 @@ -SUBDIRS = hello hello2 +SUBDIRS = hello hello2 basic basic_long diff --git a/tests/basic_long/Makefile.am b/tests/basic_long/Makefile.am new file mode 100644 index 0000000..219be7a --- /dev/null +++ b/tests/basic_long/Makefile.am @@ -0,0 +1,9 @@ +INCLUDES = -I$(top_builddir)/share -I$(top_builddir)/libust \ + $(KCOMPAT_CFLAGS) $(URCU_CFLAGS) + +noinst_PROGRAMS = basic_long +basic_long_SOURCES = basic_long.c +basic_long_LDADD = $(top_builddir)/libust/libust.la $(URCU_LIBS) + +noinst_SCRIPTS = run +EXTRA_DIST = run diff --git a/tests/basic_long/basic_long.c b/tests/basic_long/basic_long.c new file mode 100644 index 0000000..29f26ef --- /dev/null +++ b/tests/basic_long/basic_long.c @@ -0,0 +1,20 @@ +#include +#include + +#include "marker.h" + + +int main() +{ + printf("Basic test program\n"); + + for(;;) { + trace_mark(ust, bar, "str %s", "FOOBAZ"); + trace_mark(ust, bar2, "number1 %d number2 %d", 53, 9800); + usleep(1000000); + } + + return 0; +} + +MARKER_LIB; diff --git a/tests/basic_long/run b/tests/basic_long/run new file mode 100755 index 0000000..a137ed2 --- /dev/null +++ b/tests/basic_long/run @@ -0,0 +1,8 @@ +#!/bin/sh + +# Run with nothing + + +#LD_LIBRARY_PATH=../../libust/.libs:../../../liburcu $1 .libs/basic +#UST_AUTOPROBE="/foo" LD_LIBRARY_PATH=../../libust/.libs:../../../liburcu $1 .libs/basic +UST_AUTOPROBE=1 UST_TRACE=1 LD_LIBRARY_PATH=../../libust/.libs:../../../liburcu $1 .libs/basic_long