Remove outdated dlopen test
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 20 Feb 2013 20:36:51 +0000 (15:36 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 26 Mar 2013 15:22:02 +0000 (11:22 -0400)
Using dlopen to load the tracepoint providers is now discouraged as
specified in the lttng-ust man page.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
.gitignore
tests/dlopen/Makefile.am [deleted file]
tests/dlopen/dlopen.c [deleted file]
tests/dlopen/dlopen.sh [deleted file]
tests/dlopen/libdummy.c [deleted file]
tests/dlopen/run [deleted file]
tests/runtests

index 41a2f020c0665072edd4f164220a893a68b2b4e9..c34870a6c3bc893e83586e9935fbd75267b5444a 100644 (file)
@@ -33,7 +33,6 @@ ust-consumerd/ust-consumerd
 
 tests/daemon/daemon
 tests/demo/demo
-tests/dlopen/dlopen
 tests/exit-fast/exit-fast
 tests/fork/fork
 tests/fork/fork2
diff --git a/tests/dlopen/Makefile.am b/tests/dlopen/Makefile.am
deleted file mode 100644 (file)
index de05346..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-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
diff --git a/tests/dlopen/dlopen.c b/tests/dlopen/dlopen.c
deleted file mode 100644 (file)
index ae20902..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/* 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;
-}
diff --git a/tests/dlopen/dlopen.sh b/tests/dlopen/dlopen.sh
deleted file mode 100755 (executable)
index 673fdbc..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/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
diff --git a/tests/dlopen/libdummy.c b/tests/dlopen/libdummy.c
deleted file mode 100644 (file)
index dd694c2..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-/* 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");
-}
diff --git a/tests/dlopen/run b/tests/dlopen/run
deleted file mode 100755 (executable)
index eabab27..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-UST_AUTOPROBE=1 UST_TRACE=1 LD_LIBRARY_PATH=./.libs $1 ./dlopen
index e669210e27ae8fb6c046e75cc4524be48016e4a3..de8b25a334b09c2621391c0a7d1721f2c7bf8da0 100755 (executable)
@@ -39,8 +39,6 @@ simple_harness_run ./manual_mode_tracing.sh
 
 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.
This page took 0.02847 seconds and 4 git commands to generate.