From 775e7fd8bec57a12c254fcbf646b3d41e3a79d00 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Thu, 11 Aug 2011 19:31:10 -0400 Subject: [PATCH] test: add array test Signed-off-by: Mathieu Desnoyers --- tests/hello/hello.c | 3 ++- tests/hello/ust_tests_hello.h | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/hello/hello.c b/tests/hello/hello.c index afa4a71..469561c 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 a4e3296..6d19ab6 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, -- 2.34.1