tests: hello-many
[lttng-ust.git] / tests / hello-many / hello-many.c
diff --git a/tests/hello-many/hello-many.c b/tests/hello-many/hello-many.c
new file mode 100644 (file)
index 0000000..eb1e471
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2009  Pierre-Marc Fournier
+ * 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; 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 <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 <string.h>
+#include <stdlib.h>
+
+#define TRACEPOINT_DEFINE
+#include "ust_tests_hello_many.h"
+
+int main(int argc, char **argv)
+{
+       int delay = 0;
+
+       if (argc == 2)
+               delay = atoi(argv[1]);
+
+       fprintf(stderr, "Hello, World!\n");
+
+       sleep(delay);
+
+       fprintf(stderr, "Tracing... ");
+       tracepoint(ust_tests_hello_many, tptest_simple1);
+       tracepoint(ust_tests_hello_many, tptest_simple34);
+       fprintf(stderr, " done.\n");
+       return 0;
+}
This page took 0.025443 seconds and 5 git commands to generate.