test: add array test
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 11 Aug 2011 23:31:10 +0000 (19:31 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 11 Aug 2011 23:31:10 +0000 (19:31 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
tests/hello/hello.c
tests/hello/ust_tests_hello.h

index afa4a713bf2569b536404c77cf322fbfe9f1a486..469561cc5641462dbb2066ff245939b9a14bb9f9 100644 (file)
@@ -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;
index a4e32964e031a45cafcdaa3dfa3235e24423f2fe..6d19ab6eb6de3dcc832c53ebeced68360894baaa 100644 (file)
 #include <ust/tracepoint.h>
 
 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,
This page took 0.02411 seconds and 4 git commands to generate.