This new test is up to date and re-enabled strictly as a build test.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
tests/hello/hello
tests/hello.cxx/hello
-tests/same_line_marker/same_line_marker
+tests/same_line_tracepoint/same_line_tracepoint
tests/ust-basic-tracing/ust-basic-tracing
tests/ust-multi-test/ust-multi-test
tests/trace_event/trace_event_test
tests/hello/Makefile
tests/hello-static-lib/Makefile
tests/hello.cxx/Makefile
+ tests/same_line_tracepoint/Makefile
tests/ust-basic-tracing/Makefile
tests/ust-multi-test/Makefile
lttng-ust.pc
-SUBDIRS = . hello hello-static-lib
+SUBDIRS = . hello hello-static-lib same_line_tracepoint
#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
libtap_a_SOURCES = \
tap.c \
tap.h
-
simple_harness_run ./valgrind_ust-consumerd.sh
-simple_harness_run same_line_marker/same_line_marker.sh
-
# This testcase is currently broken, do not run.
# simple_harness_run tracepoint/run
+++ /dev/null
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/libust
-
-noinst_PROGRAMS = same_line_marker
-same_line_marker_SOURCES = same_line_marker.c
-same_line_marker_LDADD = $(top_builddir)/libust/libust.la $(top_builddir)/libust-initializer.o
-
-noinst_SCRIPTS = run
-EXTRA_DIST = run
+++ /dev/null
-#!/bin/sh
-
-UST_AUTOPROBE=1 UST_TRACE=1 LD_LIBRARY_PATH=../libust/.libs $1 ./same_line_marker
+++ /dev/null
-/* Copyright (C) 2010 Oussama El Mfadli, Alexis Hallé
- *
- * 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; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * 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 <ust/marker.h>
-
-int main()
-{
- ust_marker(same_line_event, "%s","An event occured in the same line"); ust_marker(same_line_event, "%s","An event occured in the same line");
- return 0;
-}
+++ /dev/null
-#!/bin/bash
-#
-# Copyright 2010 Ericsson AB
-#
-# This file is part of LTTng-UST.
-#
-# LTTng-UST is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# LTTng-UST 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 General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with LTTng-UST. If not, see <http://www.gnu.org/licenses/>.
-
-TESTDIR=$(dirname $0)/..
-
-source $TESTDIR/test_functions.sh
-source $TESTDIR/tap.sh
-
-starttest "same_line_marker"
-
-plan_tests 2
-USTTRACE="$TESTDIR/../usttrace"
-
-okx $USTTRACE -L $TESTDIR/same_line_marker/same_line_marker
-trace_loc=$($USTTRACE -W)
-trace_matches -N "same_line_event" -n 2 "^ust.same_line_event:" $trace_loc
--- /dev/null
+AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include -Wsystem-headers
+
+noinst_PROGRAMS = same_line_tracepoint
+same_line_tracepoint_SOURCES = same_line_tracepoint.c ust_tests_sameline.h
+same_line_tracepoint_LDADD = $(top_builddir)/liblttng-ust/liblttng-ust.la
+
+if LTTNG_UST_BUILD_WITH_LIBDL
+same_line_tracepoint_LDADD += -ldl
+endif
+if LTTNG_UST_BUILD_WITH_LIBC_DL
+same_line_tracepoint_LDADD += -lc
+endif
--- /dev/null
+Same line tracepoint test
+-------------------------
+
+This is a build test that verifies multiple tracepoint can be placed on a single
+line.
--- /dev/null
+/* Copyright (C) 2013 Jérémie Galarneau
+ *
+ * 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; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * 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
+ */
+
+#define TRACEPOINT_DEFINE
+#define TRACEPOINT_CREATE_PROBES
+#include "ust_tests_sameline.h"
+
+int main()
+{
+ tracepoint(ust_tests_sameline, event1); tracepoint(ust_tests_sameline, event2);
+ return 0;
+}
--- /dev/null
+#undef TRACEPOINT_PROVIDER
+#define TRACEPOINT_PROVIDER ust_tests_sameline
+
+#if !defined(_TRACEPOINT_UST_TESTS_SAMELINE_H) || defined(TRACEPOINT_HEADER_MULTI_READ)
+#define _TRACEPOINT_UST_TESTS_SAMELINE_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Copyright (C) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ *
+ * 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 <lttng/tracepoint.h>
+
+TRACEPOINT_EVENT(ust_tests_sameline, event1,
+ TP_ARGS(),
+ TP_FIELDS()
+)
+TRACEPOINT_LOGLEVEL(ust_tests_sameline, event1, TRACE_CRIT)
+
+TRACEPOINT_EVENT(ust_tests_sameline, event2,
+ TP_ARGS(),
+ TP_FIELDS()
+)
+TRACEPOINT_LOGLEVEL(ust_tests_sameline, event2, TRACE_CRIT)
+
+#endif /* _TRACEPOINT_UST_TESTS_SAMELINE_H */
+
+#undef TRACEPOINT_INCLUDE
+#define TRACEPOINT_INCLUDE "./ust_tests_sameline.h"
+
+/* This part must be outside ifdef protection */
+#include <lttng/tracepoint-event.h>
+
+#ifdef __cplusplus
+}
+#endif