From b38b81a062463d8d17270074b6618aee762693a2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Wed, 20 Feb 2013 17:54:37 -0500 Subject: [PATCH] Remove daemon test MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Moved to lttng-tools. Signed-off-by: Jérémie Galarneau --- .gitignore | 1 - configure.ac | 1 - tests/Makefile.am | 2 +- tests/daemon/Makefile.am | 16 ---------- tests/daemon/README | 2 -- tests/daemon/daemon.c | 53 ------------------------------- tests/daemon/run | 3 -- tests/daemon/ust_tests_daemon.h | 55 --------------------------------- 8 files changed, 1 insertion(+), 132 deletions(-) delete mode 100644 tests/daemon/Makefile.am delete mode 100644 tests/daemon/README delete mode 100644 tests/daemon/daemon.c delete mode 100755 tests/daemon/run delete mode 100644 tests/daemon/ust_tests_daemon.h diff --git a/.gitignore b/.gitignore index 128dac38..ee3b5da9 100644 --- a/.gitignore +++ b/.gitignore @@ -31,7 +31,6 @@ lttng-ust.pc ustctl/ustctl ust-consumerd/ust-consumerd -tests/daemon/daemon tests/exit-fast/exit-fast tests/fork/fork tests/fork/fork2 diff --git a/configure.ac b/configure.ac index a08643ee..937e48d4 100644 --- a/configure.ac +++ b/configure.ac @@ -285,7 +285,6 @@ AC_CONFIG_FILES([ tests/hello/Makefile tests/hello-static-lib/Makefile tests/hello.cxx/Makefile - tests/daemon/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 dd383bc7..704c346a 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = . hello hello-static-lib fork daemon +SUBDIRS = . hello hello-static-lib fork #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/daemon/Makefile.am b/tests/daemon/Makefile.am deleted file mode 100644 index e6418266..00000000 --- a/tests/daemon/Makefile.am +++ /dev/null @@ -1,16 +0,0 @@ -AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include -Wsystem-headers - -noinst_PROGRAMS = daemon -daemon_SOURCES = daemon.c ust_tests_daemon.h -daemon_LDADD = $(top_builddir)/liblttng-ust/liblttng-ust.la \ - $(top_builddir)/liblttng-ust-fork/liblttng-ust-fork.la - -if LTTNG_UST_BUILD_WITH_LIBDL -daemon_LDADD += -ldl -endif -if LTTNG_UST_BUILD_WITH_LIBC_DL -daemon_LDADD += -lc -endif - -noinst_SCRIPTS = run -EXTRA_DIST = run diff --git a/tests/daemon/README b/tests/daemon/README deleted file mode 100644 index 3c96cb68..00000000 --- a/tests/daemon/README +++ /dev/null @@ -1,2 +0,0 @@ -This test checks if tracing works correctly in a child process created by -a daemon() call. diff --git a/tests/daemon/daemon.c b/tests/daemon/daemon.c deleted file mode 100644 index c53074e7..00000000 --- a/tests/daemon/daemon.c +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (C) 2009 Pierre-Marc Fournier - * Copyright (C) 2011-2012 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 - -#define TRACEPOINT_DEFINE -#define TRACEPOINT_CREATE_PROBES -#include "ust_tests_daemon.h" - -int main(int argc, char **argv, char *env[]) -{ - int result; - - if (argc < 1) { - fprintf(stderr, "usage: daemon\n"); - exit(1); - } - - printf("daemon test program, parent pid is %d\n", getpid()); - tracepoint(ust_tests_daemon, before_daemon); - - result = daemon(0, 1); - if (result == 0) { - printf("Child pid is %d\n", getpid()); - - tracepoint(ust_tests_daemon, after_daemon_child, getpid()); - } else { - tracepoint(ust_tests_daemon, after_daemon_parent); - perror("daemon"); - exit(1); - } - - return 0; -} diff --git a/tests/daemon/run b/tests/daemon/run deleted file mode 100755 index be0e287e..00000000 --- a/tests/daemon/run +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -./daemon diff --git a/tests/daemon/ust_tests_daemon.h b/tests/daemon/ust_tests_daemon.h deleted file mode 100644 index 9061c40a..00000000 --- a/tests/daemon/ust_tests_daemon.h +++ /dev/null @@ -1,55 +0,0 @@ -#undef TRACEPOINT_PROVIDER -#define TRACEPOINT_PROVIDER ust_tests_daemon - -#if !defined(_TRACEPOINT_UST_TESTS_DAEMON_H) || defined(TRACEPOINT_HEADER_MULTI_READ) -#define _TRACEPOINT_UST_TESTS_DAEMON_H - -/* - * Copyright (C) 2012 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 -#include - -TRACEPOINT_EVENT(ust_tests_daemon, before_daemon, - TP_ARGS(), - TP_FIELDS() -) - -TRACEPOINT_EVENT(ust_tests_daemon, after_daemon_child, - TP_ARGS(pid_t, pid), - TP_FIELDS( - ctf_integer(pid_t, pid, pid) - ) -) - -TRACEPOINT_EVENT(ust_tests_daemon, after_daemon_parent, - TP_ARGS(), - TP_FIELDS() -) - -#endif /* _TRACEPOINT_UST_TESTS_DAEMON_H */ - -#undef TRACEPOINT_INCLUDE -#define TRACEPOINT_INCLUDE "./ust_tests_daemon.h" - -/* This part must be outside ifdef protection */ -#include -- 2.34.1