X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;ds=sidebyside;f=tests%2Fhello%2Fhello.c;h=b265b348f2d0fa8615b194893b15065ecfdc6165;hb=e822f505be95ac8c30c7b535a7b48c05ed0c1293;hp=d30901a5517108a5e6c67135e2b279a25a9e181b;hpb=8d8a24c8565ce6dce7e7bd1045a95d1d2af5e536;p=lttng-ust.git diff --git a/tests/hello/hello.c b/tests/hello/hello.c index d30901a5..b265b348 100644 --- a/tests/hello/hello.c +++ b/tests/hello/hello.c @@ -25,9 +25,10 @@ #include #include #include +#include -#include "usterr.h" -#include "tp.h" +#include "ust_tests_hello.h" +TRACEPOINT_LIB void inthandler(int sig) { @@ -40,9 +41,10 @@ int init_int_handler(void) int result; struct sigaction act; + memset(&act, 0, sizeof(act)); result = sigemptyset(&act.sa_mask); if (result == -1) { - PERROR("sigemptyset"); + perror("sigemptyset"); return -1; } @@ -54,7 +56,7 @@ int init_int_handler(void) */ result = sigaction(SIGUSR1, &act, NULL); if (result == -1) { - PERROR("sigaction"); + perror("sigaction"); return -1; } @@ -64,6 +66,10 @@ int init_int_handler(void) int main(int argc, char **argv) { int i; + long values[] = { 1, 2, 3 }; + char text[10] = "test"; + double dbl = 2.0; + float flt = 2222.0; init_int_handler(); @@ -71,9 +77,11 @@ int main(int argc, char **argv) sleep(1); - for (i = 0; i < 50; i++) { - tracepoint(ust_tests_hello_tptest, i); - usleep(100000); + //for (i = 0; i < 50; i++) { + for (i = 0; i < 1000000; i++) { + tracepoint(ust_tests_hello_tptest, i, values, + text, strlen(text), dbl, flt); + //usleep(100000); } return 0; }