28 #
29 # This test verifies that probes will be picked up after a dlopen(3C)
30 # when the pid provider is specified as a glob (e.g., p*d$target.)
31 #
32
33 if [ $# != 1 ]; then
34 echo expected one argument: '<'dtrace-path'>'
35 exit 2
36 fi
37
38 dtrace=$1
39 DIR=${TMPDIR:-/tmp}/dtest.$$
40
41 mkdir $DIR
42 cd $DIR
43
44 cat > Makefile <<EOF
45 all: main altlib.so
46
47 main: main.o
48 gcc -o main main.o
49
50 main.o: main.c
51 gcc -c main.c
52
53 altlib.so: altlib.o
54 gcc -shared -o altlib.so altlib.o -lc
55
56 altlib.o: altlib.c
57 gcc -c altlib.c
58 EOF
59
60 cat > altlib.c <<EOF
61 void
62 go(void)
63 {
64 }
65 EOF
66
67 cat > main.c <<EOF
68 #include <dlfcn.h>
69 #include <unistd.h>
70 #include <stdio.h>
71
72 void
73 go(void)
74 {
75 }
76
77 int
|
28 #
29 # This test verifies that probes will be picked up after a dlopen(3C)
30 # when the pid provider is specified as a glob (e.g., p*d$target.)
31 #
32
33 if [ $# != 1 ]; then
34 echo expected one argument: '<'dtrace-path'>'
35 exit 2
36 fi
37
38 dtrace=$1
39 DIR=${TMPDIR:-/tmp}/dtest.$$
40
41 mkdir $DIR
42 cd $DIR
43
44 cat > Makefile <<EOF
45 all: main altlib.so
46
47 main: main.o
48 gcc -m32 -o main main.o
49
50 main.o: main.c
51 gcc -m32 -c main.c
52
53 altlib.so: altlib.o
54 gcc -m32 -shared -o altlib.so altlib.o -lc
55
56 altlib.o: altlib.c
57 gcc -m32 -fPIC -c altlib.c
58 EOF
59
60 cat > altlib.c <<EOF
61 void
62 go(void)
63 {
64 }
65 EOF
66
67 cat > main.c <<EOF
68 #include <dlfcn.h>
69 #include <unistd.h>
70 #include <stdio.h>
71
72 void
73 go(void)
74 {
75 }
76
77 int
|