Remove outdated register_test test
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 20 Feb 2013 22:07:07 +0000 (17:07 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 26 Mar 2013 15:22:02 +0000 (11:22 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
.gitignore
tests/register_test/Makefile.am [deleted file]
tests/register_test/register_test.c [deleted file]
tests/register_test/tp.h [deleted file]

index 856b127f7d27a9b0e1c6c445de36c607069fe362..acdcd73956e9c2b5f966af794e57c2cbd0c4206b 100644 (file)
@@ -38,7 +38,6 @@ tests/fork/fork
 tests/fork/fork2
 tests/hello/hello
 tests/hello.cxx/hello
-tests/register_test/register_test
 tests/same_line_marker/same_line_marker
 tests/ust-basic-tracing/ust-basic-tracing
 tests/ust-multi-test/ust-multi-test
diff --git a/tests/register_test/Makefile.am b/tests/register_test/Makefile.am
deleted file mode 100644 (file)
index c137aa8..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/libust
-
-noinst_PROGRAMS = register_test
-register_test_SOURCES = register_test.c tp.h
-register_test_LDADD = $(top_builddir)/libust/libust.la $(top_builddir)/libust-initializer.o -lpthread
diff --git a/tests/register_test/register_test.c b/tests/register_test/register_test.c
deleted file mode 100644 (file)
index 1221e0a..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright (C) 2010 Nils Carlson
- * Copyright (C) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- *
- * 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 <stdio.h>
-#include <unistd.h>
-#include <sys/mman.h>
-#include <stdarg.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <signal.h>
-#include <pthread.h>
-
-#include <ust/marker.h>
-#include "usterr.h"
-
-#define TRACEPOINT_CREATE_PROBES
-#include "tp.h"
-
-struct hello_trace_struct {
-       char *message;
-};
-
-struct hello_trace_struct hello_struct = {
-       .message = "ehlo\n",
-};
-
-void tptest_probe(void *data, int anint)
-{
-       struct hello_trace_struct *hello;
-       char message[30];
-       hello = (struct hello_trace_struct *)data;
-       //printf("this is the message: %s\n", hello->message);
-       snprintf(message, 30, "this is the %s\n", hello->message);
-}
-
-
-#define HELLO_LENGTH 100
-
-static void *register_thread_main(void *data)
-{
-       int i, j = 0;
-       struct hello_trace_struct hello[HELLO_LENGTH];
-
-       for (i = 0; i < HELLO_LENGTH; i++) {
-               hello[i].message = malloc(6 * sizeof(char));
-               hello[i].message[0] = 'a' + (i % 25);
-               memcpy(&hello[i].message[1], "ello", 5);
-       }
-
-       for (i = 0; i < 1000; i++) {
-               while (!__register_tracepoint(hello_tptest, tptest_probe,
-                                             &hello[j % HELLO_LENGTH])) {
-                       usleep(10);
-                       j++;
-               }
-               printf("Registered all\n");
-               while (!__unregister_tracepoint(hello_tptest, tptest_probe,
-                                               &hello[j % HELLO_LENGTH])) {
-                       usleep(10);
-                       j++;
-               }
-               printf("Unregistered all\n");
-       }
-       return NULL;
-}
-
-
-int main(int argc, char **argv)
-{
-       pthread_t register_thread;
-       int i;
-
-       pthread_create(&register_thread, NULL, register_thread_main, NULL);
-       for(i = 0; i < 1000000; i++) {
-               tracepoint(hello_tptest, i);
-       }
-
-       return 0;
-}
diff --git a/tests/register_test/tp.h b/tests/register_test/tp.h
deleted file mode 100644 (file)
index ced2478..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-#undef TRACE_SYSTEM
-#define TRACE_SYSTEM tp
-
-#if !defined(_TRACE_TP_H) || defined(TRACE_HEADER_MULTI_READ)
-#define _TRACE_TP_H
-
-/*
- * Copyright (C) 2011  Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- *
- * 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/tracepoint.h>
-
-TRACEPOINT_EVENT(hello_tptest,
-                TP_PROTO(int anint),
-                TP_VARS(anint),
-                TP_FIELDS());
-
-#endif /* _TRACE_TP_H */
-
-#undef TRACE_INCLUDE_PATH
-#define TRACE_INCLUDE_PATH .
-#undef TRACE_INCLUDE_FILE
-#define TRACE_INCLUDE_FILE tp
-
-/* This part must be outside protection */
-#include <ust/tracepoint_event.h>
This page took 0.027448 seconds and 4 git commands to generate.