From: Mathieu Desnoyers Date: Thu, 11 Aug 2011 23:31:10 +0000 (-0400) Subject: test: add array test X-Git-Tag: v1.9.1~304 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=775e7fd8bec57a12c254fcbf646b3d41e3a79d00;p=lttng-ust.git test: add array test Signed-off-by: Mathieu Desnoyers --- diff --git a/tests/hello/hello.c b/tests/hello/hello.c index afa4a713..469561cc 100644 --- a/tests/hello/hello.c +++ b/tests/hello/hello.c @@ -63,6 +63,7 @@ int init_int_handler(void) int main(int argc, char **argv) { int i; + long values[] = { 1, 2, 3 }; init_int_handler(); @@ -71,7 +72,7 @@ int main(int argc, char **argv) sleep(1); for (i = 0; i < 50; i++) { - tracepoint(ust_tests_hello_tptest, i); + tracepoint(ust_tests_hello_tptest, i, values); usleep(100000); } return 0; diff --git a/tests/hello/ust_tests_hello.h b/tests/hello/ust_tests_hello.h index a4e32964..6d19ab6e 100644 --- a/tests/hello/ust_tests_hello.h +++ b/tests/hello/ust_tests_hello.h @@ -25,13 +25,14 @@ #include TRACEPOINT_EVENT(ust_tests_hello_tptest, - TP_PROTO(int anint), - TP_ARGS(anint), + TP_PROTO(int anint, long *values), + TP_ARGS(anint, values), TP_FIELDS( ctf_integer(int, intfield, anint) ctf_integer_hex(int, intfield2, anint) ctf_integer_network(int, intfield3, anint) ctf_integer_network_hex(int, intfield4, anint) + ctf_array(long, arrfield1, values, 3) )) TRACEPOINT_EVENT_NOARGS(ust_tests_hello_tptest_sighandler,