2 # This file and its contents are supplied under the terms of the
3 # Common Development and Distribution License ("CDDL"), version 1.0.
4 # You may only use this file in accordance with the terms of version
7 # A full copy of the text of the CDDL should have accompanied this
8 # source. A copy of the CDDL is also available via the Internet at
9 # http://www.illumos.org/license/CDDL.
13 # Copyright (c) 2015, Joyent, Inc. All rights reserved.
17 # This test assures that we can have the same provider name across multiple
18 # probe definitions, and that the result will be the union of those
19 # definitions. In particular, libusdt depends on this when (for example)
20 # node modules that create a provider are loaded multiple times due to
21 # being included by different modules.
25 echo expected one argument
: '<'dtrace-path
'>'
45 for oogle
in bagnoogle stalloogle cockoogle
; do
52 DTRACE_PROBE(doogle, $oogle);
65 print
-u2 "failed to compile $oogle.c"
69 $dtrace -G -32 -s $oogle.d
$oogle.o
-o $oogle.d.o
72 print
-u2 "failed to process $oogle.d"
76 objs
="$objs $oogle.o $oogle.d.o"
77 echo $oogle'();' >> test.c
82 gcc
-m32 -o test test.c
$objs
85 print
-u2 "failed to compile test.c"
89 $dtrace -n 'doogle$target:::{@[probename] = count()}' \
90 -n 'END{printa("%-10s %@d\n", @)}' -x quiet
-x aggsortkey
-Zc .
/test
93 print
-u2 "failed to execute test"