From: Jérémie Galarneau Date: Thu, 21 Feb 2013 22:07:18 +0000 (-0500) Subject: Remove demo test X-Git-Tag: v2.2.0-rc1~23 X-Git-Url: http://git.lttng.org/?p=lttng-ust.git;a=commitdiff_plain;h=b96787d23b84a303d49058c68c382c43b6b53625 Remove demo test Moved to lttng-tools. Signed-off-by: Jérémie Galarneau --- diff --git a/.gitignore b/.gitignore index d50ff3a8..128dac38 100644 --- a/.gitignore +++ b/.gitignore @@ -32,7 +32,6 @@ ustctl/ustctl ust-consumerd/ust-consumerd tests/daemon/daemon -tests/demo/demo tests/exit-fast/exit-fast tests/fork/fork tests/fork/fork2 diff --git a/configure.ac b/configure.ac index 0d63749b..a08643ee 100644 --- a/configure.ac +++ b/configure.ac @@ -286,7 +286,6 @@ AC_CONFIG_FILES([ tests/hello-static-lib/Makefile tests/hello.cxx/Makefile tests/daemon/Makefile - tests/demo/Makefile tests/fork/Makefile tests/ust-basic-tracing/Makefile tests/ust-multi-test/Makefile diff --git a/tests/Makefile.am b/tests/Makefile.am index 9eee9d9c..dd383bc7 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = . hello hello-static-lib fork demo daemon +SUBDIRS = . hello hello-static-lib fork daemon #ust-basic-tracing ust-multi-test #SUBDIRS = . hello2 basic basic_long simple_include snprintf test-nevents test-libustinstr-malloc dlopen same_line_marker trace_event register_test tracepoint libustctl_function_tests exit-fast diff --git a/tests/demo/Makefile.am b/tests/demo/Makefile.am deleted file mode 100644 index 47849e66..00000000 --- a/tests/demo/Makefile.am +++ /dev/null @@ -1,50 +0,0 @@ -# -Wsystem-headers is needed to print warnings in the tracepoint -# description file. -AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include -Wsystem-headers - -# Set LIBS to nothing so the application does not link on useless -# libraries. -LIBS = - -if NO_SHARED -# Do not build this test if shared libraries support was -# explicitly disabled. -else -# Force the shared flag on the noinst libraries since they are -# only built static by default -FORCE_SHARED_LIB_OPTIONS = -module -shared -avoid-version \ - -rpath $(abs_builddir) - -noinst_LTLIBRARIES = liblttng-ust-provider-ust-tests-demo.la \ - liblttng-ust-provider-ust-tests-demo3.la - -#contains ust_tests_demo.h and ust_tests_demo2.h provider probes -liblttng_ust_provider_ust_tests_demo_la_SOURCES = \ - tp.c ust_tests_demo.h \ - tp2.c ust_tests_demo2.h -liblttng_ust_provider_ust_tests_demo_la_LIBADD = \ - $(top_builddir)/liblttng-ust/liblttng-ust.la -liblttng_ust_provider_ust_tests_demo_la_LDFLAGS = \ - $(FORCE_SHARED_LIB_OPTIONS) - -#contains ust_tests_demo3.h provider probes -liblttng_ust_provider_ust_tests_demo3_la_SOURCES = \ - tp3.c ust_tests_demo3.h -liblttng_ust_provider_ust_tests_demo3_la_LIBADD = \ - $(top_builddir)/liblttng-ust/liblttng-ust.la -liblttng_ust_provider_ust_tests_demo3_la_LDFLAGS = \ - $(FORCE_SHARED_LIB_OPTIONS) - -EXTRA_DIST = demo-trace - -noinst_PROGRAMS = demo -demo_SOURCES = demo.c ust_tests_demo.h -# The demo program only depends on libdl/libc for dlopen(). -if LTTNG_UST_BUILD_WITH_LIBDL -demo_LDADD = -ldl -endif -if LTTNG_UST_BUILD_WITH_LIBC_DL -demo_LDADD = -lc -endif - -endif diff --git a/tests/demo/README b/tests/demo/README deleted file mode 100644 index 03ee4ee1..00000000 --- a/tests/demo/README +++ /dev/null @@ -1,27 +0,0 @@ -This is a demo application used to test the LTTng userspace tracer. - -demo-trace shell script preloads the provider shared objects before -executing the demo. Executing "demo" without the shell wrapper will not -provide any tracing support. This ensures the demo binary can be -distributed on distros without depending on having liblttng-ust.so in -place. Note: the "demo" program must be compiled with "-ldl" on Linux, -with "-lc" on BSD. - -The simplest command to trace the demo program are: -lttng create -lttng enable-event -u -a -lttng start -./demo-trace -lttng destroy - -That will create a trace in your $HOME/lttng-traces directory. - -The resulting babeltrace output should look like this: -[554297567999315] ust_tests_demo:starting: { 1 }, { value = 123 } -[554297568020834] ust_tests_demo2:loop: { 1 }, { intfield = 0, intfield2 = 0x0, longfield = 0, netintfield = 0, netintfieldhex = 0x0, arrfield1 = [ [0] = 1, [1] = 2, [2] = 3 ], arrfield2 = "test", _seqfield1_length = 4, seqfield1 = [ [0] = 116, [1] = 101, [2] = 115, [3] = 116 ], _seqfield2_length = 4, seqfield2 = "test", stringfield = "test", floatfield = 2222, doublefield = 2 } -[554297568024780] ust_tests_demo2:loop: { 1 }, { intfield = 1, intfield2 = 0x1, longfield = 1, netintfield = 1, netintfieldhex = 0x1, arrfield1 = [ [0] = 1, [1] = 2, [2] = 3 ], arrfield2 = "test", _seqfield1_length = 4, seqfield1 = [ [0] = 116, [1] = 101, [2] = 115, [3] = 116 ], _seqfield2_length = 4, seqfield2 = "test", stringfield = "test", floatfield = 2222, doublefield = 2 } -[554297568027050] ust_tests_demo2:loop: { 1 }, { intfield = 2, intfield2 = 0x2, longfield = 2, netintfield = 2, netintfieldhex = 0x2, arrfield1 = [ [0] = 1, [1] = 2, [2] = 3 ], arrfield2 = "test", _seqfield1_length = 4, seqfield1 = [ [0] = 116, [1] = 101, [2] = 115, [3] = 116 ], _seqfield2_length = 4, seqfield2 = "test", stringfield = "test", floatfield = 2222, doublefield = 2 } -[554297568029014] ust_tests_demo2:loop: { 1 }, { intfield = 3, intfield2 = 0x3, longfield = 3, netintfield = 3, netintfieldhex = 0x3, arrfield1 = [ [0] = 1, [1] = 2, [2] = 3 ], arrfield2 = "test", _seqfield1_length = 4, seqfield1 = [ [0] = 116, [1] = 101, [2] = 115, [3] = 116 ], _seqfield2_length = 4, seqfield2 = "test", stringfield = "test", floatfield = 2222, doublefield = 2 } -[554297568030861] ust_tests_demo2:loop: { 1 }, { intfield = 4, intfield2 = 0x4, longfield = 4, netintfield = 4, netintfieldhex = 0x4, arrfield1 = [ [0] = 1, [1] = 2, [2] = 3 ], arrfield2 = "test", _seqfield1_length = 4, seqfield1 = [ [0] = 116, [1] = 101, [2] = 115, [3] = 116 ], _seqfield2_length = 4, seqfield2 = "test", stringfield = "test", floatfield = 2222, doublefield = 2 } -[554297568033138] ust_tests_demo:done: { 1 }, { value = 456 } -[554297568034533] ust_tests_demo3:done: { 1 }, { value = 42 } diff --git a/tests/demo/demo-trace b/tests/demo/demo-trace deleted file mode 100755 index 88a1be73..00000000 --- a/tests/demo/demo-trace +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -LD_PRELOAD=.libs/liblttng-ust-provider-ust-tests-demo.so:.libs/liblttng-ust-provider-ust-tests-demo3.so ./demo ${*} diff --git a/tests/demo/demo.c b/tests/demo/demo.c deleted file mode 100644 index e2b61c2e..00000000 --- a/tests/demo/demo.c +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (C) 2009 Pierre-Marc Fournier - * Copyright (C) 2011 Mathieu Desnoyers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; version 2.1 of - * the License. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define TRACEPOINT_DEFINE -#define TRACEPOINT_PROBE_DYNAMIC_LINKAGE -#include "ust_tests_demo.h" -#include "ust_tests_demo2.h" -#include "ust_tests_demo3.h" - -int main(int argc, char **argv) -{ - int i, netint; - long values[] = { 1, 2, 3 }; - char text[10] = "test"; - double dbl = 2.0; - float flt = 2222.0; - int delay = 0; - - if (argc == 2) - delay = atoi(argv[1]); - - fprintf(stderr, "Demo program starting.\n"); - - sleep(delay); - - fprintf(stderr, "Tracing... "); - tracepoint(ust_tests_demo, starting, 123); - for (i = 0; i < 5; i++) { - netint = htonl(i); - tracepoint(ust_tests_demo2, loop, i, netint, values, - text, strlen(text), dbl, flt); - } - tracepoint(ust_tests_demo, done, 456); - tracepoint(ust_tests_demo3, done, 42); - fprintf(stderr, " done.\n"); - return 0; -} diff --git a/tests/demo/tp.c b/tests/demo/tp.c deleted file mode 100644 index 8e44db40..00000000 --- a/tests/demo/tp.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * tp.c - * - * Copyright (c) 2011 Mathieu Desnoyers - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#define TRACEPOINT_CREATE_PROBES -#include "ust_tests_demo.h" diff --git a/tests/demo/tp2.c b/tests/demo/tp2.c deleted file mode 100644 index ba45c23b..00000000 --- a/tests/demo/tp2.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * tp2.c - * - * Copyright (c) 2011 Mathieu Desnoyers - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#define TRACEPOINT_CREATE_PROBES -#include "ust_tests_demo2.h" diff --git a/tests/demo/tp3.c b/tests/demo/tp3.c deleted file mode 100644 index 5f97651d..00000000 --- a/tests/demo/tp3.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * tp3.c - * - * Copyright (c) 2011 Mathieu Desnoyers - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#define TRACEPOINT_CREATE_PROBES -#include "ust_tests_demo3.h" diff --git a/tests/demo/ust_tests_demo.h b/tests/demo/ust_tests_demo.h deleted file mode 100644 index b27d5399..00000000 --- a/tests/demo/ust_tests_demo.h +++ /dev/null @@ -1,71 +0,0 @@ -#undef TRACEPOINT_PROVIDER -#define TRACEPOINT_PROVIDER ust_tests_demo - -#if !defined(_TRACEPOINT_UST_TESTS_DEMO_H) || defined(TRACEPOINT_HEADER_MULTI_READ) -#define _TRACEPOINT_UST_TESTS_DEMO_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Copyright (C) 2011 Mathieu Desnoyers - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include - -TRACEPOINT_EVENT(ust_tests_demo, starting, - TP_ARGS(int, value), - TP_FIELDS( - ctf_integer(int, value, value) - ) -) -TRACEPOINT_LOGLEVEL(ust_tests_demo, starting, TRACE_CRIT) - -/* - * Dummy model information, just for example. TODO: we should check if - * EMF model URI have some standard format we should follow. - */ -TRACEPOINT_MODEL_EMF_URI(ust_tests_demo, starting, - "http://example.com/path_to_model?q=ust_tests_demo:starting") - -TRACEPOINT_EVENT(ust_tests_demo, done, - TP_ARGS(int, value), - TP_FIELDS( - ctf_integer(int, value, value) - ) -) -TRACEPOINT_LOGLEVEL(ust_tests_demo, done, TRACE_CRIT) - -TRACEPOINT_MODEL_EMF_URI(ust_tests_demo, done, - "http://example.com/path_to_model?q=ust_tests_demo:done") - -#endif /* _TRACEPOINT_UST_TESTS_DEMO_H */ - -#undef TRACEPOINT_INCLUDE -#define TRACEPOINT_INCLUDE "./ust_tests_demo.h" - -/* This part must be outside ifdef protection */ -#include - -#ifdef __cplusplus -} -#endif diff --git a/tests/demo/ust_tests_demo2.h b/tests/demo/ust_tests_demo2.h deleted file mode 100644 index 25d42ad1..00000000 --- a/tests/demo/ust_tests_demo2.h +++ /dev/null @@ -1,68 +0,0 @@ -#undef TRACEPOINT_PROVIDER -#define TRACEPOINT_PROVIDER ust_tests_demo2 - -#if !defined(_TRACEPOINT_UST_TESTS_DEMO2_H) || defined(TRACEPOINT_HEADER_MULTI_READ) -#define _TRACEPOINT_UST_TESTS_DEMO2_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Copyright (C) 2011 Mathieu Desnoyers - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include - -TRACEPOINT_EVENT(ust_tests_demo2, loop, - TP_ARGS(int, anint, int, netint, long *, values, - char *, text, size_t, textlen, - double, doublearg, float, floatarg), - TP_FIELDS( - ctf_integer(int, intfield, anint) - ctf_integer_hex(int, intfield2, anint) - ctf_integer(long, longfield, anint) - ctf_integer_network(int, netintfield, netint) - ctf_integer_network_hex(int, netintfieldhex, netint) - ctf_array(long, arrfield1, values, 3) - ctf_array_text(char, arrfield2, text, 10) - ctf_sequence(char, seqfield1, text, - size_t, textlen) - ctf_sequence_text(char, seqfield2, text, - size_t, textlen) - ctf_string(stringfield, text) - ctf_float(float, floatfield, floatarg) - ctf_float(double, doublefield, doublearg) - ) -) -TRACEPOINT_LOGLEVEL(ust_tests_demo2, loop, TRACE_WARNING) - -#endif /* _TRACEPOINT_UST_TESTS_DEMO2_H */ - -#undef TRACEPOINT_INCLUDE -#define TRACEPOINT_INCLUDE "./ust_tests_demo2.h" - -/* This part must be outside ifdef protection */ -#include - -#ifdef __cplusplus -} -#endif diff --git a/tests/demo/ust_tests_demo3.h b/tests/demo/ust_tests_demo3.h deleted file mode 100644 index c7b63dd8..00000000 --- a/tests/demo/ust_tests_demo3.h +++ /dev/null @@ -1,53 +0,0 @@ -#undef TRACEPOINT_PROVIDER -#define TRACEPOINT_PROVIDER ust_tests_demo3 - -#if !defined(_TRACEPOINT_UST_TESTS_DEMO3_H) || defined(TRACEPOINT_HEADER_MULTI_READ) -#define _TRACEPOINT_UST_TESTS_DEMO3_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Copyright (C) 2011 Mathieu Desnoyers - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include - -TRACEPOINT_EVENT(ust_tests_demo3, done, - TP_ARGS(int, value), - TP_FIELDS( - ctf_integer(int, value, value) - ) -) -TRACEPOINT_LOGLEVEL(ust_tests_demo3, done, TRACE_WARNING) - -#endif /* _TRACEPOINT_UST_TESTS_DEMO3_H */ - -#undef TRACEPOINT_INCLUDE -#define TRACEPOINT_INCLUDE "./ust_tests_demo3.h" - -/* This part must be outside ifdef protection */ -#include - -#ifdef __cplusplus -} -#endif