tests/daemon/daemon
tests/demo/demo
-tests/dlopen/dlopen
tests/exit-fast/exit-fast
tests/fork/fork
tests/fork/fork2
+++ /dev/null
-AM_CPPFLAGS = -I$(top_srcdir)/include
-
-noinst_PROGRAMS = dlopen
-noinst_LTLIBRARIES = libdummy.la
-libdummy_la_SOURCES = libdummy.c
-libdummy_la_LIBADD = $(top_builddir)/libust/libust.la $(top_builddir)/libust-initializer.o
-libdummy_la_LDFLAGS = -rpath /nowhere
-dlopen_SOURCES = dlopen.c
-dlopen_LDADD = $(top_builddir)/libust/libust.la $(top_builddir)/libust-initializer.o
-
-if LTTNG_UST_BUILD_WITH_LIBDL
-dlopen_LDADD += -ldl
-endif
-if LTTNG_UST_BUILD_WITH_LIBC_DL
-dlopen_LDADD += -lc
-endif
-
-noinst_SCRIPTS = run
-EXTRA_DIST = run
+++ /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
- */
-
-/* The aim of this test is to verify whether ust behaves correctly when
- * tracing a marker that is in a dlopen()'d library. It also checks the
- * library can be unloaded.
- */
-
-#include <dlfcn.h>
-#include <stdio.h>
-#include <ust/marker.h>
-
-int main()
-{
- int (*fptr)();
-
- ust_marker(from_main_before_lib, "%s", "Event occured in the main program before"
- " the opening of the library\n");
- void *lib_handle = dlopen("libdummy.so", RTLD_LAZY);
-
- if (lib_handle == NULL) {
- fprintf(stderr, "%s\n", dlerror());
- return 1;
- }
-
- fptr = (int (*)())dlsym(lib_handle, "exported_function");
-
- if ( fptr == NULL) {
- fprintf(stderr, "%s\n", dlerror());
- return 1;
- }
-
- (*fptr)();
- dlclose(lib_handle);
-
- ust_marker(from_main_after_lib,"%s", "Event occured in the main program after "
- "the library has been closed\n");
-
- 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 "dlopen"
-
-plan_tests 4
-USTTRACE="$TESTDIR/../usttrace"
-
-LD_LIBRARY_PATH=$TESTDIR/dlopen/.libs okx $USTTRACE -L $TESTDIR/dlopen/dlopen
-trace_loc=$($USTTRACE -W)
-trace_matches -N "from_library" -n 1 "^ust.from_library:" $trace_loc
-trace_matches -N "from_main_before_lib" -n 1 "^ust.from_main_before_lib:" $trace_loc
-trace_matches -N "from_main_after_lib" -n 1 "^ust.from_main_after_lib:" $trace_loc
+++ /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>
-
-void exported_function()
-{
- ust_marker(from_library, "%s", "Event occured in library function");
-}
+++ /dev/null
-#!/bin/sh
-
-UST_AUTOPROBE=1 UST_TRACE=1 LD_LIBRARY_PATH=./.libs $1 ./dlopen
simple_harness_run ./valgrind_ust-consumerd.sh
-simple_harness_run dlopen/dlopen.sh
-
simple_harness_run same_line_marker/same_line_marker.sh
# This testcase is currently broken, do not run.