Print this page
8112 EOF crazier RPC daemons

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/dtrace/test/tst/common/mib/tst.udp.ksh
          +++ new/usr/src/cmd/dtrace/test/tst/common/mib/tst.udp.ksh
↓ open down ↓ 15 lines elided ↑ open up ↑
  16   16  # fields enclosed by brackets "[]" replaced with your own identifying
  17   17  # information: Portions Copyright [yyyy] [name of copyright owner]
  18   18  #
  19   19  # CDDL HEADER END
  20   20  #
  21   21  
  22   22  #
  23   23  # Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  24   24  # Use is subject to license terms.
  25   25  #
  26      -# ident "%Z%%M% %I%     %E% SMI"
  27   26  
  28   27  #
  29   28  # This script tests that several of the the mib:::udp* probes fire and fire
  30   29  # with a valid args[0].
  31   30  #
  32   31  script()
  33   32  {
  34   33          $dtrace -s /dev/stdin <<EOF
  35   34          mib:::udpHCOutDatagrams
  36   35          {
↓ open down ↓ 6 lines elided ↑ open up ↑
  43   42          }
  44   43  
  45   44          profile:::tick-10msec
  46   45          /in && out/
  47   46          {
  48   47                  exit(0);
  49   48          }
  50   49  EOF
  51   50  }
  52   51  
  53      -rupper()
       52 +udpper()
  54   53  {
  55   54          while true; do
  56      -                rup localhost
       55 +                showmount localhost >/dev/null 2>&1
  57   56                  /usr/bin/sleep 1
  58   57          done
  59   58  }
  60   59  
  61   60  if [ $# != 1 ]; then
  62   61          echo expected one argument: '<'dtrace-path'>'
  63   62          exit 2
  64   63  fi
  65   64  
  66   65  dtrace=$1
  67   66  
  68      -rupper &
  69      -rupper=$!
       67 +udpper &
       68 +udpper=$!
  70   69  script
  71   70  status=$?
  72   71  
  73      -kill $rupper
       72 +kill $udpper
  74   73  exit $status
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX