X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=tests%2Fcompile%2Fapi0%2Fctf-types%2Fctf-types.c;fp=tests%2Fcompile%2Fapi0%2Fctf-types%2Fctf-types.c;h=c93c5177fced1e720613ff98dac581522d149a60;hb=d0e8dd3951870f4341b50598afd0fd7c42516866;hp=0000000000000000000000000000000000000000;hpb=bebb067ef8020d5c36ab48271b0d9d9bb2b24e11;p=lttng-ust.git diff --git a/tests/compile/api0/ctf-types/ctf-types.c b/tests/compile/api0/ctf-types/ctf-types.c new file mode 100644 index 00000000..c93c5177 --- /dev/null +++ b/tests/compile/api0/ctf-types/ctf-types.c @@ -0,0 +1,35 @@ +/* + * SPDX-License-Identifier: LGPL-2.1-only + * + * Copyright (C) 2014 Geneviève Bastien + */ + +#include + +#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; +}