From 67611766ca2aa40e2feaff38d5119c896c4fcb8e Mon Sep 17 00:00:00 2001 From: David Goulet Date: Mon, 2 Apr 2012 16:30:51 -0400 Subject: [PATCH] Remove useless test Signed-off-by: David Goulet --- configure.ac | 1 - tests/ust/Makefile.am | 2 +- tests/ust/nevents/Makefile.am | 16 --------- tests/ust/nevents/gen-nevents.c | 55 ---------------------------- tests/ust/nevents/run | 41 --------------------- tests/ust/nevents/tp.c | 16 --------- tests/ust/nevents/ust-nevents | 43 ---------------------- tests/ust/nevents/ust_gen_nevents.h | 56 ----------------------------- 8 files changed, 1 insertion(+), 229 deletions(-) delete mode 100644 tests/ust/nevents/Makefile.am delete mode 100644 tests/ust/nevents/gen-nevents.c delete mode 100755 tests/ust/nevents/run delete mode 100644 tests/ust/nevents/tp.c delete mode 100755 tests/ust/nevents/ust-nevents delete mode 100644 tests/ust/nevents/ust_gen_nevents.h diff --git a/configure.ac b/configure.ac index 4e058510c..9527af284 100644 --- a/configure.ac +++ b/configure.ac @@ -197,7 +197,6 @@ AC_CONFIG_FILES([ tests/kernel/Makefile tests/tools/Makefile tests/ust/Makefile - tests/ust/nevents/Makefile tests/ust/nprocesses/Makefile tests/ust/high-throughput/Makefile tests/ust/low-throughput/Makefile diff --git a/tests/ust/Makefile.am b/tests/ust/Makefile.am index 1c8295ccc..9eda72c5d 100644 --- a/tests/ust/Makefile.am +++ b/tests/ust/Makefile.am @@ -1,5 +1,5 @@ if HAVE_LIBLTTNG_UST_CTL -SUBDIRS = nevents nprocesses high-throughput low-throughput before-after +SUBDIRS = nprocesses high-throughput low-throughput before-after AM_CFLAGS = -g -Wall -I../ AM_LDFLAGS = -lurcu -lurcu-cds diff --git a/tests/ust/nevents/Makefile.am b/tests/ust/nevents/Makefile.am deleted file mode 100644 index 29652dcbb..000000000 --- a/tests/ust/nevents/Makefile.am +++ /dev/null @@ -1,16 +0,0 @@ -AM_CFLAGS = -I. -O2 -AM_LDFLAGS = -llttng-ust - -if LTTNG_TOOLS_BUILD_WITH_LIBDL -AM_LDFLAGS += -ldl -endif -if LTTNG_TOOLS_BUILD_WITH_LIBC_DL -AM_LDFLAGS += -lc -endif - -noinst_PROGRAMS = gen-nevents -gen_nevents_SOURCES = gen-nevents.c tp.c ust_gen_nevents.h -gen_nevents_LDADD = -llttng-ust - -noinst_SCRIPTS = run -EXTRA_DIST = run diff --git a/tests/ust/nevents/gen-nevents.c b/tests/ust/nevents/gen-nevents.c deleted file mode 100644 index 03aa6c67e..000000000 --- a/tests/ust/nevents/gen-nevents.c +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (C) - 2009 Pierre-Marc Fournier - * Copyright (C) - 2011 Mathieu Desnoyers - * Copyright (C) - 2012 David Goulet - * - * 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 -#include "ust_gen_nevents.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; - unsigned int nr_iter = 100; - - if (argc == 2) { - nr_iter = atoi(argv[1]); - } - - for (i = 0; i < nr_iter; i++) { - netint = htonl(i); - tracepoint(ust_gen_nevents, tptest, i, netint, values, text, - strlen(text), dbl, flt); - } - - return 0; -} diff --git a/tests/ust/nevents/run b/tests/ust/nevents/run deleted file mode 100755 index 5f3745074..000000000 --- a/tests/ust/nevents/run +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash -# -# Copyright (C) - 2012 David Goulet -# -# 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 - -CURDIR=$(dirname $0)/ -TESTDIR=$CURDIR/../.. -NR_ITER=100 - -source $TESTDIR/utils.sh - -echo -e "\n-----------------------------------" -echo -e "UST tracer - Generate $NR_ITER events" -echo -e "-------------------------------------" - -if [ ! -x "$CURDIR/gen-nevents" ]; then - echo -e "No UST nevents binary detected. Passing." - exit 0 -fi - -# MUST set TESTDIR before calling those functions - -start_sessiond - -./$CURDIR/ust-nevents $NR_ITER - -stop_sessiond - -rm -rf $TRACE_PATH diff --git a/tests/ust/nevents/tp.c b/tests/ust/nevents/tp.c deleted file mode 100644 index e291924a3..000000000 --- a/tests/ust/nevents/tp.c +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (c) - 2011 Mathieu Desnoyers - * Copyright (c) - 2012 David Goulet - * - * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED OR - * IMPLIED. ANY USE IS AT YOUR OWN RISK. - * - * Permission is hereby granted to use or copy this program for any purpose, - * provided the above notices are retained on all copies. Permission to modify - * the code and to distribute modified code is granted, provided the above - * notices are retained, and a notice that the code was modified is included - * with the above copyright notice. - */ - -#define TRACEPOINT_CREATE_PROBES -#include "ust_gen_nevents.h" diff --git a/tests/ust/nevents/ust-nevents b/tests/ust/nevents/ust-nevents deleted file mode 100755 index eed4dcb1b..000000000 --- a/tests/ust/nevents/ust-nevents +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/bash -# -# Copyright (C) - 2012 David Goulet -# -# 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 - -CURDIR=$(dirname $0)/ -TESTDIR=$CURDIR/../.. -NR_ITER=$1 -SESSION_NAME="ust-nevents" -EVENT_NAME="ust_gen_nevents:tptest" - -source $TESTDIR/utils.sh - -TRACE_PATH=$(mktemp -d) - -# MUST set TESTDIR before calling those functions - -create_lttng_session $SESSION_NAME $TRACE_PATH - -enable_ust_lttng_event $SESSION_NAME $EVENT_NAME -start_tracing $SESSION_NAME - -# Start test -./$CURDIR/gen-nevents $NR_ITER - -stop_tracing $SESSION_NAME -destroy_lttng_session $SESSION_NAME - -trace_matches $EVENT_NAME $NR_ITER $TRACE_PATH - -rm -rf $TRACE_PATH diff --git a/tests/ust/nevents/ust_gen_nevents.h b/tests/ust/nevents/ust_gen_nevents.h deleted file mode 100644 index 8d82ecb4e..000000000 --- a/tests/ust/nevents/ust_gen_nevents.h +++ /dev/null @@ -1,56 +0,0 @@ -#undef TRACEPOINT_PROVIDER -#define TRACEPOINT_PROVIDER ust_gen_nevents - -#if !defined(_TRACEPOINT_UST_GEN_NEVENTS_H) || defined(TRACEPOINT_HEADER_MULTI_READ) -#define _TRACEPOINT_UST_GEN_NEVENTS_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Copyright (C) 2011 Mathieu Desnoyers - * - * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED - * OR IMPLIED. ANY USE IS AT YOUR OWN RISK. - * - * Permission is hereby granted to use or copy this program - * for any purpose, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - */ - -#include - -TRACEPOINT_EVENT(ust_gen_nevents, tptest, - 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) - ) -) - -#endif /* _TRACEPOINT_UST_GEN_NEVENTS_H */ - -#undef TRACEPOINT_INCLUDE_FILE -#define TRACEPOINT_INCLUDE_FILE ./ust_gen_nevents.h - -/* This part must be outside ifdef protection */ -#include - -#ifdef __cplusplus -} -#endif -- 2.34.1