Add api0 compile tests
[lttng-ust.git] / tests / compile / api0 / ctf-types / ctf-types.c
diff --git a/tests/compile/api0/ctf-types/ctf-types.c b/tests/compile/api0/ctf-types/ctf-types.c
new file mode 100644 (file)
index 0000000..c93c517
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * SPDX-License-Identifier: LGPL-2.1-only
+ *
+ * Copyright (C) 2014 Geneviève Bastien <gbastien@versatic.net>
+ */
+
+#include <unistd.h>
+
+#define TRACEPOINT_DEFINE
+#include "ust_tests_ctf_types.h"
+
+int main(int argc, char **argv)
+{
+       int i;
+       int delay = 0;
+
+       if (argc == 2)
+               delay = atoi(argv[1]);
+
+       fprintf(stderr, "Hello, World!\n");
+
+       sleep(delay);
+
+       fprintf(stderr, "Tracing... ");
+       for (i = 0; i < 100; i++) {
+               tracepoint(ust_tests_ctf_types, tptest, i, i % 6,
+                       i % 21);
+       }
+
+       for (i = 0; i < 10; i++) {
+               tracepoint(ust_tests_ctf_types, tptest_bis, i, i % 6);
+       }
+       fprintf(stderr, " done.\n");
+       return 0;
+}
This page took 0.022903 seconds and 4 git commands to generate.