From 5f04cdcbbea9d600b3f325dd739b217ab2a8f78a Mon Sep 17 00:00:00 2001 From: Pierre-Marc Fournier Date: Tue, 8 Sep 2009 13:56:39 -0400 Subject: [PATCH] add basic_long test program --- configure.ac | 2 ++ tests/Makefile.am | 2 +- tests/basic_long/Makefile.am | 9 +++++++++ tests/basic_long/basic_long.c | 20 ++++++++++++++++++++ tests/basic_long/run | 8 ++++++++ 5 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 tests/basic_long/Makefile.am create mode 100644 tests/basic_long/basic_long.c create mode 100755 tests/basic_long/run diff --git a/configure.ac b/configure.ac index a8accce4..500765b7 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 0308483d..644b80f1 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 00000000..219be7a7 --- /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 00000000..29f26ef9 --- /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 00000000..a137ed2f --- /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 -- 2.34.1