Move current compile tests to 'api1'
[lttng-ust.git] / tests / compile / api1 / ust-fields / ust-fields.c
diff --git a/tests/compile/api1/ust-fields/ust-fields.c b/tests/compile/api1/ust-fields/ust-fields.c
new file mode 100644 (file)
index 0000000..0b4aa0a
--- /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 LTTNG_UST_TRACEPOINT_DEFINE
+#include "ust_tests_ust_fields.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++) {
+               lttng_ust_tracepoint(ust_tests_ust_fields, tptest, i, i % 6,
+                       i % 21);
+       }
+
+       for (i = 0; i < 10; i++) {
+               lttng_ust_tracepoint(ust_tests_ust_fields, tptest_bis, i, i % 6);
+       }
+       fprintf(stderr, " done.\n");
+       return 0;
+}
This page took 0.024163 seconds and 4 git commands to generate.