44
45 $dtrace -h -s prov.d
46 if [ $? -ne 0 ]; then
47 print -u2 "failed to generate header file"
48 exit 1
49 fi
50
51 cat > test.c <<EOF
52 #include <sys/types.h>
53 #include "prov.h"
54
55 int
56 main(int argc, char **argv)
57 {
58 TEST_PROV_GO();
59
60 return (0);
61 }
62 EOF
63
64 gcc -c test.c
65 if [ $? -ne 0 ]; then
66 print -u2 "failed to compile test.c"
67 exit 1
68 fi
69 $dtrace -G -32 -s prov.d test.o
70 if [ $? -ne 0 ]; then
71 print -u2 "failed to create DOF"
72 exit 1
73 fi
74 gcc -o test test.o prov.o
75 if [ $? -ne 0 ]; then
76 print -u2 "failed to link final executable"
77 exit 1
78 fi
79
80 script() {
81 $dtrace -c 'ppriv -e -s A=basic ./test' -Zqs /dev/stdin <<EOF
82 test_prov\$target:::
83 {
84 printf("%s:%s:%s\n", probemod, probefunc, probename);
85 }
86 EOF
87 }
88
89 script
90 status=$?
91
92 cd /
93 /usr/bin/rm -rf $DIR
94
|
44
45 $dtrace -h -s prov.d
46 if [ $? -ne 0 ]; then
47 print -u2 "failed to generate header file"
48 exit 1
49 fi
50
51 cat > test.c <<EOF
52 #include <sys/types.h>
53 #include "prov.h"
54
55 int
56 main(int argc, char **argv)
57 {
58 TEST_PROV_GO();
59
60 return (0);
61 }
62 EOF
63
64 gcc -m32 -c test.c
65 if [ $? -ne 0 ]; then
66 print -u2 "failed to compile test.c"
67 exit 1
68 fi
69 $dtrace -G -32 -s prov.d test.o
70 if [ $? -ne 0 ]; then
71 print -u2 "failed to create DOF"
72 exit 1
73 fi
74 gcc -m32 -o test test.o prov.o
75 if [ $? -ne 0 ]; then
76 print -u2 "failed to link final executable"
77 exit 1
78 fi
79
80 script() {
81 $dtrace -c 'ppriv -e -s A=basic ./test' -Zqs /dev/stdin <<EOF
82 test_prov\$target:::
83 {
84 printf("%s:%s:%s\n", probemod, probefunc, probename);
85 }
86 EOF
87 }
88
89 script
90 status=$?
91
92 cd /
93 /usr/bin/rm -rf $DIR
94
|