Print this page
4474 DTrace Userland CTF Support
4475 DTrace userland Keyword
4476 DTrace tests should be better citizens
4479 pid provider types
4480 dof emulation missing checks
Reviewed by: Bryan Cantrill <bryan@joyent.com>


  28 #
  29 # This test verifies that specifying a glob in a pid provider name
  30 # (e.g., p*d$target) works.
  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
  46 
  47 main: main.o
  48         gcc -o main main.o
  49 
  50 main.o: main.c
  51         gcc -c main.c
  52 EOF
  53 
  54 cat > main.c <<EOF
  55 void
  56 go(void)
  57 {
  58 }
  59 
  60 int
  61 main(int argc, char **argv)
  62 {
  63         go();
  64 
  65         return (0);
  66 }
  67 EOF
  68 
  69 make > /dev/null
  70 if [ $? -ne 0 ]; then
  71         print -u2 "failed to build"




  28 #
  29 # This test verifies that specifying a glob in a pid provider name
  30 # (e.g., p*d$target) works.
  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
  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 EOF
  53 
  54 cat > main.c <<EOF
  55 void
  56 go(void)
  57 {
  58 }
  59 
  60 int
  61 main(int argc, char **argv)
  62 {
  63         go();
  64 
  65         return (0);
  66 }
  67 EOF
  68 
  69 make > /dev/null
  70 if [ $? -ne 0 ]; then
  71         print -u2 "failed to build"