From f215e02bf85f68d3a6106c2a1f4f7f063f819064 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 11 Apr 2024 10:17:27 +0200 Subject: Adding upstream version 7.0.14-dfsg. Signed-off-by: Daniel Baumann --- src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/Makefile.kup | 0 .../ExtPacks/VBoxDTrace/onnv/cmd/dtrace/Makefile | 57 + .../VBoxDTrace/onnv/cmd/dtrace/Makefile.com | 57 + .../VBoxDTrace/onnv/cmd/dtrace/Makefile.kup | 0 .../VBoxDTrace/onnv/cmd/dtrace/amd64/Makefile | 32 + .../VBoxDTrace/onnv/cmd/dtrace/amd64/Makefile.kup | 0 .../VBoxDTrace/onnv/cmd/dtrace/demo/Makefile | 167 ++ .../VBoxDTrace/onnv/cmd/dtrace/demo/Makefile.kup | 0 .../onnv/cmd/dtrace/demo/act/Makefile.kup | 0 .../VBoxDTrace/onnv/cmd/dtrace/demo/act/time.d | 44 + .../onnv/cmd/dtrace/demo/agg/Makefile.kup | 0 .../VBoxDTrace/onnv/cmd/dtrace/demo/agg/clear.d | 45 + .../VBoxDTrace/onnv/cmd/dtrace/demo/agg/dateprof.d | 52 + .../VBoxDTrace/onnv/cmd/dtrace/demo/agg/denorm.d | 51 + .../onnv/cmd/dtrace/demo/agg/lquantize.d | 30 + .../onnv/cmd/dtrace/demo/agg/normalize.d | 49 + .../onnv/cmd/dtrace/demo/agg/renormalize.d | 43 + .../VBoxDTrace/onnv/cmd/dtrace/demo/agg/trunc.d | 46 + .../VBoxDTrace/onnv/cmd/dtrace/demo/agg/writes.d | 30 + .../onnv/cmd/dtrace/demo/agg/writesbycmd.d | 30 + .../onnv/cmd/dtrace/demo/agg/writesbycmdfd.d | 30 + .../onnv/cmd/dtrace/demo/agg/writetime.d | 37 + .../onnv/cmd/dtrace/demo/agg/writetimeq.d | 37 + .../onnv/cmd/dtrace/demo/anon/Makefile.kup | 0 .../VBoxDTrace/onnv/cmd/dtrace/demo/anon/iprb.d | 39 + .../onnv/cmd/dtrace/demo/buf/Makefile.kup | 0 .../VBoxDTrace/onnv/cmd/dtrace/demo/buf/ring.d | 39 + .../VBoxDTrace/onnv/cmd/dtrace/demo/chapters | 125 ++ .../onnv/cmd/dtrace/demo/dtrace/Makefile.kup | 0 .../VBoxDTrace/onnv/cmd/dtrace/demo/dtrace/begin.d | 42 + .../VBoxDTrace/onnv/cmd/dtrace/demo/dtrace/end.d | 39 + .../VBoxDTrace/onnv/cmd/dtrace/demo/dtrace/error.d | 35 + .../onnv/cmd/dtrace/demo/fbt/Makefile.kup | 0 .../VBoxDTrace/onnv/cmd/dtrace/demo/fbt/delay.d | 39 + .../VBoxDTrace/onnv/cmd/dtrace/demo/fbt/putnext.d | 30 + .../VBoxDTrace/onnv/cmd/dtrace/demo/fbt/ssd.d | 31 + .../VBoxDTrace/onnv/cmd/dtrace/demo/fbt/xioctl.d | 50 + .../onnv/cmd/dtrace/demo/intro/Makefile.kup | 0 .../onnv/cmd/dtrace/demo/intro/countdown.d | 43 + .../onnv/cmd/dtrace/demo/intro/counter.d | 44 + .../VBoxDTrace/onnv/cmd/dtrace/demo/intro/hello.d | 31 + .../VBoxDTrace/onnv/cmd/dtrace/demo/intro/rwtime.d | 39 + .../onnv/cmd/dtrace/demo/intro/trussrw.d | 38 + .../onnv/cmd/dtrace/demo/io/Makefile.kup | 0 .../VBoxDTrace/onnv/cmd/dtrace/demo/io/applicat.d | 32 + .../VBoxDTrace/onnv/cmd/dtrace/demo/io/iocpu.d | 65 + .../VBoxDTrace/onnv/cmd/dtrace/demo/io/iosnoop.d | 38 + .../VBoxDTrace/onnv/cmd/dtrace/demo/io/iothrough.d | 66 + .../VBoxDTrace/onnv/cmd/dtrace/demo/io/iotime.d | 47 + .../VBoxDTrace/onnv/cmd/dtrace/demo/io/whoio.d | 38 + .../VBoxDTrace/onnv/cmd/dtrace/demo/io/whowrite.d | 39 + .../onnv/cmd/dtrace/demo/ip/Makefile.kup | 0 .../VBoxDTrace/onnv/cmd/dtrace/demo/ip/ipio.d | 52 + .../VBoxDTrace/onnv/cmd/dtrace/demo/ip/ipproto.d | 45 + .../VBoxDTrace/onnv/cmd/dtrace/demo/ip/tcprst.d | 284 +++ .../onnv/cmd/dtrace/demo/lockstat/Makefile.kup | 0 .../onnv/cmd/dtrace/demo/lockstat/whatlock.d | 37 + .../VBoxDTrace/onnv/cmd/dtrace/demo/mkdemo.pl | 227 +++ .../onnv/cmd/dtrace/demo/out/Makefile.kup | 0 .../VBoxDTrace/onnv/cmd/dtrace/demo/out/printa.d | 35 + .../onnv/cmd/dtrace/demo/proc/Makefile.kup | 0 .../VBoxDTrace/onnv/cmd/dtrace/demo/proc/lwptime.d | 38 + .../onnv/cmd/dtrace/demo/proc/progtime.d | 37 + .../VBoxDTrace/onnv/cmd/dtrace/demo/proc/sig.d | 39 + .../VBoxDTrace/onnv/cmd/dtrace/demo/proc/whoexec.d | 51 + .../onnv/cmd/dtrace/demo/profile/Makefile.kup | 0 .../VBoxDTrace/onnv/cmd/dtrace/demo/profile/prof.d | 39 + .../onnv/cmd/dtrace/demo/profile/profpri.d | 31 + .../onnv/cmd/dtrace/demo/profile/restest.d | 45 + .../onnv/cmd/dtrace/demo/sched/Makefile.kup | 0 .../onnv/cmd/dtrace/demo/sched/firebird.d | 52 + .../onnv/cmd/dtrace/demo/sched/howlong.d | 42 + .../VBoxDTrace/onnv/cmd/dtrace/demo/sched/nscd.d | 45 + .../VBoxDTrace/onnv/cmd/dtrace/demo/sched/pri.d | 31 + .../onnv/cmd/dtrace/demo/sched/pritime.d | 44 + .../VBoxDTrace/onnv/cmd/dtrace/demo/sched/qlen.d | 37 + .../VBoxDTrace/onnv/cmd/dtrace/demo/sched/qtime.d | 38 + .../VBoxDTrace/onnv/cmd/dtrace/demo/sched/tick.d | 31 + .../onnv/cmd/dtrace/demo/sched/ticktime.d | 38 + .../onnv/cmd/dtrace/demo/sched/whatfor.d | 64 + .../VBoxDTrace/onnv/cmd/dtrace/demo/sched/where.d | 37 + .../onnv/cmd/dtrace/demo/sched/whererun.d | 60 + .../VBoxDTrace/onnv/cmd/dtrace/demo/sched/whofor.d | 46 + .../onnv/cmd/dtrace/demo/sched/whopreempt.d | 57 + .../onnv/cmd/dtrace/demo/sched/whoqueue.d | 95 + .../onnv/cmd/dtrace/demo/sched/whosteal.d | 40 + .../VBoxDTrace/onnv/cmd/dtrace/demo/sched/xterm.d | 44 + .../VBoxDTrace/onnv/cmd/dtrace/demo/sched/xwork.d | 40 + .../onnv/cmd/dtrace/demo/script/Makefile.kup | 0 .../onnv/cmd/dtrace/demo/script/interp.d | 33 + .../onnv/cmd/dtrace/demo/script/syscall.d | 31 + .../onnv/cmd/dtrace/demo/script/tracewrite.d | 32 + .../onnv/cmd/dtrace/demo/sdt/Makefile.kup | 0 .../VBoxDTrace/onnv/cmd/dtrace/demo/sdt/callout.d | 38 + .../VBoxDTrace/onnv/cmd/dtrace/demo/sdt/interval.d | 54 + .../VBoxDTrace/onnv/cmd/dtrace/demo/sdt/intr.d | 38 + .../onnv/cmd/dtrace/demo/spec/Makefile.kup | 0 .../VBoxDTrace/onnv/cmd/dtrace/demo/spec/spec.d | 37 + .../onnv/cmd/dtrace/demo/spec/specopen.d | 93 + .../onnv/cmd/dtrace/demo/struct/Makefile.kup | 0 .../VBoxDTrace/onnv/cmd/dtrace/demo/struct/kstat.d | 44 + .../VBoxDTrace/onnv/cmd/dtrace/demo/struct/ksyms.d | 55 + .../onnv/cmd/dtrace/demo/struct/rwinfo.d | 59 + .../onnv/cmd/dtrace/demo/sysinfo/Makefile.kup | 0 .../VBoxDTrace/onnv/cmd/dtrace/demo/sysinfo/find.d | 45 + .../onnv/cmd/dtrace/demo/tcp/Makefile.kup | 0 .../onnv/cmd/dtrace/demo/tcp/tcp1stbyte.d | 37 + .../VBoxDTrace/onnv/cmd/dtrace/demo/tcp/tcpbytes.d | 36 + .../onnv/cmd/dtrace/demo/tcp/tcpbytesstat.d | 45 + .../onnv/cmd/dtrace/demo/tcp/tcpconnlat.d | 37 + .../VBoxDTrace/onnv/cmd/dtrace/demo/tcp/tcpio.d | 32 + .../onnv/cmd/dtrace/demo/tcp/tcpioflags.d | 64 + .../VBoxDTrace/onnv/cmd/dtrace/demo/tcp/tcpsnoop.d | 78 + .../VBoxDTrace/onnv/cmd/dtrace/demo/tcp/tcpstate.d | 39 + .../VBoxDTrace/onnv/cmd/dtrace/demo/tcp/tcptop.d | 138 ++ .../onnv/cmd/dtrace/demo/udp/Makefile.kup | 0 .../VBoxDTrace/onnv/cmd/dtrace/demo/udp/udpbytes.d | 36 + .../onnv/cmd/dtrace/demo/udp/udpbytesstat.d | 45 + .../VBoxDTrace/onnv/cmd/dtrace/demo/udp/udpio.d | 32 + .../VBoxDTrace/onnv/cmd/dtrace/demo/udp/udpsnoop.d | 59 + .../VBoxDTrace/onnv/cmd/dtrace/demo/udp/udptop.d | 133 ++ .../onnv/cmd/dtrace/demo/user/Makefile.kup | 0 .../VBoxDTrace/onnv/cmd/dtrace/demo/user/badopen.d | 38 + .../onnv/cmd/dtrace/demo/user/errorpath.d | 52 + .../VBoxDTrace/onnv/cmd/dtrace/demo/user/libc.d | 30 + .../onnv/cmd/dtrace/demo/user/userfunc.d | 42 + .../onnv/cmd/dtrace/demo/vars/Makefile.kup | 0 .../VBoxDTrace/onnv/cmd/dtrace/demo/vars/clause.d | 55 + .../VBoxDTrace/onnv/cmd/dtrace/demo/vars/rtime.d | 43 + .../onnv/cmd/dtrace/demo/vminfo/Makefile.kup | 0 .../onnv/cmd/dtrace/demo/vminfo/soffice.d | 52 + .../ExtPacks/VBoxDTrace/onnv/cmd/dtrace/dtrace.c | 2085 ++++++++++++++++++++ .../VBoxDTrace/onnv/cmd/dtrace/i386/Makefile | 30 + .../VBoxDTrace/onnv/cmd/dtrace/i386/Makefile.kup | 0 .../VBoxDTrace/onnv/cmd/dtrace/sparc/Makefile | 30 + .../VBoxDTrace/onnv/cmd/dtrace/sparc/Makefile.kup | 0 .../VBoxDTrace/onnv/cmd/dtrace/sparcv9/Makefile | 31 + .../onnv/cmd/dtrace/sparcv9/Makefile.kup | 0 .../VBoxDTrace/onnv/cmd/dtrace/test/Makefile | 46 + .../VBoxDTrace/onnv/cmd/dtrace/test/Makefile.kup | 0 .../onnv/cmd/dtrace/test/Makefile.subdirs | 41 + .../VBoxDTrace/onnv/cmd/dtrace/test/README | 32 + .../VBoxDTrace/onnv/cmd/dtrace/test/cmd/Makefile | 31 + .../onnv/cmd/dtrace/test/cmd/Makefile.kup | 0 .../onnv/cmd/dtrace/test/cmd/baddof/Makefile | 59 + .../onnv/cmd/dtrace/test/cmd/baddof/Makefile.kup | 0 .../onnv/cmd/dtrace/test/cmd/baddof/baddof.c | 207 ++ .../onnv/cmd/dtrace/test/cmd/badioctl/Makefile | 58 + .../onnv/cmd/dtrace/test/cmd/badioctl/Makefile.kup | 0 .../onnv/cmd/dtrace/test/cmd/badioctl/badioctl.c | 145 ++ .../onnv/cmd/dtrace/test/cmd/chkargs/Makefile | 33 + .../onnv/cmd/dtrace/test/cmd/chkargs/Makefile.com | 76 + .../onnv/cmd/dtrace/test/cmd/chkargs/Makefile.kup | 0 .../cmd/dtrace/test/cmd/chkargs/amd64/Makefile | 31 + .../cmd/dtrace/test/cmd/chkargs/amd64/Makefile.kup | 0 .../onnv/cmd/dtrace/test/cmd/chkargs/chkargs.c | 149 ++ .../onnv/cmd/dtrace/test/cmd/chkargs/i386/Makefile | 30 + .../cmd/dtrace/test/cmd/chkargs/i386/Makefile.kup | 0 .../cmd/dtrace/test/cmd/chkargs/sparc/Makefile | 30 + .../cmd/dtrace/test/cmd/chkargs/sparc/Makefile.kup | 0 .../cmd/dtrace/test/cmd/chkargs/sparcv9/Makefile | 31 + .../dtrace/test/cmd/chkargs/sparcv9/Makefile.kup | 0 .../onnv/cmd/dtrace/test/cmd/jdtrace/Getopt.java | 453 +++++ .../onnv/cmd/dtrace/test/cmd/jdtrace/JDTrace.java | 1042 ++++++++++ .../onnv/cmd/dtrace/test/cmd/jdtrace/Makefile | 109 + .../onnv/cmd/dtrace/test/cmd/jdtrace/Makefile.kup | 0 .../onnv/cmd/dtrace/test/cmd/jdtrace/exception.lst | 77 + .../onnv/cmd/dtrace/test/cmd/jdtrace/jdtrace.c | 60 + .../dtrace/test/cmd/jdtrace/manifest/Makefile.kup | 0 .../test/cmd/jdtrace/manifest/jdtrace.jar-manifest | 3 + .../onnv/cmd/dtrace/test/cmd/scripts/Makefile | 56 + .../onnv/cmd/dtrace/test/cmd/scripts/Makefile.kup | 0 .../onnv/cmd/dtrace/test/cmd/scripts/dstyle.pl | 235 +++ .../onnv/cmd/dtrace/test/cmd/scripts/dtest.pl | 704 +++++++ .../VBoxDTrace/onnv/cmd/dtrace/test/tst/Makefile | 39 + .../onnv/cmd/dtrace/test/tst/Makefile.com | 104 + .../onnv/cmd/dtrace/test/tst/Makefile.kup | 0 .../onnv/cmd/dtrace/test/tst/common/Makefile | 101 + .../onnv/cmd/dtrace/test/tst/common/Makefile.kup | 0 .../cmd/dtrace/test/tst/common/aggs/Makefile.kup | 0 .../test/tst/common/aggs/err.D_AGG_FUNC.bad.d | 45 + .../test/tst/common/aggs/err.D_AGG_MDIM.bad.d | 45 + .../test/tst/common/aggs/err.D_AGG_NULL.bad.d | 44 + .../test/tst/common/aggs/err.D_AGG_REDEF.redef.d | 45 + .../tst/common/aggs/err.D_AGG_SCALAR.avgtoofew.d | 43 + .../tst/common/aggs/err.D_AGG_SCALAR.maxnoarg.d | 41 + .../tst/common/aggs/err.D_AGG_SCALAR.mintoofew.d | 42 + .../common/aggs/err.D_AGG_SCALAR.quantizetoofew.d | 41 + .../common/aggs/err.D_AGG_SCALAR.stddevtoofew.d | 41 + .../tst/common/aggs/err.D_AGG_SCALAR.sumtoofew.d | 42 + .../test/tst/common/aggs/err.D_CLEAR_AGGARG.bad.d | 77 + .../test/tst/common/aggs/err.D_CLEAR_PROTO.bad.d | 77 + .../test/tst/common/aggs/err.D_FUNC_IDENT.bad.d | 45 + .../tst/common/aggs/err.D_FUNC_UNDEF.badaggfunc.d | 43 + .../tst/common/aggs/err.D_IDENT_UNDEF.badexpr.d | 41 + .../tst/common/aggs/err.D_IDENT_UNDEF.badkey3.d | 42 + .../tst/common/aggs/err.D_IDENT_UNDEF.noeffect.d | 41 + .../test/tst/common/aggs/err.D_KEY_TYPE.badkey1.d | 41 + .../test/tst/common/aggs/err.D_KEY_TYPE.badkey2.d | 42 + .../test/tst/common/aggs/err.D_KEY_TYPE.badkey4.d | 44 + .../tst/common/aggs/err.D_LQUANT_BASETYPE.lqbad1.d | 44 + .../common/aggs/err.D_LQUANT_BASETYPE.lqshort.d | 44 + .../tst/common/aggs/err.D_LQUANT_BASEVAL.bad.d | 43 + .../tst/common/aggs/err.D_LQUANT_LIMTYPE.lqbad1.d | 45 + .../test/tst/common/aggs/err.D_LQUANT_LIMVAL.bad.d | 44 + .../test/tst/common/aggs/err.D_LQUANT_MATCHBASE.d | 33 + .../tst/common/aggs/err.D_LQUANT_MATCHBASE.order.d | 33 + .../test/tst/common/aggs/err.D_LQUANT_MATCHLIM.d | 33 + .../tst/common/aggs/err.D_LQUANT_MATCHLIM.order.d | 33 + .../test/tst/common/aggs/err.D_LQUANT_MATCHSTEP.d | 33 + .../common/aggs/err.D_LQUANT_MISMATCH.lqbadarg.d | 55 + .../common/aggs/err.D_LQUANT_STEPLARGE.lqtoofew.d | 42 + .../tst/common/aggs/err.D_LQUANT_STEPSMALL.bad.d | 55 + .../common/aggs/err.D_LQUANT_STEPTYPE.lqbadinc.d | 56 + .../tst/common/aggs/err.D_LQUANT_STEPVAL.bad.d | 56 + .../tst/common/aggs/err.D_NORMALIZE_AGGARG.bad.d | 65 + .../tst/common/aggs/err.D_NORMALIZE_PROTO.bad.d | 64 + .../tst/common/aggs/err.D_NORMALIZE_SCALAR.bad.d | 64 + .../common/aggs/err.D_PROTO_ARG.lquantizetoofew.d | 42 + .../tst/common/aggs/err.D_PROTO_LEN.avgnoarg.d | 44 + .../tst/common/aggs/err.D_PROTO_LEN.avgtoomany.d | 44 + .../tst/common/aggs/err.D_PROTO_LEN.counttoomany.d | 41 + .../common/aggs/err.D_PROTO_LEN.lquantizenoarg.d | 42 + .../common/aggs/err.D_PROTO_LEN.lquantizetoomany.d | 40 + .../tst/common/aggs/err.D_PROTO_LEN.maxnoarg.d | 41 + .../tst/common/aggs/err.D_PROTO_LEN.maxtoomany.d | 41 + .../tst/common/aggs/err.D_PROTO_LEN.minnoarg.d | 41 + .../tst/common/aggs/err.D_PROTO_LEN.mintoomany.d | 42 + .../common/aggs/err.D_PROTO_LEN.quantizenoarg.d | 42 + .../common/aggs/err.D_PROTO_LEN.quantizetoomany.d | 41 + .../tst/common/aggs/err.D_PROTO_LEN.stddevnoarg.d | 41 + .../common/aggs/err.D_PROTO_LEN.stddevtoomany.d | 41 + .../tst/common/aggs/err.D_PROTO_LEN.sumnoarg.d | 41 + .../tst/common/aggs/err.D_PROTO_LEN.sumtoomany.d | 41 + .../test/tst/common/aggs/err.D_TRUNC_AGGARG.bad.d | 35 + .../tst/common/aggs/err.D_TRUNC_PROTO.badmany.d | 34 + .../tst/common/aggs/err.D_TRUNC_PROTO.badnone.d | 33 + .../test/tst/common/aggs/err.D_TRUNC_SCALAR.bad.d | 34 + .../cmd/dtrace/test/tst/common/aggs/tst.allquant.d | 46 + .../dtrace/test/tst/common/aggs/tst.allquant.d.out | 131 ++ .../onnv/cmd/dtrace/test/tst/common/aggs/tst.avg.d | 57 + .../cmd/dtrace/test/tst/common/aggs/tst.avg.d.out | 2 + .../cmd/dtrace/test/tst/common/aggs/tst.avg_neg.d | 46 + .../dtrace/test/tst/common/aggs/tst.avg_neg.d.out | 2 + .../cmd/dtrace/test/tst/common/aggs/tst.clear.d | 75 + .../dtrace/test/tst/common/aggs/tst.clear.d.out | 22 + .../cmd/dtrace/test/tst/common/aggs/tst.clearavg.d | 60 + .../dtrace/test/tst/common/aggs/tst.clearavg.d.out | 2 + .../dtrace/test/tst/common/aggs/tst.clearavg2.d | 63 + .../test/tst/common/aggs/tst.clearavg2.d.out | 16 + .../test/tst/common/aggs/tst.cleardenormalize.d | 78 + .../tst/common/aggs/tst.cleardenormalize.d.out | 22 + .../test/tst/common/aggs/tst.clearlquantize.d | 67 + .../test/tst/common/aggs/tst.clearlquantize.d.out | 94 + .../test/tst/common/aggs/tst.clearnormalize.d | 77 + .../test/tst/common/aggs/tst.clearnormalize.d.out | 22 + .../dtrace/test/tst/common/aggs/tst.clearstddev.d | 57 + .../test/tst/common/aggs/tst.clearstddev.d.out | 2 + .../cmd/dtrace/test/tst/common/aggs/tst.count.d | 44 + .../dtrace/test/tst/common/aggs/tst.count.d.out | 2 + .../cmd/dtrace/test/tst/common/aggs/tst.count2.d | 54 + .../dtrace/test/tst/common/aggs/tst.count2.d.out | 2 + .../cmd/dtrace/test/tst/common/aggs/tst.count3.d | 56 + .../dtrace/test/tst/common/aggs/tst.denormalize.d | 63 + .../test/tst/common/aggs/tst.denormalize.d.out | 7 + .../test/tst/common/aggs/tst.denormalizeonly.d | 61 + .../test/tst/common/aggs/tst.denormalizeonly.d.out | 6 + .../dtrace/test/tst/common/aggs/tst.fmtnormalize.d | 61 + .../test/tst/common/aggs/tst.fmtnormalize.d.out | 7 + .../cmd/dtrace/test/tst/common/aggs/tst.forms.d | 53 + .../dtrace/test/tst/common/aggs/tst.forms.d.out | 6 + .../cmd/dtrace/test/tst/common/aggs/tst.goodkey.d | 55 + .../cmd/dtrace/test/tst/common/aggs/tst.keysort.d | 108 + .../dtrace/test/tst/common/aggs/tst.keysort.d.out | 160 ++ .../dtrace/test/tst/common/aggs/tst.lquantize.d | 57 + .../test/tst/common/aggs/tst.lquantize.d.out | 61 + .../dtrace/test/tst/common/aggs/tst.lquantnormal.d | 51 + .../test/tst/common/aggs/tst.lquantnormal.d.out | 16 + .../dtrace/test/tst/common/aggs/tst.lquantrange.d | 40 + .../test/tst/common/aggs/tst.lquantrange.d.out | 23 + .../dtrace/test/tst/common/aggs/tst.lquantround.d | 57 + .../test/tst/common/aggs/tst.lquantround.d.out | 9 + .../dtrace/test/tst/common/aggs/tst.lquantzero.d | 96 + .../test/tst/common/aggs/tst.lquantzero.d.out | 910 +++++++++ .../onnv/cmd/dtrace/test/tst/common/aggs/tst.max.d | 58 + .../cmd/dtrace/test/tst/common/aggs/tst.max.d.out | 3 + .../cmd/dtrace/test/tst/common/aggs/tst.max_neg.d | 46 + .../dtrace/test/tst/common/aggs/tst.max_neg.d.out | 2 + .../onnv/cmd/dtrace/test/tst/common/aggs/tst.min.d | 57 + .../cmd/dtrace/test/tst/common/aggs/tst.min.d.out | 2 + .../cmd/dtrace/test/tst/common/aggs/tst.min_neg.d | 46 + .../dtrace/test/tst/common/aggs/tst.min_neg.d.out | 2 + .../dtrace/test/tst/common/aggs/tst.multiaggs1.d | 66 + .../dtrace/test/tst/common/aggs/tst.multiaggs2.d | 61 + .../test/tst/common/aggs/tst.multiaggs2.d.out | 37 + .../dtrace/test/tst/common/aggs/tst.multiaggs3.d | 74 + .../test/tst/common/aggs/tst.multiaggs3.d.out | 38 + .../test/tst/common/aggs/tst.multinormalize.d | 65 + .../test/tst/common/aggs/tst.multinormalize.d.out | 15 + .../dtrace/test/tst/common/aggs/tst.neglquant.d | 150 ++ .../test/tst/common/aggs/tst.neglquant.d.out | 64 + .../cmd/dtrace/test/tst/common/aggs/tst.negorder.d | 85 + .../dtrace/test/tst/common/aggs/tst.negorder.d.out | 376 ++++ .../cmd/dtrace/test/tst/common/aggs/tst.negquant.d | 115 ++ .../dtrace/test/tst/common/aggs/tst.negquant.d.out | 55 + .../cmd/dtrace/test/tst/common/aggs/tst.negtrunc.d | 49 + .../dtrace/test/tst/common/aggs/tst.negtrunc.d.out | 11 + .../test/tst/common/aggs/tst.negtruncquant.d | 52 + .../test/tst/common/aggs/tst.negtruncquant.d.out | 46 + .../dtrace/test/tst/common/aggs/tst.normalize.d | 60 + .../test/tst/common/aggs/tst.normalize.d.out | 7 + .../cmd/dtrace/test/tst/common/aggs/tst.order.d | 78 + .../dtrace/test/tst/common/aggs/tst.order.d.out | 33 + .../cmd/dtrace/test/tst/common/aggs/tst.quantize.d | 57 + .../dtrace/test/tst/common/aggs/tst.quantize.d.out | 61 + .../dtrace/test/tst/common/aggs/tst.quantmany.d | 56 + .../test/tst/common/aggs/tst.quantmany.d.out | 1208 ++++++++++++ .../dtrace/test/tst/common/aggs/tst.quantround.d | 57 + .../test/tst/common/aggs/tst.quantround.d.out | 9 + .../dtrace/test/tst/common/aggs/tst.quantzero.d | 63 + .../test/tst/common/aggs/tst.quantzero.d.out | 146 ++ .../dtrace/test/tst/common/aggs/tst.signature.d | 54 + .../dtrace/test/tst/common/aggs/tst.signedkeys.d | 120 ++ .../test/tst/common/aggs/tst.signedkeys.d.out | 44 + .../test/tst/common/aggs/tst.signedkeyspos.d | 115 ++ .../test/tst/common/aggs/tst.signedkeyspos.d.out | 61 + .../cmd/dtrace/test/tst/common/aggs/tst.stddev.d | 64 + .../dtrace/test/tst/common/aggs/tst.stddev.d.out | 3 + .../cmd/dtrace/test/tst/common/aggs/tst.subr.d | 112 ++ .../onnv/cmd/dtrace/test/tst/common/aggs/tst.sum.d | 57 + .../cmd/dtrace/test/tst/common/aggs/tst.sum.d.out | 2 + .../cmd/dtrace/test/tst/common/aggs/tst.trunc.d | 49 + .../dtrace/test/tst/common/aggs/tst.trunc.d.out | 11 + .../cmd/dtrace/test/tst/common/aggs/tst.trunc0.d | 57 + .../dtrace/test/tst/common/aggs/tst.trunc0.d.out | 7 + .../dtrace/test/tst/common/aggs/tst.truncquant.d | 52 + .../test/tst/common/aggs/tst.truncquant.d.out | 46 + .../test/tst/common/aggs/tst.valsortkeypos.d | 49 + .../test/tst/common/aggs/tst.valsortkeypos.d.out | 4 + .../dtrace/test/tst/common/arithmetic/Makefile.kup | 0 .../tst/common/arithmetic/err.D_DIV_ZERO.divby0.d | 43 + .../common/arithmetic/err.D_DIV_ZERO.divby0_1.d | 45 + .../common/arithmetic/err.D_DIV_ZERO.divby0_2.d | 46 + .../tst/common/arithmetic/err.D_DIV_ZERO.modby0.d | 44 + .../tst/common/arithmetic/err.D_SYNTAX.addmin.d | 47 + .../tst/common/arithmetic/err.D_SYNTAX.divmin.d | 46 + .../tst/common/arithmetic/err.D_SYNTAX.muladd.d | 46 + .../tst/common/arithmetic/err.D_SYNTAX.muldiv.d | 46 + .../dtrace/test/tst/common/arithmetic/tst.basics.d | 66 + .../test/tst/common/arithmetic/tst.complex.d | 57 + .../cmd/dtrace/test/tst/common/arrays/Makefile.kup | 0 .../test/tst/common/arrays/err.D_ARR_BADREF.bad.d | 42 + .../tst/common/arrays/err.D_DECL_ARRBIG.toobig.d | 45 + .../tst/common/arrays/err.D_DECL_ARRNULL.bad.d | 42 + .../test/tst/common/arrays/err.D_DECL_ARRSUB.bad.d | 42 + .../common/arrays/err.D_DECL_PROTO_TYPE.badtuple.d | 44 + .../tst/common/arrays/err.D_IDENT_UNDEF.badureg.d | 42 + .../cmd/dtrace/test/tst/common/arrays/tst.basic1.d | 56 + .../cmd/dtrace/test/tst/common/arrays/tst.basic2.d | 57 + .../cmd/dtrace/test/tst/common/arrays/tst.basic3.d | 56 + .../cmd/dtrace/test/tst/common/arrays/tst.basic4.d | 56 + .../cmd/dtrace/test/tst/common/arrays/tst.basic5.d | 59 + .../cmd/dtrace/test/tst/common/arrays/tst.basic6.d | 58 + .../dtrace/test/tst/common/arrays/tst.uregsarray.d | 51 + .../cmd/dtrace/test/tst/common/assocs/Makefile.kup | 0 .../tst/common/assocs/err.D_OP_INCOMPAT.dupgtype.d | 42 + .../tst/common/assocs/err.D_OP_INCOMPAT.dupttype.d | 42 + .../tst/common/assocs/err.D_OP_INCOMPAT.this.d | 48 + .../tst/common/assocs/err.D_PROTO_ARG.badsig.d | 46 + .../tst/common/assocs/err.D_PROTO_LEN.toofew.d | 46 + .../tst/common/assocs/err.D_PROTO_LEN.toomany.d | 46 + .../tst/common/assocs/err.D_SYNTAX.errassign.d | 45 + .../dtrace/test/tst/common/assocs/err.tupoflow.d | 41 + .../dtrace/test/tst/common/assocs/tst.cpyarray.d | 65 + .../test/tst/common/assocs/tst.diffprofile.d | 62 + .../dtrace/test/tst/common/assocs/tst.initialize.d | 47 + .../dtrace/test/tst/common/assocs/tst.invalidref.d | 75 + .../cmd/dtrace/test/tst/common/assocs/tst.misc.d | 69 + .../test/tst/common/assocs/tst.orthogonality.d | 51 + .../cmd/dtrace/test/tst/common/assocs/tst.this.d | 49 + .../test/tst/common/assocs/tst.valassign.d.out | 2 + .../cmd/dtrace/test/tst/common/begin/Makefile.kup | 0 .../test/tst/common/begin/err.D_PDESC_ZERO.begin.d | 44 + .../test/tst/common/begin/err.D_PDESC_ZERO.tick.d | 45 + .../cmd/dtrace/test/tst/common/begin/tst.begin.d | 55 + .../dtrace/test/tst/common/begin/tst.begin.d.out | 5 + .../dtrace/test/tst/common/begin/tst.multibegin.d | 60 + .../test/tst/common/begin/tst.multibegin.d.out | 6 + .../dtrace/test/tst/common/bitfields/Makefile.kup | 0 .../err.D_ADDROF_BITFIELD.BitfieldAddress.d | 50 + .../bitfields/err.D_DECL_BFCONST.NegBitField.d | 46 + .../bitfields/err.D_DECL_BFCONST.ZeroBitField.d | 46 + .../bitfields/err.D_DECL_BFSIZE.ExceedBaseType.d | 53 + .../bitfields/err.D_DECL_BFSIZE.GreaterThan64.d | 46 + .../common/bitfields/err.D_DECL_BFTYPE.badtype.d | 47 + .../tst/common/bitfields/err.D_OFFSETOF_BITFIELD.d | 53 + .../err.D_SIZEOF_BITFIELD.SizeofBitfield.d | 49 + .../tst/common/bitfields/tst.BitFieldPromotion.d | 60 + .../test/tst/common/bitfields/tst.SizeofBitField.d | 109 + .../dtrace/test/tst/common/buffering/Makefile.kup | 0 .../cmd/dtrace/test/tst/common/buffering/err.end.d | 54 + .../dtrace/test/tst/common/buffering/err.resize1.d | 46 + .../dtrace/test/tst/common/buffering/err.resize2.d | 47 + .../dtrace/test/tst/common/buffering/err.resize3.d | 62 + .../dtrace/test/tst/common/buffering/err.zerobuf.d | 43 + .../test/tst/common/buffering/tst.alignring.d | 81 + .../test/tst/common/buffering/tst.cputime.ksh | 90 + .../test/tst/common/buffering/tst.dynvarsize.d | 67 + .../dtrace/test/tst/common/buffering/tst.fill1.d | 115 ++ .../test/tst/common/buffering/tst.fill1.d.out | 9 + .../dtrace/test/tst/common/buffering/tst.resize1.d | 51 + .../dtrace/test/tst/common/buffering/tst.resize2.d | 52 + .../dtrace/test/tst/common/buffering/tst.resize3.d | 73 + .../dtrace/test/tst/common/buffering/tst.ring1.d | 75 + .../dtrace/test/tst/common/buffering/tst.ring2.d | 53 + .../test/tst/common/buffering/tst.ring2.d.out | 6 + .../dtrace/test/tst/common/buffering/tst.ring3.d | 78 + .../test/tst/common/buffering/tst.ring3.d.out | 5 + .../test/tst/common/buffering/tst.smallring.d | 57 + .../dtrace/test/tst/common/buffering/tst.switch1.d | 69 + .../test/tst/common/buffering/tst.switch1.d.out | 11 + .../dtrace/test/tst/common/builtinvar/Makefile.kup | 0 .../builtinvar/err.D_XLATE_NOCONV.cpuusage.d | 42 + .../common/builtinvar/err.D_XLATE_NOCONV.nice.d | 45 + .../builtinvar/err.D_XLATE_NOCONV.priority.d | 43 + .../common/builtinvar/err.D_XLATE_NOCONV.prsize.d | 42 + .../common/builtinvar/err.D_XLATE_NOCONV.rssize.d | 42 + .../dtrace/test/tst/common/builtinvar/tst.arg0.d | 42 + .../test/tst/common/builtinvar/tst.arg0clause.d | 47 + .../dtrace/test/tst/common/builtinvar/tst.arg1.d | 42 + .../test/tst/common/builtinvar/tst.arg1to8.d | 43 + .../test/tst/common/builtinvar/tst.arg1to8clause.d | 47 + .../dtrace/test/tst/common/builtinvar/tst.caller.d | 42 + .../test/tst/common/builtinvar/tst.caller1.d | 46 + .../dtrace/test/tst/common/builtinvar/tst.epid.d | 46 + .../dtrace/test/tst/common/builtinvar/tst.epid1.d | 43 + .../dtrace/test/tst/common/builtinvar/tst.errno.d | 47 + .../dtrace/test/tst/common/builtinvar/tst.errno1.d | 43 + .../test/tst/common/builtinvar/tst.execname.d | 49 + .../test/tst/common/builtinvar/tst.hpriority.d | 42 + .../cmd/dtrace/test/tst/common/builtinvar/tst.id.d | 46 + .../dtrace/test/tst/common/builtinvar/tst.id1.d | 42 + .../dtrace/test/tst/common/builtinvar/tst.ipl.d | 46 + .../dtrace/test/tst/common/builtinvar/tst.ipl1.d | 42 + .../test/tst/common/builtinvar/tst.lwpsinfo.d | 55 + .../test/tst/common/builtinvar/tst.lwpsinfo1.d | 51 + .../dtrace/test/tst/common/builtinvar/tst.pid.d | 46 + .../dtrace/test/tst/common/builtinvar/tst.pid1.d | 42 + .../dtrace/test/tst/common/builtinvar/tst.psinfo.d | 55 + .../test/tst/common/builtinvar/tst.psinfo1.d | 51 + .../dtrace/test/tst/common/builtinvar/tst.tid.d | 46 + .../dtrace/test/tst/common/builtinvar/tst.tid1.d | 43 + .../test/tst/common/builtinvar/tst.timestamp.d | 43 + .../test/tst/common/builtinvar/tst.vtimestamp.d | 43 + .../dtrace/test/tst/common/clauses/Makefile.kup | 0 .../tst/common/clauses/err.D_IDENT_UNDEF.aggfun.d | 40 + .../tst/common/clauses/err.D_IDENT_UNDEF.aggtup.d | 40 + .../tst/common/clauses/err.D_IDENT_UNDEF.arrtup.d | 40 + .../tst/common/clauses/err.D_IDENT_UNDEF.body.d | 38 + .../tst/common/clauses/err.D_IDENT_UNDEF.both.d | 41 + .../tst/common/clauses/err.D_IDENT_UNDEF.pred.d | 39 + .../dtrace/test/tst/common/clauses/tst.nopred.d | 38 + .../cmd/dtrace/test/tst/common/clauses/tst.pred.d | 39 + .../dtrace/test/tst/common/clauses/tst.predfirst.d | 41 + .../dtrace/test/tst/common/clauses/tst.predlast.d | 42 + .../cmd/dtrace/test/tst/common/cpc/Makefile.kup | 0 .../tst/common/cpc/err.D_PDESC_ZERO.lowfrequency.d | 45 + .../cpc/err.D_PDESC_ZERO.malformedoverflow.d | 40 + .../common/cpc/err.D_PDESC_ZERO.nonexistentevent.d | 40 + .../test/tst/common/cpc/err.cpcvscpustatpart1.ksh | 78 + .../test/tst/common/cpc/err.cpcvscpustatpart2.ksh | 70 + .../tst/common/cpc/err.cputrackfailtostart.ksh | 77 + .../test/tst/common/cpc/err.cputrackterminates.ksh | 70 + .../test/tst/common/cpc/err.toomanyenablings.d | 55 + .../cmd/dtrace/test/tst/common/cpc/tst.allcpus.ksh | 107 + .../dtrace/test/tst/common/cpc/tst.genericevent.d | 48 + .../test/tst/common/cpc/tst.platformevent.ksh | 81 + .../cmd/dtrace/test/tst/common/decls/Makefile.kup | 0 .../decls/err.D_DECL_LOCASSC.NonLocalAssoc.d | 49 + .../common/decls/err.D_DECL_LONGINT.LongStruct.d | 52 + .../decls/err.D_DECL_PARMCLASS.BadStorageClass.d | 51 + .../common/decls/err.D_DECL_PROTO_NAME.VoidName.d | 40 + .../tst/common/decls/err.D_DECL_PROTO_TYPE.Dyn.d | 40 + .../decls/err.D_DECL_PROTO_VARARGS.VarLenArgs.d | 50 + .../decls/err.D_DECL_PROTO_VOID.NonSoleVoid.d | 49 + .../decls/err.D_DECL_SIGNINT.UnsignedStruct.d | 52 + .../decls/err.D_DECL_VOIDATTR.ShortVoidDecl.d | 49 + .../cmd/dtrace/test/tst/common/decls/tst.arrays.d | 51 + .../cmd/dtrace/test/tst/common/decls/tst.basics.d | 67 + .../cmd/dtrace/test/tst/common/decls/tst.funcs.d | 49 + .../dtrace/test/tst/common/decls/tst.pointers.d | 43 + .../test/tst/common/decls/tst.varargsfuncs.d | 45 + .../test/tst/common/docsExamples/Makefile.kup | 0 .../dtrace/test/tst/common/docsExamples/badptr.d | 42 + .../test/tst/common/docsExamples/countdown.d | 53 + .../dtrace/test/tst/common/docsExamples/counter.d | 52 + .../test/tst/common/docsExamples/errorpath.d | 47 + .../dtrace/test/tst/common/docsExamples/hello.d | 42 + .../dtrace/test/tst/common/docsExamples/kstat.d | 57 + .../dtrace/test/tst/common/docsExamples/ksyms.d | 63 + .../test/tst/common/docsExamples/renormalize.d | 55 + .../dtrace/test/tst/common/docsExamples/rtime.d | 50 + .../cmd/dtrace/test/tst/common/docsExamples/rw.d | 42 + .../dtrace/test/tst/common/docsExamples/rwinfo.d | 74 + .../dtrace/test/tst/common/docsExamples/rwtime.d | 50 + .../dtrace/test/tst/common/docsExamples/specopen.d | 79 + .../dtrace/test/tst/common/docsExamples/truss.d | 55 + .../dtrace/test/tst/common/docsExamples/trussrw.d | 52 + .../dtrace/test/tst/common/docsExamples/userfunc.d | 61 + .../cmd/dtrace/test/tst/common/drops/Makefile.kup | 0 .../tst/common/drops/drp.DTRACEDROP_AGGREGATION.d | 44 + .../tst/common/drops/drp.DTRACEDROP_DBLERROR.d | 42 + .../test/tst/common/drops/drp.DTRACEDROP_DYNAMIC.d | 43 + .../tst/common/drops/drp.DTRACEDROP_PRINCIPAL.d | 43 + .../common/drops/drp.DTRACEDROP_PRINCIPAL.end.d | 43 + .../test/tst/common/drops/drp.DTRACEDROP_SPEC.d | 48 + .../tst/common/drops/drp.DTRACEDROP_SPECUNAVAIL.d | 42 + .../common/drops/drp.DTRACEDROP_STKSTROVERFLOW.d | 53 + .../dtrace/test/tst/common/dtraceUtil/Makefile.kup | 0 .../err.D_PDESC_ZERO.InvalidDescription1.d | 42 + .../test/tst/common/dtraceUtil/man.APIVersion.d | 37 + .../test/tst/common/dtraceUtil/man.AddSearchPath.d | 55 + .../test/tst/common/dtraceUtil/man.CoalesceTrace.d | 67 + .../test/tst/common/dtraceUtil/man.ELFGeneration.d | 48 + .../tst/common/dtraceUtil/man.IncludedFilePath.d | 48 + .../common/dtraceUtil/man.ListProbesWithFunctions | 99 + .../tst/common/dtraceUtil/man.ListProbesWithIDs | 77 + .../common/dtraceUtil/man.ListProbesWithModules | 91 + .../tst/common/dtraceUtil/man.ListProbesWithNames | 128 ++ .../common/dtraceUtil/man.ListProbesWithProviders | 82 + .../tst/common/dtraceUtil/man.ShowCompilerCode.d | 44 + .../test/tst/common/dtraceUtil/man.TraceFunctions | 115 ++ .../dtrace/test/tst/common/dtraceUtil/man.TraceIDs | 70 + .../test/tst/common/dtraceUtil/man.TraceModule | 114 ++ .../test/tst/common/dtraceUtil/man.TraceNames | 129 ++ .../test/tst/common/dtraceUtil/man.TraceProvider | 83 + .../common/dtraceUtil/man.VerboseStabilityReport.d | 47 + .../tst/common/dtraceUtil/tst.AddSearchPath.d.ksh | 82 + .../tst/common/dtraceUtil/tst.BufsizeGiga.d.ksh | 45 + .../tst/common/dtraceUtil/tst.BufsizeKilo.d.ksh | 45 + .../tst/common/dtraceUtil/tst.BufsizeMega.d.ksh | 45 + .../tst/common/dtraceUtil/tst.BufsizeTera.d.ksh | 45 + .../tst/common/dtraceUtil/tst.DataModel32.d.ksh | 73 + .../tst/common/dtraceUtil/tst.DataModel64.d.ksh | 74 + .../common/dtraceUtil/tst.DefineNameWithCPP.d.ksh | 68 + .../dtraceUtil/tst.DefineNameWithCPP.d.ksh.out | 2 + .../dtraceUtil/tst.DestructWithFunction.d.ksh | 56 + .../dtraceUtil/tst.DestructWithFunction.d.ksh.out | 1 + .../tst/common/dtraceUtil/tst.DestructWithID.d.ksh | 54 + .../common/dtraceUtil/tst.DestructWithID.d.ksh.out | 1 + .../common/dtraceUtil/tst.DestructWithModule.d.ksh | 54 + .../dtraceUtil/tst.DestructWithModule.d.ksh.out | 1 + .../common/dtraceUtil/tst.DestructWithName.d.ksh | 54 + .../dtraceUtil/tst.DestructWithName.d.ksh.out | 1 + .../dtraceUtil/tst.DestructWithProvider.d.ksh | 54 + .../dtraceUtil/tst.DestructWithProvider.d.ksh.out | 1 + .../common/dtraceUtil/tst.DestructWithoutW.d.ksh | 55 + .../common/dtraceUtil/tst.ELFGenerationOut.d.ksh | 73 + .../common/dtraceUtil/tst.ELFGenerationWithO.d.ksh | 74 + .../tst/common/dtraceUtil/tst.ExitStatus1.d.ksh | 56 + .../tst/common/dtraceUtil/tst.ExitStatus2.d.ksh | 55 + .../common/dtraceUtil/tst.ExtraneousProbeIds.d.ksh | 53 + .../common/dtraceUtil/tst.InvalidFuncName1.d.ksh | 53 + .../common/dtraceUtil/tst.InvalidFuncName2.d.ksh | 53 + .../tst/common/dtraceUtil/tst.InvalidId1.d.ksh | 59 + .../tst/common/dtraceUtil/tst.InvalidId2.d.ksh | 59 + .../tst/common/dtraceUtil/tst.InvalidId3.d.ksh | 59 + .../tst/common/dtraceUtil/tst.InvalidModule1.d.ksh | 59 + .../tst/common/dtraceUtil/tst.InvalidModule2.d.ksh | 59 + .../tst/common/dtraceUtil/tst.InvalidModule3.d.ksh | 59 + .../tst/common/dtraceUtil/tst.InvalidModule4.d.ksh | 59 + .../dtraceUtil/tst.InvalidProbeIdentifier.d.ksh | 53 + .../common/dtraceUtil/tst.InvalidProvider1.d.ksh | 59 + .../common/dtraceUtil/tst.InvalidProvider2.d.ksh | 59 + .../common/dtraceUtil/tst.InvalidProvider3.d.ksh | 59 + .../common/dtraceUtil/tst.InvalidProvider4.d.ksh | 59 + .../common/dtraceUtil/tst.InvalidTraceFunc1.d.ksh | 53 + .../common/dtraceUtil/tst.InvalidTraceFunc2.d.ksh | 53 + .../common/dtraceUtil/tst.InvalidTraceFunc3.d.ksh | 53 + .../common/dtraceUtil/tst.InvalidTraceFunc4.d.ksh | 53 + .../common/dtraceUtil/tst.InvalidTraceFunc5.d.ksh | 53 + .../common/dtraceUtil/tst.InvalidTraceFunc6.d.ksh | 53 + .../common/dtraceUtil/tst.InvalidTraceFunc7.d.ksh | 53 + .../common/dtraceUtil/tst.InvalidTraceFunc8.d.ksh | 53 + .../common/dtraceUtil/tst.InvalidTraceFunc9.d.ksh | 53 + .../common/dtraceUtil/tst.InvalidTraceID1.d.ksh | 58 + .../common/dtraceUtil/tst.InvalidTraceID2.d.ksh | 58 + .../common/dtraceUtil/tst.InvalidTraceID3.d.ksh | 58 + .../common/dtraceUtil/tst.InvalidTraceID4.d.ksh | 58 + .../common/dtraceUtil/tst.InvalidTraceID5.d.ksh | 58 + .../common/dtraceUtil/tst.InvalidTraceID6.d.ksh | 58 + .../common/dtraceUtil/tst.InvalidTraceID7.d.ksh | 58 + .../dtraceUtil/tst.InvalidTraceModule1.d.ksh | 58 + .../dtraceUtil/tst.InvalidTraceModule2.d.ksh | 58 + .../dtraceUtil/tst.InvalidTraceModule3.d.ksh | 58 + .../dtraceUtil/tst.InvalidTraceModule4.d.ksh | 58 + .../dtraceUtil/tst.InvalidTraceModule5.d.ksh | 58 + .../dtraceUtil/tst.InvalidTraceModule6.d.ksh | 58 + .../dtraceUtil/tst.InvalidTraceModule7.d.ksh | 58 + .../dtraceUtil/tst.InvalidTraceModule8.d.ksh | 58 + .../common/dtraceUtil/tst.InvalidTraceName1.d.ksh | 57 + .../common/dtraceUtil/tst.InvalidTraceName2.d.ksh | 57 + .../common/dtraceUtil/tst.InvalidTraceName3.d.ksh | 57 + .../common/dtraceUtil/tst.InvalidTraceName4.d.ksh | 57 + .../common/dtraceUtil/tst.InvalidTraceName5.d.ksh | 57 + .../common/dtraceUtil/tst.InvalidTraceName6.d.ksh | 57 + .../common/dtraceUtil/tst.InvalidTraceName7.d.ksh | 57 + .../common/dtraceUtil/tst.InvalidTraceName8.d.ksh | 57 + .../common/dtraceUtil/tst.InvalidTraceName9.d.ksh | 57 + .../dtraceUtil/tst.InvalidTraceProvider1.d.ksh | 58 + .../dtraceUtil/tst.InvalidTraceProvider2.d.ksh | 58 + .../dtraceUtil/tst.InvalidTraceProvider3.d.ksh | 58 + .../dtraceUtil/tst.InvalidTraceProvider4.d.ksh | 58 + .../dtraceUtil/tst.InvalidTraceProvider5.d.ksh | 58 + .../dtraceUtil/tst.MultipleInvalidProbeId.d.ksh | 53 + .../dtraceUtil/tst.PreprocessorStatement.d.ksh | 70 + .../test/tst/common/dtraceUtil/tst.QuietMode.d.ksh | 65 + .../tst/common/dtraceUtil/tst.QuietMode.d.ksh.out | 1 + .../tst/common/dtraceUtil/tst.TestCompile.d.ksh | 67 + .../common/dtraceUtil/tst.TestCompile.d.ksh.out | 0 .../dtraceUtil/tst.UnDefineNameWithCPP.d.ksh | 71 + .../common/dtraceUtil/tst.ZeroFunctionProbes.d.ksh | 58 + .../dtraceUtil/tst.ZeroFunctionProbes.d.ksh.out | 1 + .../common/dtraceUtil/tst.ZeroModuleProbes.d.ksh | 57 + .../dtraceUtil/tst.ZeroModuleProbes.d.ksh.out | 1 + .../tst/common/dtraceUtil/tst.ZeroNameProbes.d.ksh | 56 + .../common/dtraceUtil/tst.ZeroNameProbes.d.ksh.out | 1 + .../common/dtraceUtil/tst.ZeroProbeIdentfier.d.ksh | 53 + .../common/dtraceUtil/tst.ZeroProbesWithoutZ.d.ksh | 57 + .../common/dtraceUtil/tst.ZeroProviderProbes.d.ksh | 57 + .../dtraceUtil/tst.ZeroProviderProbes.d.ksh.out | 1 + .../cmd/dtrace/test/tst/common/end/Makefile.kup | 0 .../tst/common/end/err.D_IDENT_UNDEF.timespent.d | 49 + .../onnv/cmd/dtrace/test/tst/common/end/tst.end.d | 55 + .../test/tst/common/end/tst.endwithoutbegin.d | 48 + .../dtrace/test/tst/common/end/tst.multibeginend.d | 77 + .../cmd/dtrace/test/tst/common/end/tst.multiend.d | 61 + .../cmd/dtrace/test/tst/common/enum/Makefile.kup | 0 .../common/enum/err.D_DECL_IDRED.EnumSameName.d | 57 + .../common/enum/err.D_UNKNOWN.RepeatIdentifiers.d | 52 + .../dtrace/test/tst/common/enum/tst.EnumEquality.d | 56 + .../test/tst/common/enum/tst.EnumSameValue.d | 51 + .../test/tst/common/enum/tst.EnumValAssign.d | 57 + .../cmd/dtrace/test/tst/common/error/Makefile.kup | 0 .../test/tst/common/error/tst.DTRACEFLT_BADADDR.d | 51 + .../test/tst/common/error/tst.DTRACEFLT_DIVZERO.d | 54 + .../test/tst/common/error/tst.DTRACEFLT_UNKNOWN.d | 53 + .../cmd/dtrace/test/tst/common/error/tst.error.d | 49 + .../dtrace/test/tst/common/error/tst.errorend.d | 54 + .../cmd/dtrace/test/tst/common/exit/Makefile.kup | 0 .../test/tst/common/exit/err.D_PROTO_LEN.noarg.d | 42 + .../cmd/dtrace/test/tst/common/exit/err.exitarg1.d | 42 + .../cmd/dtrace/test/tst/common/exit/tst.basic1.d | 42 + .../test/tst/common/fbtprovider/Makefile.kup | 0 .../fbtprovider/err.D_PDESC_ZERO.notreturn.d | 56 + .../dtrace/test/tst/common/fbtprovider/tst.basic.d | 49 + .../tst/common/fbtprovider/tst.functionentry.d | 48 + .../common/fbtprovider/tst.functionreturnvalue.d | 43 + .../test/tst/common/fbtprovider/tst.ioctlargs.d | 50 + .../test/tst/common/fbtprovider/tst.offset.d | 53 + .../test/tst/common/fbtprovider/tst.offsetzero.d | 50 + .../test/tst/common/fbtprovider/tst.return.d | 52 + .../test/tst/common/fbtprovider/tst.return0.d | 44 + .../test/tst/common/fbtprovider/tst.tailcall.d | 55 + .../cmd/dtrace/test/tst/common/funcs/Makefile.kup | 0 .../common/funcs/err.D_FUNC_UNDEF.progenyofbad1.d | 44 + .../test/tst/common/funcs/err.D_OP_VFPTR.badop.d | 47 + .../tst/common/funcs/err.D_PROTO_ARG.chillbadarg.d | 43 + .../common/funcs/err.D_PROTO_ARG.copyoutbadarg.d | 43 + .../tst/common/funcs/err.D_PROTO_ARG.mobadarg.d | 41 + .../tst/common/funcs/err.D_PROTO_ARG.raisebadarg.d | 43 + .../tst/common/funcs/err.D_PROTO_LEN.allocanoarg.d | 45 + .../common/funcs/err.D_PROTO_LEN.badbreakpoint.d | 43 + .../tst/common/funcs/err.D_PROTO_LEN.chilltoofew.d | 43 + .../common/funcs/err.D_PROTO_LEN.chilltoomany.d | 42 + .../funcs/err.D_PROTO_LEN.copyoutstrbadarg.d | 43 + .../funcs/err.D_PROTO_LEN.copyoutstrtoofew.d | 43 + .../common/funcs/err.D_PROTO_LEN.copyouttoofew.d | 43 + .../common/funcs/err.D_PROTO_LEN.copyouttoomany.d | 44 + .../tst/common/funcs/err.D_PROTO_LEN.motoofew.d | 41 + .../tst/common/funcs/err.D_PROTO_LEN.motoomany.d | 41 + .../tst/common/funcs/err.D_PROTO_LEN.mtabadarg.d | 42 + .../tst/common/funcs/err.D_PROTO_LEN.mtatoofew.d | 43 + .../tst/common/funcs/err.D_PROTO_LEN.mtatoomany.d | 42 + .../tst/common/funcs/err.D_PROTO_LEN.panicbadarg.d | 43 + .../common/funcs/err.D_PROTO_LEN.progenyofbad2.d | 44 + .../tst/common/funcs/err.D_PROTO_LEN.stopbadarg.d | 43 + .../common/funcs/err.D_STRINGOF_TYPE.badstringof.d | 43 + .../test/tst/common/funcs/err.D_VAR_UNDEF.badvar.d | 43 + .../dtrace/test/tst/common/funcs/err.badalloca.d | 56 + .../dtrace/test/tst/common/funcs/err.badalloca2.d | 49 + .../dtrace/test/tst/common/funcs/err.badbcopy.d | 55 + .../dtrace/test/tst/common/funcs/err.badbcopy1.d | 54 + .../dtrace/test/tst/common/funcs/err.badbcopy2.d | 53 + .../dtrace/test/tst/common/funcs/err.badbcopy3.d | 50 + .../dtrace/test/tst/common/funcs/err.badbcopy4.d | 53 + .../dtrace/test/tst/common/funcs/err.badbcopy5.d | 55 + .../dtrace/test/tst/common/funcs/err.badbcopy6.d | 40 + .../dtrace/test/tst/common/funcs/err.badchill.d | 39 + .../test/tst/common/funcs/err.chillbadarg.ksh | 69 + .../cmd/dtrace/test/tst/common/funcs/err.copyout.d | 49 + .../test/tst/common/funcs/err.copyoutbadaddr.ksh | 71 + .../tst/common/funcs/err.copyoutstrbadaddr.ksh | 70 + .../test/tst/common/funcs/err.inet_ntoa6badaddr.d | 45 + .../test/tst/common/funcs/err.inet_ntoabadaddr.d | 45 + .../test/tst/common/funcs/err.inet_ntopbadaddr.d | 45 + .../test/tst/common/funcs/err.inet_ntopbadarg.d | 47 + .../test/tst/common/funcs/tst.badfreopen.ksh | 102 + .../dtrace/test/tst/common/funcs/tst.basename.d | 87 + .../test/tst/common/funcs/tst.basename.d.out | 163 ++ .../cmd/dtrace/test/tst/common/funcs/tst.bcopy.d | 61 + .../cmd/dtrace/test/tst/common/funcs/tst.chill.ksh | 77 + .../dtrace/test/tst/common/funcs/tst.cleanpath.d | 70 + .../test/tst/common/funcs/tst.cleanpath.d.out | 22 + .../cmd/dtrace/test/tst/common/funcs/tst.copyin.d | 54 + .../dtrace/test/tst/common/funcs/tst.copyinto.d | 56 + .../test/tst/common/funcs/tst.ddi_pathname.d | 64 + .../cmd/dtrace/test/tst/common/funcs/tst.default.d | 64 + .../dtrace/test/tst/common/funcs/tst.freopen.ksh | 111 ++ .../dtrace/test/tst/common/funcs/tst.ftruncate.ksh | 64 + .../test/tst/common/funcs/tst.ftruncate.ksh.out | 11 + .../cmd/dtrace/test/tst/common/funcs/tst.hton.d | 97 + .../cmd/dtrace/test/tst/common/funcs/tst.index.d | 226 +++ .../dtrace/test/tst/common/funcs/tst.index.d.out | 1126 +++++++++++ .../dtrace/test/tst/common/funcs/tst.inet_ntoa.d | 58 + .../test/tst/common/funcs/tst.inet_ntoa.d.out | 5 + .../dtrace/test/tst/common/funcs/tst.inet_ntoa6.d | 95 + .../test/tst/common/funcs/tst.inet_ntoa6.d.out | 8 + .../dtrace/test/tst/common/funcs/tst.inet_ntop.d | 135 ++ .../test/tst/common/funcs/tst.inet_ntop.d.out | 13 + .../cmd/dtrace/test/tst/common/funcs/tst.lltostr.d | 41 + .../dtrace/test/tst/common/funcs/tst.lltostr.d.out | 8 + .../dtrace/test/tst/common/funcs/tst.mutex_owned.d | 62 + .../dtrace/test/tst/common/funcs/tst.mutex_owner.d | 63 + .../tst/common/funcs/tst.mutex_type_adaptive.d | 71 + .../dtrace/test/tst/common/funcs/tst.progenyof.d | 64 + .../cmd/dtrace/test/tst/common/funcs/tst.rand.d | 54 + .../cmd/dtrace/test/tst/common/funcs/tst.strchr.d | 71 + .../dtrace/test/tst/common/funcs/tst.strchr.d.out | 6 + .../cmd/dtrace/test/tst/common/funcs/tst.strjoin.d | 38 + .../dtrace/test/tst/common/funcs/tst.strjoin.d.out | 5 + .../cmd/dtrace/test/tst/common/funcs/tst.strstr.d | 89 + .../dtrace/test/tst/common/funcs/tst.strstr.d.out | 10 + .../cmd/dtrace/test/tst/common/funcs/tst.strtok.d | 146 ++ .../dtrace/test/tst/common/funcs/tst.strtok.d.out | 5 + .../dtrace/test/tst/common/funcs/tst.strtok_null.d | 43 + .../cmd/dtrace/test/tst/common/funcs/tst.substr.d | 231 +++ .../dtrace/test/tst/common/funcs/tst.substr.d.out | 254 +++ .../test/tst/common/funcs/tst.substrminate.d | 52 + .../test/tst/common/funcs/tst.substrminate.d.out | 3 + .../cmd/dtrace/test/tst/common/funcs/tst.system.d | 45 + .../dtrace/test/tst/common/funcs/tst.system.d.out | 8 + .../dtrace/test/tst/common/grammar/Makefile.kup | 0 .../test/tst/common/grammar/err.D_ADDROF_LVAL.d | 41 + .../test/tst/common/grammar/err.D_EMPTY.empty.d | 34 + .../dtrace/test/tst/common/grammar/tst.clauses.d | 48 + .../cmd/dtrace/test/tst/common/grammar/tst.stmts.d | 59 + .../cmd/dtrace/test/tst/common/inline/Makefile.kup | 0 .../tst/common/inline/err.D_DECL_IDRED.redef1.d | 42 + .../tst/common/inline/err.D_DECL_IDRED.redef2.d | 41 + .../tst/common/inline/err.D_IDENT_UNDEF.recur.d | 41 + .../tst/common/inline/err.D_OP_INCOMPAT.baddef1.d | 41 + .../tst/common/inline/err.D_OP_INCOMPAT.baddef2.d | 41 + .../tst/common/inline/err.D_OP_INCOMPAT.badxlate.d | 41 + .../test/tst/common/inline/tst.InlineDataAssign.d | 68 + .../test/tst/common/inline/tst.InlineExpression.d | 80 + .../test/tst/common/inline/tst.InlineKinds.d | 64 + .../test/tst/common/inline/tst.InlineKinds.d.out | 7 + .../test/tst/common/inline/tst.InlineTypedef.d | 52 + .../tst/common/inline/tst.InlineWritableAssign.d | 66 + .../cmd/dtrace/test/tst/common/io/Makefile.kup | 0 .../onnv/cmd/dtrace/test/tst/common/io/tst.fds.c | 100 + .../onnv/cmd/dtrace/test/tst/common/io/tst.fds.d | 54 + .../cmd/dtrace/test/tst/common/io/tst.fds.d.out | 36 + .../cmd/dtrace/test/tst/common/ip/Makefile.kup | 0 .../dtrace/test/tst/common/ip/get.ipv4remote.pl | 104 + .../dtrace/test/tst/common/ip/get.ipv6remote.pl | 88 + .../test/tst/common/ip/tst.ipv4localicmp.ksh | 70 + .../test/tst/common/ip/tst.ipv4localicmp.ksh.out | 6 + .../dtrace/test/tst/common/ip/tst.ipv4localtcp.ksh | 125 ++ .../test/tst/common/ip/tst.ipv4localtcp.ksh.out | 7 + .../dtrace/test/tst/common/ip/tst.ipv4localudp.ksh | 93 + .../test/tst/common/ip/tst.ipv4localudp.ksh.out | 6 + .../test/tst/common/ip/tst.ipv4remoteicmp.ksh | 81 + .../test/tst/common/ip/tst.ipv4remoteicmp.ksh.out | 3 + .../test/tst/common/ip/tst.ipv4remotetcp.ksh | 128 ++ .../test/tst/common/ip/tst.ipv4remotetcp.ksh.out | 7 + .../test/tst/common/ip/tst.ipv4remoteudp.ksh | 88 + .../test/tst/common/ip/tst.ipv4remoteudp.ksh.out | 5 + .../test/tst/common/ip/tst.ipv6localicmp.ksh | 82 + .../test/tst/common/ip/tst.ipv6localicmp.ksh.out | 6 + .../test/tst/common/ip/tst.ipv6remoteicmp.ksh | 88 + .../test/tst/common/ip/tst.ipv6remoteicmp.ksh.out | 3 + .../test/tst/common/ip/tst.localtcpstate.ksh | 182 ++ .../test/tst/common/ip/tst.localtcpstate.ksh.out | 18 + .../test/tst/common/ip/tst.remotetcpstate.ksh | 172 ++ .../test/tst/common/ip/tst.remotetcpstate.ksh.out | 15 + .../cmd/dtrace/test/tst/common/java_api/Makefile | 79 + .../dtrace/test/tst/common/java_api/Makefile.kup | 0 .../test/tst/common/java_api/manifest/Makefile.kup | 0 .../tst/common/java_api/manifest/test.jar-manifest | 2 + .../test/tst/common/java_api/src/Makefile.kup | 0 .../test/tst/common/java_api/src/TestAbort.java | 158 ++ .../test/tst/common/java_api/src/TestBean.java | 706 +++++++ .../test/tst/common/java_api/src/TestClose.java | 90 + .../test/tst/common/java_api/src/TestDrop.java | 169 ++ .../test/tst/common/java_api/src/TestEnable.java | 151 ++ .../common/java_api/src/TestFunctionLookup.java | 114 ++ .../tst/common/java_api/src/TestGetAggregate.java | 252 +++ .../tst/common/java_api/src/TestMaxConsumers.java | 97 + .../common/java_api/src/TestMultiAggPrinta.java | 144 ++ .../tst/common/java_api/src/TestProbeData.java | 110 ++ .../common/java_api/src/TestProbeDescription.java | 55 + .../tst/common/java_api/src/TestStateMachine.java | 627 ++++++ .../test/tst/common/java_api/src/TestStopLock.java | 67 + .../dtrace/test/tst/common/java_api/tst.Abort.ksh | 39 + .../test/tst/common/java_api/tst.Abort.ksh.out | 1 + .../dtrace/test/tst/common/java_api/tst.Bean.ksh | 41 + .../test/tst/common/java_api/tst.Bean.ksh.out | 722 +++++++ .../dtrace/test/tst/common/java_api/tst.Close.ksh | 38 + .../test/tst/common/java_api/tst.Close.ksh.out | 1 + .../dtrace/test/tst/common/java_api/tst.Drop.ksh | 38 + .../test/tst/common/java_api/tst.Drop.ksh.out | 1 + .../dtrace/test/tst/common/java_api/tst.Enable.ksh | 40 + .../test/tst/common/java_api/tst.Enable.ksh.out | 6 + .../test/tst/common/java_api/tst.FunctionLookup.c | 51 + .../tst/common/java_api/tst.FunctionLookup.ksh | 39 + .../tst/common/java_api/tst.FunctionLookup.ksh.out | 3 + .../test/tst/common/java_api/tst.GetAggregate.ksh | 36 + .../test/tst/common/java_api/tst.MaxConsumers.ksh | 47 + .../tst/common/java_api/tst.MaxConsumers.ksh.out | 17 + .../tst/common/java_api/tst.MultiAggPrinta.ksh | 38 + .../tst/common/java_api/tst.MultiAggPrinta.ksh.out | 78 + .../test/tst/common/java_api/tst.ProbeData.c | 93 + .../test/tst/common/java_api/tst.ProbeData.ksh | 38 + .../test/tst/common/java_api/tst.ProbeData.ksh.out | 50 + .../tst/common/java_api/tst.ProbeDescription.ksh | 45 + .../common/java_api/tst.ProbeDescription.ksh.out | 8 + .../test/tst/common/java_api/tst.StateMachine.ksh | 40 + .../tst/common/java_api/tst.StateMachine.ksh.out | 70 + .../test/tst/common/java_api/tst.StopLock.ksh | 39 + .../test/tst/common/java_api/tst.StopLock.ksh.out | 1 + .../dtrace/test/tst/common/java_api/tst.printa.d | 78 + .../test/tst/common/java_api/tst.printa.d.out | 47 + .../cmd/dtrace/test/tst/common/lexer/Makefile.kup | 0 .../test/tst/common/lexer/err.D_CHR_NL.char.d | 43 + .../test/tst/common/lexer/err.D_CHR_NULL.char.d | 42 + .../common/lexer/err.D_INT_DIGIT.InvalidDigit.d | 39 + .../test/tst/common/lexer/err.D_INT_OFLOW.BigInt.d | 39 + .../test/tst/common/lexer/err.D_STR_NL.string.d | 44 + .../test/tst/common/lexer/err.D_SYNTAX.brace1.d | 39 + .../test/tst/common/lexer/err.D_SYNTAX.brace2.d | 37 + .../test/tst/common/lexer/err.D_SYNTAX.brack1.d | 38 + .../test/tst/common/lexer/err.D_SYNTAX.brack2.d | 38 + .../test/tst/common/lexer/err.D_SYNTAX.brack3.d | 39 + .../test/tst/common/lexer/err.D_SYNTAX.paren1.d | 38 + .../test/tst/common/lexer/err.D_SYNTAX.paren2.d | 38 + .../test/tst/common/lexer/err.D_SYNTAX.paren3.d | 39 + .../lexer/tst.D_MACRO_OFLOW.ParIntOvflow.d.ksh | 54 + .../cmd/dtrace/test/tst/common/mdb/Makefile.kup | 0 .../dtrace/test/tst/common/mdb/tst.dtracedcmd.ksh | 85 + .../cmd/dtrace/test/tst/common/mib/Makefile.kup | 0 .../cmd/dtrace/test/tst/common/mib/tst.icmp.ksh | 79 + .../cmd/dtrace/test/tst/common/mib/tst.tcp.ksh | 155 ++ .../cmd/dtrace/test/tst/common/mib/tst.udp.ksh | 74 + .../cmd/dtrace/test/tst/common/misc/Makefile.kup | 0 .../test/tst/common/misc/err.D_PRAGMA_OPTSET.d | 34 + .../cmd/dtrace/test/tst/common/misc/tst.badopt.d | 41 + .../cmd/dtrace/test/tst/common/misc/tst.boolopt.d | 50 + .../dtrace/test/tst/common/misc/tst.boolopt.d.out | 2 + .../cmd/dtrace/test/tst/common/misc/tst.dynopt.d | 61 + .../dtrace/test/tst/common/misc/tst.dynopt.d.out | 31 + .../dtrace/test/tst/common/misc/tst.enablerace.ksh | 89 + .../cmd/dtrace/test/tst/common/misc/tst.haslam.d | 63 + .../dtrace/test/tst/common/misc/tst.include.ksh | 135 ++ .../dtrace/test/tst/common/misc/tst.macroglob.ksh | 41 + .../test/tst/common/misc/tst.macroglob.ksh.out | 15 + .../cmd/dtrace/test/tst/common/misc/tst.roch.d | 93 + .../dtrace/test/tst/common/misc/tst.schrock.ksh | 79 + .../dtrace/test/tst/common/multiaggs/Makefile.kup | 0 .../tst/common/multiaggs/err.D_PRINTA_AGGKEY.d | 38 + .../tst/common/multiaggs/err.D_PRINTA_AGGPROTO.d | 38 + .../dtrace/test/tst/common/multiaggs/tst.many.d | 311 +++ .../test/tst/common/multiaggs/tst.many.d.out | 265 +++ .../dtrace/test/tst/common/multiaggs/tst.same.d | 37 + .../test/tst/common/multiaggs/tst.same.d.out | 3 + .../dtrace/test/tst/common/multiaggs/tst.sort.d | 46 + .../test/tst/common/multiaggs/tst.sort.d.out | 201 ++ .../dtrace/test/tst/common/multiaggs/tst.sortpos.d | 60 + .../test/tst/common/multiaggs/tst.sortpos.d.out | 1021 ++++++++++ .../test/tst/common/multiaggs/tst.tuplecompat.d | 37 + .../tst/common/multiaggs/tst.tuplecompat.d.out | 2 + .../dtrace/test/tst/common/multiaggs/tst.zero.d | 51 + .../test/tst/common/multiaggs/tst.zero.d.out | 55 + .../dtrace/test/tst/common/multiaggs/tst.zero2.d | 50 + .../test/tst/common/multiaggs/tst.zero2.d.out | 72 + .../dtrace/test/tst/common/multiaggs/tst.zero3.d | 45 + .../test/tst/common/multiaggs/tst.zero3.d.out | 3 + .../cmd/dtrace/test/tst/common/nfs/Makefile.kup | 0 .../onnv/cmd/dtrace/test/tst/common/nfs/tst.call.c | 120 ++ .../onnv/cmd/dtrace/test/tst/common/nfs/tst.call.d | 70 + .../cmd/dtrace/test/tst/common/nfs/tst.call3.c | 441 +++++ .../cmd/dtrace/test/tst/common/nfs/tst.call3.d | 91 + .../dtrace/test/tst/common/offsetof/Makefile.kup | 0 .../offsetof/err.D_OFFSETOF_BITFIELD.bitfield.d | 50 + .../common/offsetof/err.D_OFFSETOF_TYPE.badtype.d | 44 + .../common/offsetof/err.D_OFFSETOF_TYPE.notsou.d | 44 + .../common/offsetof/err.D_UNKNOWN.OffsetofNULL.d | 49 + .../tst/common/offsetof/err.D_UNKNOWN.badmemb.d | 44 + .../test/tst/common/offsetof/tst.OffsetofAlias.d | 59 + .../test/tst/common/offsetof/tst.OffsetofArith.d | 73 + .../test/tst/common/offsetof/tst.OffsetofUnion.d | 59 + .../dtrace/test/tst/common/offsetof/tst.struct.d | 50 + .../test/tst/common/offsetof/tst.struct.d.out | 2 + .../dtrace/test/tst/common/offsetof/tst.union.d | 50 + .../test/tst/common/offsetof/tst.union.d.out | 2 + .../dtrace/test/tst/common/operators/Makefile.kup | 0 .../dtrace/test/tst/common/operators/tst.ternary.d | 48 + .../test/tst/common/operators/tst.ternary.d.out | 4 + .../cmd/dtrace/test/tst/common/pid/Makefile.kup | 0 .../test/tst/common/pid/err.D_PDESC_ZERO.badlib.d | 38 + .../tst/common/pid/err.D_PDESC_ZERO.badlib.exe | 29 + .../tst/common/pid/err.D_PDESC_ZERO.badproc1.d | 38 + .../tst/common/pid/err.D_PROC_BADPID.badproc2.d | 38 + .../tst/common/pid/err.D_PROC_CREATEFAIL.many.d | 36 + .../tst/common/pid/err.D_PROC_CREATEFAIL.many.exe | 29 + .../test/tst/common/pid/err.D_PROC_FUNC.badfunc.d | 40 + .../tst/common/pid/err.D_PROC_FUNC.badfunc.exe | 29 + .../test/tst/common/pid/err.D_PROC_LIB.libdash.d | 38 + .../test/tst/common/pid/err.D_PROC_LIB.libdash.exe | 29 + .../test/tst/common/pid/err.D_PROC_NAME.alldash.d | 38 + .../tst/common/pid/err.D_PROC_NAME.alldash.exe | 29 + .../test/tst/common/pid/err.D_PROC_NAME.badname.d | 38 + .../tst/common/pid/err.D_PROC_NAME.badname.exe | 29 + .../test/tst/common/pid/err.D_PROC_NAME.globdash.d | 38 + .../tst/common/pid/err.D_PROC_NAME.globdash.exe | 29 + .../test/tst/common/pid/err.D_PROC_OFF.toobig.d | 40 + .../test/tst/common/pid/err.D_PROC_OFF.toobig.exe | 29 + .../dtrace/test/tst/common/pid/tst.addprobes.ksh | 61 + .../cmd/dtrace/test/tst/common/pid/tst.args1.c | 52 + .../cmd/dtrace/test/tst/common/pid/tst.args1.d | 75 + .../cmd/dtrace/test/tst/common/pid/tst.coverage.d | 51 + .../dtrace/test/tst/common/pid/tst.coverage.exe | 29 + .../dtrace/test/tst/common/pid/tst.emptystack.d | 64 + .../test/tst/common/pid/tst.emptystack.d.out | 3 + .../dtrace/test/tst/common/pid/tst.emptystack.exe | 29 + .../cmd/dtrace/test/tst/common/pid/tst.float.c | 46 + .../cmd/dtrace/test/tst/common/pid/tst.float.d | 51 + .../onnv/cmd/dtrace/test/tst/common/pid/tst.fork.c | 63 + .../onnv/cmd/dtrace/test/tst/common/pid/tst.fork.d | 86 + .../onnv/cmd/dtrace/test/tst/common/pid/tst.gcc.c | 63 + .../onnv/cmd/dtrace/test/tst/common/pid/tst.gcc.d | 52 + .../dtrace/test/tst/common/pid/tst.killonerror.ksh | 41 + .../cmd/dtrace/test/tst/common/pid/tst.main.ksh | 59 + .../dtrace/test/tst/common/pid/tst.manypids.ksh | 70 + .../dtrace/test/tst/common/pid/tst.newprobes.ksh | 62 + .../test/tst/common/pid/tst.newprobes.ksh.out | 7 + .../dtrace/test/tst/common/pid/tst.probemod.ksh | 54 + .../dtrace/test/tst/common/pid/tst.provregex1.ksh | 93 + .../dtrace/test/tst/common/pid/tst.provregex2.ksh | 131 ++ .../test/tst/common/pid/tst.provregex2.ksh.out | 3 + .../dtrace/test/tst/common/pid/tst.provregex3.ksh | 102 + .../test/tst/common/pid/tst.provregex3.ksh.out | 3 + .../dtrace/test/tst/common/pid/tst.provregex4.ksh | 154 ++ .../test/tst/common/pid/tst.provregex4.ksh.out | 3 + .../onnv/cmd/dtrace/test/tst/common/pid/tst.ret1.c | 64 + .../onnv/cmd/dtrace/test/tst/common/pid/tst.ret1.d | 73 + .../onnv/cmd/dtrace/test/tst/common/pid/tst.ret2.c | 58 + .../onnv/cmd/dtrace/test/tst/common/pid/tst.ret2.d | 73 + .../cmd/dtrace/test/tst/common/pid/tst.vfork.c | 65 + .../cmd/dtrace/test/tst/common/pid/tst.vfork.d | 61 + .../cmd/dtrace/test/tst/common/pid/tst.weak1.c | 58 + .../cmd/dtrace/test/tst/common/pid/tst.weak1.d | 83 + .../cmd/dtrace/test/tst/common/pid/tst.weak2.c | 58 + .../cmd/dtrace/test/tst/common/pid/tst.weak2.d | 83 + .../dtrace/test/tst/common/plockstat/Makefile.kup | 0 .../test/tst/common/plockstat/tst.available.d | 39 + .../test/tst/common/plockstat/tst.available.exe | 29 + .../dtrace/test/tst/common/plockstat/tst.libmap.d | 39 + .../test/tst/common/plockstat/tst.libmap.exe | 29 + .../dtrace/test/tst/common/pointers/Makefile.kup | 0 .../dtrace/test/tst/common/pointers/err.BadAlign.d | 50 + .../common/pointers/err.D_ADDROF_VAR.ArrayVar.d | 47 + .../common/pointers/err.D_ADDROF_VAR.DynamicVar.d | 50 + .../tst/common/pointers/err.D_ADDROF_VAR.agg.d | 42 + .../tst/common/pointers/err.D_DEREF_NONPTR.noptr.d | 46 + .../pointers/err.D_DEREF_VOID.VoidPointerDeref.d | 52 + .../pointers/err.D_OP_ARRFUN.ArrayAssignment.d | 61 + .../pointers/err.D_OP_INCOMPAT.VoidPointerArith.d | 46 + .../common/pointers/err.D_OP_LVAL.AddressChange.d | 50 + .../pointers/err.D_OP_PTR.NonPointerAccess.d | 59 + .../tst/common/pointers/err.D_OP_PTR.badpointer.d | 50 + .../pointers/err.D_OP_SOU.BadPointerAccess.d | 51 + .../tst/common/pointers/err.D_OP_SOU.badpointer.d | 44 + .../test/tst/common/pointers/err.InvalidAddress1.d | 52 + .../test/tst/common/pointers/err.InvalidAddress2.d | 52 + .../test/tst/common/pointers/err.InvalidAddress3.d | 50 + .../test/tst/common/pointers/err.InvalidAddress4.d | 52 + .../test/tst/common/pointers/err.InvalidAddress5.d | 75 + .../test/tst/common/pointers/tst.ArrayPointer1.d | 174 ++ .../test/tst/common/pointers/tst.ArrayPointer2.d | 71 + .../test/tst/common/pointers/tst.ArrayPointer3.d | 72 + .../test/tst/common/pointers/tst.GlobalVar.d | 59 + .../tst/common/pointers/tst.IntegerArithmetic1.d | 72 + .../tst/common/pointers/tst.PointerArithmetic1.d | 58 + .../tst/common/pointers/tst.PointerArithmetic2.d | 72 + .../tst/common/pointers/tst.PointerArithmetic3.d | 61 + .../tst/common/pointers/tst.PointerAssignment.d | 71 + .../test/tst/common/pointers/tst.ValidPointer1.d | 49 + .../test/tst/common/pointers/tst.ValidPointer2.d | 49 + .../dtrace/test/tst/common/pointers/tst.VoidCast.d | 59 + .../dtrace/test/tst/common/pointers/tst.basic1.d | 47 + .../dtrace/test/tst/common/pointers/tst.basic2.d | 47 + .../cmd/dtrace/test/tst/common/pragma/Makefile.kup | 0 .../dtrace/test/tst/common/pragma/err.D_PRAGERR.d | 42 + .../tst/common/pragma/err.D_PRAGMA_DEPEND.main.d | 38 + .../test/tst/common/pragma/err.D_PRAGMA_INVAL.d | 45 + .../test/tst/common/pragma/err.D_PRAGMA_MALFORM.d | 42 + .../pragma/err.D_PRAGMA_UNUSED.UnusedPragma.d | 50 + .../test/tst/common/pragma/err.circlibdep.ksh | 58 + .../test/tst/common/pragma/err.invalidlibdep.ksh | 57 + .../dtrace/test/tst/common/pragma/tst.libchain.ksh | 58 + .../dtrace/test/tst/common/pragma/tst.libdep.ksh | 66 + .../tst/common/pragma/tst.libdepfullyconnected.ksh | 100 + .../dtrace/test/tst/common/predicates/Makefile.kup | 0 .../predicates/err.D_PRED_SCALAR.NonScalarPred.d | 44 + .../tst/common/predicates/err.D_SYNTAX.invalid.d | 50 + .../tst/common/predicates/err.D_SYNTAX.operr.d | 50 + .../test/tst/common/predicates/tst.argsnotcached.d | 55 + .../dtrace/test/tst/common/predicates/tst.basics.d | 57 + .../test/tst/common/predicates/tst.basics.d.out | 1 + .../test/tst/common/predicates/tst.complex.d | 126 ++ .../test/tst/common/predicates/tst.complex.d.out | 83 + .../test/tst/common/predicates/tst.predcache.ksh | 197 ++ .../test/tst/common/preprocessor/Makefile.kup | 0 .../preprocessor/err.D_IDENT_UNDEF.afterprobe.d | 51 + .../preprocessor/err.D_PRAGCTL_INVAL.tabdefine.d | 47 + .../preprocessor/err.D_SYNTAX.withoutpound.d | 47 + .../test/tst/common/preprocessor/err.defincomp.d | 47 + .../common/preprocessor/err.ifdefelsenotendif.d | 50 + .../test/tst/common/preprocessor/err.ifdefincomp.d | 48 + .../tst/common/preprocessor/err.ifdefnotendif.d | 47 + .../test/tst/common/preprocessor/err.incompelse.d | 47 + .../test/tst/common/preprocessor/err.mulelse.d | 55 + .../test/tst/common/preprocessor/tst.ifdef.d | 51 + .../test/tst/common/preprocessor/tst.ifdef.d.out | 2 + .../test/tst/common/preprocessor/tst.ifndef.d | 55 + .../test/tst/common/preprocessor/tst.ifndef.d.out | 2 + .../test/tst/common/preprocessor/tst.ifnotdef.d | 51 + .../tst/common/preprocessor/tst.ifnotdef.d.out | 2 + .../test/tst/common/preprocessor/tst.logicaland.d | 50 + .../tst/common/preprocessor/tst.logicaland.d.out | 2 + .../tst/common/preprocessor/tst.logicalandor.d | 50 + .../tst/common/preprocessor/tst.logicalandor.d.out | 2 + .../test/tst/common/preprocessor/tst.logicalor.d | 50 + .../tst/common/preprocessor/tst.logicalor.d.out | 2 + .../test/tst/common/preprocessor/tst.muland.d | 50 + .../test/tst/common/preprocessor/tst.muland.d.out | 2 + .../test/tst/common/preprocessor/tst.mulor.d | 50 + .../test/tst/common/preprocessor/tst.mulor.d.out | 2 + .../test/tst/common/preprocessor/tst.precondi.d | 48 + .../tst/common/preprocessor/tst.precondi.d.out | 2 + .../tst/common/preprocessor/tst.predicatedeclare.d | 49 + .../test/tst/common/preprocessor/tst.preexp.d | 48 + .../test/tst/common/preprocessor/tst.preexp.d.out | 2 + .../test/tst/common/preprocessor/tst.preexpelse.d | 51 + .../tst/common/preprocessor/tst.preexpelse.d.out | 2 + .../test/tst/common/preprocessor/tst.preexpif.d | 50 + .../tst/common/preprocessor/tst.preexpif.d.out | 2 + .../tst/common/preprocessor/tst.preexpifelse.d | 52 + .../tst/common/preprocessor/tst.preexpifelse.d.out | 2 + .../test/tst/common/preprocessor/tst.withinprobe.d | 50 + .../cmd/dtrace/test/tst/common/printa/Makefile.kup | 0 .../tst/common/printa/err.D_PRINTA_AGGARG.badagg.d | 40 + .../tst/common/printa/err.D_PRINTA_AGGARG.badfmt.d | 40 + .../tst/common/printa/err.D_PRINTA_AGGARG.badval.d | 41 + .../tst/common/printa/err.D_PRINTA_PROTO.bad.d | 40 + .../common/printa/err.D_PRINTF_ARG_TYPE.jstack.d | 36 + .../common/printa/err.D_PRINTF_ARG_TYPE.stack.d | 36 + .../common/printa/err.D_PRINTF_ARG_TYPE.ustack.d | 36 + .../cmd/dtrace/test/tst/common/printa/tst.basics.d | 58 + .../dtrace/test/tst/common/printa/tst.basics.d.out | 19 + .../cmd/dtrace/test/tst/common/printa/tst.def.d | 44 + .../dtrace/test/tst/common/printa/tst.def.d.out | 3 + .../dtrace/test/tst/common/printa/tst.dynwidth.d | 43 + .../test/tst/common/printa/tst.dynwidth.d.out | 5 + .../cmd/dtrace/test/tst/common/printa/tst.fmt.d | 43 + .../dtrace/test/tst/common/printa/tst.fmt.d.out | 1 + .../test/tst/common/printa/tst.largeusersym.ksh | 83 + .../cmd/dtrace/test/tst/common/printa/tst.many.d | 76 + .../dtrace/test/tst/common/printa/tst.manyval.d | 44 + .../test/tst/common/printa/tst.manyval.d.out | 2 + .../cmd/dtrace/test/tst/common/printa/tst.stack.d | 40 + .../cmd/dtrace/test/tst/common/printa/tst.tuple.d | 55 + .../dtrace/test/tst/common/printa/tst.tuple.d.out | 8 + .../test/tst/common/printa/tst.walltimestamp.ksh | 62 + .../tst/common/printa/tst.walltimestamp.ksh.out | 2 + .../cmd/dtrace/test/tst/common/printf/Makefile.kup | 0 .../common/printf/err.D_PRINTF_AGG_CONV.aggfmt.d | 40 + .../common/printf/err.D_PRINTF_ARG_EXTRA.toomany.d | 40 + .../common/printf/err.D_PRINTF_ARG_EXTRA.widths.d | 47 + .../common/printf/err.D_PRINTF_ARG_FMT.badfmt.d | 40 + .../common/printf/err.D_PRINTF_ARG_PROTO.novalue.d | 40 + .../common/printf/err.D_PRINTF_ARG_TYPE.aggarg.d | 42 + .../printf/err.D_PRINTF_ARG_TYPE.recursive.d | 46 + .../common/printf/err.D_PRINTF_DYN_PROTO.noprec.d | 40 + .../common/printf/err.D_PRINTF_DYN_PROTO.nowidth.d | 40 + .../common/printf/err.D_PRINTF_DYN_TYPE.badprec.d | 40 + .../common/printf/err.D_PRINTF_DYN_TYPE.badwidth.d | 40 + .../tst/common/printf/err.D_PROTO_LEN.toofew.d | 40 + .../test/tst/common/printf/err.D_SYNTAX.badconv1.d | 40 + .../test/tst/common/printf/err.D_SYNTAX.badconv2.d | 40 + .../test/tst/common/printf/err.D_SYNTAX.badconv3.d | 40 + .../cmd/dtrace/test/tst/common/printf/tst.basics.d | 73 + .../dtrace/test/tst/common/printf/tst.basics.d.out | 26 + .../cmd/dtrace/test/tst/common/printf/tst.flags.d | 49 + .../dtrace/test/tst/common/printf/tst.flags.d.out | 7 + .../cmd/dtrace/test/tst/common/printf/tst.hello.d | 44 + .../dtrace/test/tst/common/printf/tst.hello.d.out | 1 + .../cmd/dtrace/test/tst/common/printf/tst.ints.d | 87 + .../dtrace/test/tst/common/printf/tst.ints.d.out | 45 + .../cmd/dtrace/test/tst/common/printf/tst.precs.d | 58 + .../dtrace/test/tst/common/printf/tst.precs.d.out | 14 + .../dtrace/test/tst/common/printf/tst.print-f.d | 51 + .../test/tst/common/printf/tst.print-f.d.out | 4 + .../dtrace/test/tst/common/printf/tst.printT.ksh | 56 + .../test/tst/common/printf/tst.printT.ksh.out | 3 + .../dtrace/test/tst/common/printf/tst.printY.ksh | 56 + .../test/tst/common/printf/tst.printY.ksh.out | 3 + .../dtrace/test/tst/common/printf/tst.printcont.d | 60 + .../test/tst/common/printf/tst.printcont.d.out | 16 + .../dtrace/test/tst/common/printf/tst.printeE.d | 54 + .../test/tst/common/printf/tst.printeE.d.out | 6 + .../dtrace/test/tst/common/printf/tst.printgG.d | 54 + .../test/tst/common/printf/tst.printgG.d.out | 6 + .../cmd/dtrace/test/tst/common/printf/tst.rawfmt.d | 43 + .../dtrace/test/tst/common/printf/tst.rawfmt.d.out | 1 + .../cmd/dtrace/test/tst/common/printf/tst.str.d | 41 + .../dtrace/test/tst/common/printf/tst.str.d.out | 1 + .../cmd/dtrace/test/tst/common/printf/tst.sym.d | 43 + .../dtrace/test/tst/common/printf/tst.sym.d.out | 1 + .../cmd/dtrace/test/tst/common/printf/tst.uints.d | 47 + .../dtrace/test/tst/common/printf/tst.uints.d.out | 6 + .../cmd/dtrace/test/tst/common/printf/tst.widths.d | 59 + .../dtrace/test/tst/common/printf/tst.widths.d.out | 14 + .../dtrace/test/tst/common/printf/tst.widths1.d | 52 + .../cmd/dtrace/test/tst/common/printf/tst.wp.d | 66 + .../cmd/dtrace/test/tst/common/printf/tst.wp.d.out | 22 + .../cmd/dtrace/test/tst/common/privs/Makefile.kup | 0 .../test/tst/common/privs/tst.func_access.ksh | 82 + .../dtrace/test/tst/common/privs/tst.op_access.ksh | 70 + .../test/tst/common/privs/tst.unpriv_funcs.ksh | 79 + .../cmd/dtrace/test/tst/common/probes/Makefile.kup | 0 .../tst/common/probes/err.D_PDESC_ZERO.probeqtn.d | 51 + .../tst/common/probes/err.D_PDESC_ZERO.probestar.d | 45 + .../tst/common/probes/err.D_PDESC_ZERO.tickstar.d | 51 + .../test/tst/common/probes/err.D_SYNTAX.assign.d | 48 + .../test/tst/common/probes/err.D_SYNTAX.declare.d | 46 + .../tst/common/probes/err.D_SYNTAX.declarein.d | 46 + .../test/tst/common/probes/err.D_SYNTAX.lbraces.d | 43 + .../tst/common/probes/err.D_SYNTAX.probespec.d | 45 + .../test/tst/common/probes/err.D_SYNTAX.rbraces.d | 43 + .../test/tst/common/probes/err.D_SYNTAX.recdec.d | 46 + .../cmd/dtrace/test/tst/common/probes/tst.basic1.d | 44 + .../cmd/dtrace/test/tst/common/probes/tst.check.d | 51 + .../dtrace/test/tst/common/probes/tst.declare.d | 45 + .../test/tst/common/probes/tst.declareafter.d | 45 + .../dtrace/test/tst/common/probes/tst.emptyprobe.d | 47 + .../cmd/dtrace/test/tst/common/probes/tst.pragma.d | 44 + .../test/tst/common/probes/tst.pragmaaftertab.d | 44 + .../test/tst/common/probes/tst.pragmainside.d | 44 + .../test/tst/common/probes/tst.pragmaoutside.d | 44 + .../dtrace/test/tst/common/probes/tst.probestar.d | 50 + .../cmd/dtrace/test/tst/common/proc/Makefile.kup | 0 .../cmd/dtrace/test/tst/common/proc/tst.create.ksh | 67 + .../dtrace/test/tst/common/proc/tst.discard.ksh | 74 + .../cmd/dtrace/test/tst/common/proc/tst.exec.ksh | 73 + .../test/tst/common/proc/tst.execfail.ENOENT.ksh | 84 + .../dtrace/test/tst/common/proc/tst.execfail.ksh | 86 + .../dtrace/test/tst/common/proc/tst.exitcore.ksh | 95 + .../dtrace/test/tst/common/proc/tst.exitexit.ksh | 67 + .../dtrace/test/tst/common/proc/tst.exitkilled.ksh | 75 + .../cmd/dtrace/test/tst/common/proc/tst.signal.ksh | 84 + .../cmd/dtrace/test/tst/common/proc/tst.sigwait.c | 75 + .../cmd/dtrace/test/tst/common/proc/tst.sigwait.d | 41 + .../dtrace/test/tst/common/proc/tst.startexit.ksh | 89 + .../dtrace/test/tst/common/profile-n/Makefile.kup | 0 .../common/profile-n/err.D_PDESC_ZERO.profile.d | 45 + .../tst/common/profile-n/err.D_PDESC_ZEROonens.d | 44 + .../tst/common/profile-n/err.D_PDESC_ZEROonensec.d | 44 + .../tst/common/profile-n/err.D_PDESC_ZEROoneus.d | 44 + .../tst/common/profile-n/err.D_PDESC_ZEROoneusec.d | 44 + .../dtrace/test/tst/common/profile-n/tst.argtest.d | 53 + .../test/tst/common/profile-n/tst.argtest.d.out | 2 + .../dtrace/test/tst/common/profile-n/tst.basic.d | 45 + .../test/tst/common/profile-n/tst.basic.d.out | 2 + .../dtrace/test/tst/common/profile-n/tst.func.ksh | 74 + .../dtrace/test/tst/common/profile-n/tst.mod.ksh | 70 + .../test/tst/common/profile-n/tst.profilehz.d | 45 + .../test/tst/common/profile-n/tst.profilehz.d.out | 1 + .../test/tst/common/profile-n/tst.profilems.d | 45 + .../test/tst/common/profile-n/tst.profilems.d.out | 1 + .../test/tst/common/profile-n/tst.profilemsec.d | 45 + .../tst/common/profile-n/tst.profilemsec.d.out | 1 + .../test/tst/common/profile-n/tst.profilenhz.d | 45 + .../test/tst/common/profile-n/tst.profilenhz.d.out | 1 + .../test/tst/common/profile-n/tst.profilens.d | 45 + .../test/tst/common/profile-n/tst.profilens.d.out | 1 + .../test/tst/common/profile-n/tst.profilensec.d | 45 + .../tst/common/profile-n/tst.profilensec.d.out | 1 + .../test/tst/common/profile-n/tst.profiles.d | 45 + .../test/tst/common/profile-n/tst.profiles.d.out | 1 + .../test/tst/common/profile-n/tst.profilesec.d | 45 + .../test/tst/common/profile-n/tst.profilesec.d.out | 1 + .../test/tst/common/profile-n/tst.profileus.d | 45 + .../test/tst/common/profile-n/tst.profileus.d.out | 1 + .../test/tst/common/profile-n/tst.profileusec.d | 45 + .../tst/common/profile-n/tst.profileusec.d.out | 1 + .../dtrace/test/tst/common/profile-n/tst.sym.ksh | 70 + .../dtrace/test/tst/common/profile-n/tst.ufunc.ksh | 71 + .../test/tst/common/profile-n/tst.ufuncsort.c | 78 + .../test/tst/common/profile-n/tst.ufuncsort.ksh | 66 + .../tst/common/profile-n/tst.ufuncsort.ksh.out | 6 + .../dtrace/test/tst/common/profile-n/tst.umod.ksh | 69 + .../dtrace/test/tst/common/profile-n/tst.usym.ksh | 70 + .../dtrace/test/tst/common/providers/Makefile.kup | 0 .../common/providers/err.D_PDESC_INVAL.wrongdec4.d | 50 + .../common/providers/err.D_PDESC_ZERO.nonprofile.d | 50 + .../common/providers/err.D_PDESC_ZERO.wrongdec1.d | 49 + .../common/providers/err.D_PDESC_ZERO.wrongdec2.d | 49 + .../common/providers/err.D_PDESC_ZERO.wrongdec3.d | 49 + .../dtrace/test/tst/common/providers/tst.basics.d | 57 + .../test/tst/common/providers/tst.basics.d.out | 1 + .../test/tst/common/providers/tst.beginexit.d | 43 + .../test/tst/common/providers/tst.beginprof.d | 47 + .../test/tst/common/providers/tst.beginprof.d.out | 1 + .../test/tst/common/providers/tst.probattrs.d | 52 + .../test/tst/common/providers/tst.probattrs.d.out | 1 + .../test/tst/common/providers/tst.probefunc.d | 52 + .../test/tst/common/providers/tst.probefunc.d.out | 1 + .../test/tst/common/providers/tst.probemod.d | 52 + .../test/tst/common/providers/tst.probemod.d.out | 1 + .../test/tst/common/providers/tst.probename.d | 52 + .../test/tst/common/providers/tst.probename.d.out | 1 + .../test/tst/common/providers/tst.probprov.d | 52 + .../test/tst/common/providers/tst.probprov.d.out | 1 + .../dtrace/test/tst/common/providers/tst.profend.d | 57 + .../test/tst/common/providers/tst.profend.d.out | 2 + .../test/tst/common/providers/tst.profexit.d | 52 + .../test/tst/common/providers/tst.profexit.d.out | 1 + .../dtrace/test/tst/common/providers/tst.trace.d | 56 + .../test/tst/common/providers/tst.trace.d.out | 1 + .../dtrace/test/tst/common/providers/tst.twoprof.d | 58 + .../test/tst/common/providers/tst.twoprof.d.out | 1 + .../cmd/dtrace/test/tst/common/raise/Makefile.kup | 0 .../cmd/dtrace/test/tst/common/raise/tst.raise1.c | 47 + .../cmd/dtrace/test/tst/common/raise/tst.raise1.d | 67 + .../cmd/dtrace/test/tst/common/raise/tst.raise2.c | 52 + .../cmd/dtrace/test/tst/common/raise/tst.raise2.d | 67 + .../cmd/dtrace/test/tst/common/raise/tst.raise3.c | 52 + .../cmd/dtrace/test/tst/common/raise/tst.raise3.d | 67 + .../cmd/dtrace/test/tst/common/rates/Makefile.kup | 0 .../cmd/dtrace/test/tst/common/rates/tst.aggrate.d | 68 + .../dtrace/test/tst/common/rates/tst.aggrate.d.out | 101 + .../dtrace/test/tst/common/rates/tst.statusrate.d | 72 + .../dtrace/test/tst/common/rates/tst.switchrate.d | 62 + .../test/tst/common/rates/tst.switchrate.d.out | 101 + .../cmd/dtrace/test/tst/common/safety/Makefile.kup | 0 .../dtrace/test/tst/common/safety/tst.basename.d | 54 + .../cmd/dtrace/test/tst/common/safety/tst.caller.d | 54 + .../dtrace/test/tst/common/safety/tst.cleanpath.d | 54 + .../cmd/dtrace/test/tst/common/safety/tst.copyin.d | 83 + .../dtrace/test/tst/common/safety/tst.copyin2.d | 67 + .../test/tst/common/safety/tst.ddi_pathname.d | 54 + .../dtrace/test/tst/common/safety/tst.dirname.d | 54 + .../cmd/dtrace/test/tst/common/safety/tst.errno.d | 49 + .../dtrace/test/tst/common/safety/tst.execname.d | 49 + .../cmd/dtrace/test/tst/common/safety/tst.gid.d | 49 + .../cmd/dtrace/test/tst/common/safety/tst.hton.d | 78 + .../cmd/dtrace/test/tst/common/safety/tst.index.d | 67 + .../dtrace/test/tst/common/safety/tst.msgdsize.d | 64 + .../dtrace/test/tst/common/safety/tst.msgsize.d | 64 + .../cmd/dtrace/test/tst/common/safety/tst.null.d | 78 + .../cmd/dtrace/test/tst/common/safety/tst.pid.d | 49 + .../cmd/dtrace/test/tst/common/safety/tst.ppid.d | 49 + .../dtrace/test/tst/common/safety/tst.progenyof.d | 57 + .../cmd/dtrace/test/tst/common/safety/tst.random.d | 73 + .../cmd/dtrace/test/tst/common/safety/tst.rw.d | 64 + .../dtrace/test/tst/common/safety/tst.shortstr.d | 77 + .../cmd/dtrace/test/tst/common/safety/tst.stack.d | 52 + .../dtrace/test/tst/common/safety/tst.stackdepth.d | 53 + .../cmd/dtrace/test/tst/common/safety/tst.stddev.d | 52 + .../cmd/dtrace/test/tst/common/safety/tst.strchr.d | 66 + .../dtrace/test/tst/common/safety/tst.strjoin.d | 54 + .../cmd/dtrace/test/tst/common/safety/tst.strstr.d | 54 + .../cmd/dtrace/test/tst/common/safety/tst.strtok.d | 54 + .../cmd/dtrace/test/tst/common/safety/tst.substr.d | 54 + .../dtrace/test/tst/common/safety/tst.ucaller.d | 49 + .../cmd/dtrace/test/tst/common/safety/tst.uid.d | 49 + .../dtrace/test/tst/common/safety/tst.unalign.d | 60 + .../cmd/dtrace/test/tst/common/safety/tst.uregs.d | 52 + .../cmd/dtrace/test/tst/common/safety/tst.ustack.d | 52 + .../test/tst/common/safety/tst.ustackdepth.d | 53 + .../cmd/dtrace/test/tst/common/safety/tst.vahole.d | 69 + .../test/tst/common/safety/tst.violentdeath.ksh | 51 + .../dtrace/test/tst/common/safety/tst.zonename.d | 49 + .../dtrace/test/tst/common/scalars/Makefile.kup | 0 .../tst/common/scalars/err.D_ARR_LOCAL.thisarray.d | 46 + .../tst/common/scalars/err.D_DECL_CLASS.selfthis.d | 41 + .../tst/common/scalars/err.D_DECL_CLASS.thisself.d | 42 + .../tst/common/scalars/err.D_DECL_IDRED.errval.d | 44 + .../tst/common/scalars/err.D_OP_INCOMPAT.dec.err.d | 42 + .../common/scalars/err.D_OP_INCOMPAT.dupgtype.d | 41 + .../common/scalars/err.D_OP_INCOMPAT.dupltype.d | 41 + .../common/scalars/err.D_OP_INCOMPAT.dupttype.d | 42 + .../test/tst/common/scalars/err.D_SYNTAX.declare.d | 41 + .../dtrace/test/tst/common/scalars/tst.basicvar.d | 57 + .../test/tst/common/scalars/tst.basicvar.d.out | 2 + .../dtrace/test/tst/common/scalars/tst.localvar.d | 54 + .../cmd/dtrace/test/tst/common/scalars/tst.misc.d | 50 + .../cmd/dtrace/test/tst/common/scalars/tst.self.d | 42 + .../dtrace/test/tst/common/scalars/tst.selfarray.d | 48 + .../test/tst/common/scalars/tst.selfarray2.d | 64 + .../dtrace/test/tst/common/scalars/tst.selfthis.d | 45 + .../cmd/dtrace/test/tst/common/scalars/tst.this.d | 43 + .../dtrace/test/tst/common/scalars/tst.thisself.d | 44 + .../cmd/dtrace/test/tst/common/sched/Makefile.kup | 0 .../cmd/dtrace/test/tst/common/sched/tst.enqueue.d | 48 + .../cmd/dtrace/test/tst/common/sched/tst.oncpu.d | 54 + .../dtrace/test/tst/common/sched/tst.stackdepth.d | 41 + .../dtrace/test/tst/common/scripting/Makefile.kup | 0 .../scripting/err.D_MACRO_UNDEF.invalidargs.d | 43 + .../tst/common/scripting/err.D_OP_LVAL.rdonly.d | 43 + .../common/scripting/err.D_OP_WRITE.usepidmacro.d | 43 + .../tst/common/scripting/err.D_SYNTAX.concat.d | 45 + .../test/tst/common/scripting/err.D_SYNTAX.desc.d | 49 + .../test/tst/common/scripting/err.D_SYNTAX.inval.d | 43 + .../test/tst/common/scripting/err.D_SYNTAX.pid.d | 43 + .../scripting/tst.D_MACRO_UNUSED.overflow.ksh | 80 + .../dtrace/test/tst/common/scripting/tst.arg0.d | 43 + .../test/tst/common/scripting/tst.arguments.ksh | 90 + .../dtrace/test/tst/common/scripting/tst.assign.d | 43 + .../dtrace/test/tst/common/scripting/tst.basic.d | 42 + .../dtrace/test/tst/common/scripting/tst.egid.d | 43 + .../dtrace/test/tst/common/scripting/tst.egid.ksh | 97 + .../dtrace/test/tst/common/scripting/tst.euid.d | 44 + .../dtrace/test/tst/common/scripting/tst.euid.ksh | 86 + .../cmd/dtrace/test/tst/common/scripting/tst.gid.d | 43 + .../dtrace/test/tst/common/scripting/tst.gid.ksh | 86 + .../dtrace/test/tst/common/scripting/tst.pgid.d | 43 + .../cmd/dtrace/test/tst/common/scripting/tst.pid.d | 43 + .../dtrace/test/tst/common/scripting/tst.ppid.d | 43 + .../dtrace/test/tst/common/scripting/tst.ppid.ksh | 86 + .../dtrace/test/tst/common/scripting/tst.projid.d | 43 + .../test/tst/common/scripting/tst.projid.ksh | 86 + .../dtrace/test/tst/common/scripting/tst.quite.d | 42 + .../cmd/dtrace/test/tst/common/scripting/tst.sid.d | 43 + .../dtrace/test/tst/common/scripting/tst.sid.ksh | 86 + .../test/tst/common/scripting/tst.stringmacro.ksh | 78 + .../dtrace/test/tst/common/scripting/tst.taskid.d | 43 + .../test/tst/common/scripting/tst.taskid.ksh | 86 + .../dtrace/test/tst/common/scripting/tst.trace.d | 43 + .../cmd/dtrace/test/tst/common/scripting/tst.uid.d | 43 + .../dtrace/test/tst/common/scripting/tst.uid.ksh | 86 + .../cmd/dtrace/test/tst/common/sdt/Makefile.kup | 0 .../cmd/dtrace/test/tst/common/sdt/tst.sdtargs.c | 45 + .../cmd/dtrace/test/tst/common/sdt/tst.sdtargs.d | 67 + .../cmd/dtrace/test/tst/common/sizeof/Makefile.kup | 0 .../common/sizeof/err.D_IDENT_BADREF.SizeofAssoc.d | 51 + .../sizeof/err.D_IDENT_UNDEF.UnknownSymbol.d | 42 + .../test/tst/common/sizeof/err.D_SIZEOF_TYPE.d | 41 + .../tst/common/sizeof/err.D_SYNTAX.SizeofBadType.d | 42 + .../test/tst/common/sizeof/tst.SizeofArray.d | 61 + .../test/tst/common/sizeof/tst.SizeofDataTypes.d | 122 ++ .../test/tst/common/sizeof/tst.SizeofExpression.d | 64 + .../dtrace/test/tst/common/sizeof/tst.SizeofNULL.d | 48 + .../test/tst/common/sizeof/tst.SizeofStrConst.d | 42 + .../tst/common/sizeof/tst.SizeofStrConst.d.out | 2 + .../test/tst/common/sizeof/tst.SizeofString1.d | 51 + .../test/tst/common/sizeof/tst.SizeofString1.d.out | 3 + .../test/tst/common/sizeof/tst.SizeofString2.d | 44 + .../test/tst/common/sizeof/tst.SizeofString2.d.out | 2 + .../test/tst/common/speculation/Makefile.kup | 0 .../speculation/bug.1001148.SpecSizeVariations.d | 87 + .../common/speculation/err.BufSizeVariations1.d | 88 + .../common/speculation/err.BufSizeVariations2.d | 88 + .../err.D_ACT_SPEC.SpeculateWithBreakPoint.d | 69 + .../err.D_ACT_SPEC.SpeculateWithChill.d | 69 + .../err.D_ACT_SPEC.SpeculateWithCopyOut.d | 69 + .../err.D_ACT_SPEC.SpeculateWithCopyOutStr.d | 68 + .../err.D_ACT_SPEC.SpeculateWithPanic.d | 69 + .../err.D_ACT_SPEC.SpeculateWithRaise.d | 68 + .../speculation/err.D_ACT_SPEC.SpeculateWithStop.d | 68 + .../speculation/err.D_AGG_COMM.AggAftCommit.d | 40 + .../speculation/err.D_AGG_SPEC.SpeculateWithAvg.d | 67 + .../err.D_AGG_SPEC.SpeculateWithCount.d | 67 + .../err.D_AGG_SPEC.SpeculateWithLquant.d | 72 + .../speculation/err.D_AGG_SPEC.SpeculateWithMax.d | 62 + .../speculation/err.D_AGG_SPEC.SpeculateWithMin.d | 62 + .../err.D_AGG_SPEC.SpeculateWithQuant.d | 67 + .../err.D_AGG_SPEC.SpeculateWithStddev.d | 65 + .../speculation/err.D_AGG_SPEC.SpeculateWithSum.d | 62 + .../speculation/err.D_COMM_COMM.CommitAftCommit.d | 82 + .../speculation/err.D_COMM_COMM.DisjointCommit.d | 102 + .../speculation/err.D_COMM_DREC.CommitAftDataRec.d | 51 + .../speculation/err.D_DREC_COMM.DataRecAftCommit.d | 73 + .../speculation/err.D_DREC_COMM.ExitAfterCommit.d | 61 + .../speculation/err.D_EXIT_SPEC.ExitAftSpec.d | 70 + .../speculation/err.D_PRAGMA_MALFORM.NspecExpr.d | 77 + .../err.D_PRAGMA_OPTSET.HugeNspecValue.d | 76 + .../err.D_PRAGMA_OPTSET.InvalidSpecSize.d | 53 + .../speculation/err.D_PRAGMA_OPTSET.NegSpecSize.d | 78 + .../common/speculation/err.D_PROTO_LEN.SpecNoId.d | 61 + .../speculation/err.D_SPEC_COMM.SpecAftCommit.d | 72 + .../speculation/err.D_SPEC_DREC.SpecAftDataRec.d | 70 + .../speculation/err.D_SPEC_SPEC.SpecAftSpec.d | 66 + .../tst/common/speculation/err.NegativeBufSize.d | 88 + .../tst/common/speculation/err.NegativeNspec.d | 48 + .../tst/common/speculation/err.NegativeSpecSize.d | 47 + .../common/speculation/err.SpecSizeVariations1.d | 78 + .../common/speculation/err.SpecSizeVariations2.d | 78 + .../common/speculation/tst.CommitAfterDiscard.d | 86 + .../tst/common/speculation/tst.CommitWithZero.d | 66 + .../tst/common/speculation/tst.DataRecAftDiscard.d | 77 + .../tst/common/speculation/tst.DiscardAftCommit.d | 85 + .../tst/common/speculation/tst.DiscardAftDataRec.d | 50 + .../tst/common/speculation/tst.DiscardAftDiscard.d | 85 + .../tst/common/speculation/tst.DiscardWithZero.d | 67 + .../tst/common/speculation/tst.ExitAftDiscard.d | 56 + .../test/tst/common/speculation/tst.NoSpecBuffer.d | 64 + .../common/speculation/tst.SpecSizeVariations1.d | 78 + .../common/speculation/tst.SpecSizeVariations2.d | 78 + .../common/speculation/tst.SpecSizeVariations3.d | 78 + .../common/speculation/tst.SpeculateWithRandom.d | 59 + .../tst/common/speculation/tst.SpeculationCommit.d | 75 + .../common/speculation/tst.SpeculationDiscard.d | 74 + .../tst/common/speculation/tst.SpeculationID.d | 50 + .../common/speculation/tst.SpeculationWithZero.d | 65 + .../tst/common/speculation/tst.TwoSpecBuffers.d | 77 + .../test/tst/common/speculation/tst.negcommit.d | 37 + .../test/tst/common/speculation/tst.negspec.d | 37 + .../test/tst/common/speculation/tst.zerosize.d | 53 + .../dtrace/test/tst/common/stability/Makefile.kup | 0 .../stability/err.D_ATTR_MIN.MinAttributes.d | 50 + .../cmd/dtrace/test/tst/common/stack/Makefile.kup | 0 .../test/tst/common/stack/err.D_STACK_PROTO.bad.d | 43 + .../test/tst/common/stack/err.D_STACK_SIZE.d | 40 + .../tst/common/stack/err.D_USTACK_FRAMES.bad.d | 44 + .../test/tst/common/stack/err.D_USTACK_PROTO.bad.d | 44 + .../tst/common/stack/err.D_USTACK_STRSIZE.bad.d | 44 + .../cmd/dtrace/test/tst/common/stack/tst.default.d | 41 + .../dtrace/test/tst/common/stackdepth/Makefile.kup | 0 .../test/tst/common/stackdepth/tst.default.d | 41 + .../cmd/dtrace/test/tst/common/stop/Makefile.kup | 0 .../cmd/dtrace/test/tst/common/stop/tst.stop1.c | 37 + .../cmd/dtrace/test/tst/common/stop/tst.stop1.d | 78 + .../cmd/dtrace/test/tst/common/stop/tst.stop2.c | 37 + .../cmd/dtrace/test/tst/common/stop/tst.stop2.d | 78 + .../cmd/dtrace/test/tst/common/strlen/Makefile.kup | 0 .../dtrace/test/tst/common/strlen/tst.strlen1.d | 46 + .../cmd/dtrace/test/tst/common/struct/Makefile.kup | 0 .../common/struct/err.D_ADDROF_VAR.StructPointer.d | 59 + .../struct/err.D_DECL_COMBO.StructWithoutColon.d | 74 + .../struct/err.D_DECL_COMBO.StructWithoutColon1.d | 68 + .../common/struct/err.D_DECL_INCOMPLETE.circular.d | 66 + .../common/struct/err.D_DECL_INCOMPLETE.order.d | 69 + .../common/struct/err.D_DECL_INCOMPLETE.order2.d | 108 + .../struct/err.D_DECL_INCOMPLETE.recursive.d | 59 + .../common/struct/err.D_DECL_INCOMPLETE.simple.d | 59 + .../tst/common/struct/err.D_DECL_VOIDOBJ.baddec.d | 46 + .../common/struct/err.D_PROTO_ARG.DupStructAssoc.d | 80 + .../test/tst/common/struct/tst.StructAssoc.d | 71 + .../test/tst/common/struct/tst.StructDataTypes.d | 133 ++ .../test/tst/common/struct/tst.StructInside.d | 124 ++ .../test/tst/common/struct/tst.clauselocal.d | 52 + .../test/tst/common/struct/tst.clauselocal.d.out | 2 + .../dtrace/test/tst/common/syscall/Makefile.kup | 0 .../cmd/dtrace/test/tst/common/syscall/tst.args.c | 41 + .../cmd/dtrace/test/tst/common/syscall/tst.args.d | 46 + .../dtrace/test/tst/common/syscall/tst.openret.ksh | 75 + .../dtrace/test/tst/common/sysevent/Makefile.kup | 0 .../cmd/dtrace/test/tst/common/sysevent/tst.post.c | 45 + .../cmd/dtrace/test/tst/common/sysevent/tst.post.d | 88 + .../test/tst/common/sysevent/tst.post_chan.c | 49 + .../test/tst/common/sysevent/tst.post_chan.d | 87 + .../cmd/dtrace/test/tst/common/tick-n/Makefile.kup | 0 .../test/tst/common/tick-n/err.D_PDESC_ZERO.tick.d | 45 + .../test/tst/common/tick-n/err.D_PDESC_ZEROonens.d | 44 + .../tst/common/tick-n/err.D_PDESC_ZEROonensec.d | 44 + .../test/tst/common/tick-n/err.D_PDESC_ZEROoneus.d | 44 + .../tst/common/tick-n/err.D_PDESC_ZEROoneusec.d | 44 + .../dtrace/test/tst/common/tick-n/tst.tickarg0.d | 45 + .../cmd/dtrace/test/tst/common/tick-n/tst.tickms.d | 45 + .../dtrace/test/tst/common/tick-n/tst.tickms.d.out | 2 + .../dtrace/test/tst/common/tick-n/tst.tickmsec.d | 45 + .../test/tst/common/tick-n/tst.tickmsec.d.out | 2 + .../cmd/dtrace/test/tst/common/tick-n/tst.tickns.d | 45 + .../dtrace/test/tst/common/tick-n/tst.tickns.d.out | 2 + .../dtrace/test/tst/common/tick-n/tst.ticknsec.d | 45 + .../test/tst/common/tick-n/tst.ticknsec.d.out | 2 + .../cmd/dtrace/test/tst/common/tick-n/tst.ticks.d | 45 + .../dtrace/test/tst/common/tick-n/tst.ticks.d.out | 2 + .../dtrace/test/tst/common/tick-n/tst.ticksec.d | 49 + .../test/tst/common/tick-n/tst.ticksec.d.out | 2 + .../cmd/dtrace/test/tst/common/tick-n/tst.tickus.d | 45 + .../dtrace/test/tst/common/tick-n/tst.tickus.d.out | 2 + .../dtrace/test/tst/common/tick-n/tst.tickusec.d | 45 + .../test/tst/common/tick-n/tst.tickusec.d.out | 2 + .../cmd/dtrace/test/tst/common/trace/Makefile.kup | 0 .../test/tst/common/trace/err.D_PROTO_LEN.bad.d | 41 + .../test/tst/common/trace/err.D_TRACE_VOID.bad.d | 39 + .../cmd/dtrace/test/tst/common/trace/tst.misc.d | 63 + .../cmd/dtrace/test/tst/common/trace/tst.qstring.d | 48 + .../dtrace/test/tst/common/trace/tst.qstring.d.out | 3 + .../cmd/dtrace/test/tst/common/trace/tst.string.d | 43 + .../dtrace/test/tst/common/tracemem/Makefile.kup | 0 .../tst/common/tracemem/err.D_PROTO_ARG.badsize.d | 39 + .../tst/common/tracemem/err.D_PROTO_LEN.toofew.d | 40 + .../tst/common/tracemem/err.D_PROTO_LEN.toomany.d | 39 + .../common/tracemem/err.D_TRACEMEM_ADDR.badaddr.d | 39 + .../common/tracemem/err.D_TRACEMEM_SIZE.negsize.d | 39 + .../common/tracemem/err.D_TRACEMEM_SIZE.zerosize.d | 39 + .../dtrace/test/tst/common/tracemem/tst.rootvp.d | 54 + .../test/tst/common/translators/Makefile.kup | 0 .../translators/err.D_DECL_TYPERED.BadTransDecl.d | 64 + .../err.D_OP_INCOMPLETE.NonExistentInput1.d | 54 + .../translators/err.D_SYNTAX.BadTransDecl1.d | 60 + .../translators/err.D_SYNTAX.BadTransDecl3.d | 59 + .../translators/err.D_SYNTAX.BadTransDecl4.d | 65 + .../err.D_TYPE_MEMBER.NonExistentInput2.d | 60 + .../err.D_XLATE_INCOMPAT.BadInputType1.d | 60 + .../err.D_XLATE_MEMB.NonExistentOutput2.d | 60 + .../translators/err.D_XLATE_NONE.BadTransDecl6.d | 72 + .../err.D_XLATE_REDECL.RepeatTransDecl.d | 67 + .../translators/err.D_XLATE_SOU.BadTransDecl8.d | 58 + .../translators/err.D_XLATE_SOU.BadTransInt.d | 52 + .../err.D_XLATE_SOU.NonExistentOutput1.d | 55 + .../common/translators/man.TestTransStability.d | 61 + .../tst/common/translators/tst.CircularTransDecl.d | 100 + .../tst/common/translators/tst.EmptyTransDecl.d | 79 + .../test/tst/common/translators/tst.ForwardTag.d | 60 + .../tst/common/translators/tst.InputAliasTrans.d | 60 + .../tst/common/translators/tst.InputIntTrans.d | 60 + .../tst/common/translators/tst.OutputAliasTrans.d | 63 + .../common/translators/tst.PartialDereferencing.d | 85 + .../translators/tst.PartialOutputTransDefn.d | 60 + .../tst/common/translators/tst.ProcModelTrans.d | 53 + .../tst/common/translators/tst.RepeatDeclaration.d | 71 + .../translators/tst.SimultaneousTranslators.d | 71 + .../common/translators/tst.StructureAssignment.d | 85 + .../tst/common/translators/tst.TransNonPointer.d | 84 + .../common/translators/tst.TransOutputPointer.d | 80 + .../test/tst/common/translators/tst.TransPointer.d | 63 + .../tst/common/translators/tst.TranslateSelf.d | 76 + .../tst/common/translators/tst.UnionInputTrans.d | 61 + .../tst/common/translators/tst.UnionOutputTrans.d | 61 + .../dtrace/test/tst/common/typedef/Makefile.kup | 0 .../common/typedef/err.D_DECL_IDRED.DupTypeDef.d | 51 + .../typedef/err.D_SYNTAX.BadExistingTypedef.d | 45 + .../common/typedef/err.D_SYNTAX.TypedefInClause.d | 43 + .../test/tst/common/typedef/tst.ChainTypedef.d | 48 + .../tst/common/typedef/tst.TypedefDataAssign.d | 118 ++ .../cmd/dtrace/test/tst/common/types/Makefile.kup | 0 .../tst/common/types/err.D_CAST_INVAL.badcast.d | 45 + .../tst/common/types/err.D_CG_DYN.ResultDynType.d | 47 + .../tst/common/types/err.D_CHR_OFLOW.charconst.d | 46 + .../tst/common/types/err.D_DECL_BADCLASS.bad.d | 43 + .../common/types/err.D_DECL_CHARATTR.badtype3.d | 44 + .../tst/common/types/err.D_DECL_COMBO.badtype4.d | 44 + .../tst/common/types/err.D_DECL_COMBO.badtype5.d | 44 + .../tst/common/types/err.D_DECL_ENCONST.badeval.d | 39 + .../tst/common/types/err.D_DECL_ENOFLOW.enoflow.d | 38 + .../tst/common/types/err.D_DECL_ENOFLOW.enuflow.d | 39 + .../tst/common/types/err.D_DECL_SCOPE.scopeop.d | 46 + .../tst/common/types/err.D_DECL_USELESS.baddec.d | 43 + .../test/tst/common/types/err.D_OP_ACT.badcond.d | 46 + .../tst/common/types/err.D_OP_ARITH.badoperand.d | 44 + .../tst/common/types/err.D_OP_INCOMPAT.badassign.d | 44 + .../test/tst/common/types/err.D_OP_INT.badbitop.d | 43 + .../test/tst/common/types/err.D_OP_INT.badshift.d | 43 + .../tst/common/types/err.D_OP_SCALAR.badcond.d | 44 + .../tst/common/types/err.D_OP_SCALAR.badincop.d | 44 + .../tst/common/types/err.D_OP_SCALAR.badlogop.d | 43 + .../tst/common/types/err.D_PROTO_LEN.badcond1.d | 45 + .../test/tst/common/types/err.D_SYNTAX.badenum.d | 40 + .../test/tst/common/types/err.D_SYNTAX.badid.d | 46 + .../test/tst/common/types/err.D_SYNTAX.badstruct.d | 38 + .../test/tst/common/types/err.D_UNKNOWN.badtype1.d | 44 + .../test/tst/common/types/err.D_UNKNOWN.badtype2.d | 44 + .../test/tst/common/types/err.D_UNKNOWN.dupenum.d | 39 + .../tst/common/types/err.D_UNKNOWN.dupstruct.d | 39 + .../types/err.D_XLATE_REDECL.ResultDynType.d | 48 + .../dtrace/test/tst/common/types/tst.assignops.d | 82 + .../dtrace/test/tst/common/types/tst.badshiftops.d | 49 + .../cmd/dtrace/test/tst/common/types/tst.basics.d | 59 + .../dtrace/test/tst/common/types/tst.basics.d.out | 16 + .../cmd/dtrace/test/tst/common/types/tst.bitops.d | 62 + .../test/tst/common/types/tst.charconstants.d | 68 + .../cmd/dtrace/test/tst/common/types/tst.complex.d | 74 + .../dtrace/test/tst/common/types/tst.condexpr.d | 61 + .../dtrace/test/tst/common/types/tst.constants.d | 52 + .../cmd/dtrace/test/tst/common/types/tst.conv.d | 109 + .../cmd/dtrace/test/tst/common/types/tst.enum.d | 51 + .../dtrace/test/tst/common/types/tst.intincop.d | 70 + .../cmd/dtrace/test/tst/common/types/tst.intops.d | 70 + .../dtrace/test/tst/common/types/tst.inttypes.d | 52 + .../dtrace/test/tst/common/types/tst.ptrincop.d | 72 + .../cmd/dtrace/test/tst/common/types/tst.ptrops.d | 71 + .../cmd/dtrace/test/tst/common/types/tst.relenum.d | 73 + .../dtrace/test/tst/common/types/tst.relstring.d | 70 + .../dtrace/test/tst/common/types/tst.shiftops.d | 62 + .../test/tst/common/types/tst.stringconstants.d | 51 + .../cmd/dtrace/test/tst/common/types/tst.struct.d | 84 + .../cmd/dtrace/test/tst/common/types/tst.typedef.d | 85 + .../cmd/dtrace/test/tst/common/types/tst.unaryop.d | 50 + .../cmd/dtrace/test/tst/common/union/Makefile.kup | 0 .../common/union/err.D_ADDROF_VAR.UnionPointer.d | 60 + .../union/err.D_DECL_COMBO.UnionWithoutColon.d | 69 + .../union/err.D_DECL_COMBO.UnionWithoutColon1.d | 68 + .../common/union/err.D_DECL_INCOMPLETE.circular.d | 65 + .../tst/common/union/err.D_DECL_INCOMPLETE.order.d | 69 + .../common/union/err.D_DECL_INCOMPLETE.recursive.d | 59 + .../common/union/err.D_DECL_INCOMPLETE.simple.d | 58 + .../common/union/err.D_PROTO_ARG.DupUnionAssoc.d | 80 + .../dtrace/test/tst/common/union/tst.UnionAssoc.d | 71 + .../test/tst/common/union/tst.UnionDataTypes.d | 132 ++ .../dtrace/test/tst/common/union/tst.UnionInside.d | 85 + .../cmd/dtrace/test/tst/common/usdt/Makefile.kup | 0 .../onnv/cmd/dtrace/test/tst/common/usdt/argmap.d | 31 + .../onnv/cmd/dtrace/test/tst/common/usdt/args.d | 31 + .../onnv/cmd/dtrace/test/tst/common/usdt/forker.d | 31 + .../cmd/dtrace/test/tst/common/usdt/tst.andpid.ksh | 46 + .../cmd/dtrace/test/tst/common/usdt/tst.argmap.c | 39 + .../cmd/dtrace/test/tst/common/usdt/tst.argmap.d | 65 + .../cmd/dtrace/test/tst/common/usdt/tst.args.c | 39 + .../cmd/dtrace/test/tst/common/usdt/tst.args.d | 60 + .../dtrace/test/tst/common/usdt/tst.badguess.ksh | 84 + .../dtrace/test/tst/common/usdt/tst.corruptenv.ksh | 107 + .../dtrace/test/tst/common/usdt/tst.dlclose1.ksh | 159 ++ .../test/tst/common/usdt/tst.dlclose1.ksh.out | 3 + .../dtrace/test/tst/common/usdt/tst.dlclose2.ksh | 160 ++ .../test/tst/common/usdt/tst.dlclose2.ksh.out | 2 + .../dtrace/test/tst/common/usdt/tst.dlclose3.ksh | 170 ++ .../dtrace/test/tst/common/usdt/tst.eliminate.ksh | 106 + .../dtrace/test/tst/common/usdt/tst.enabled.ksh | 96 + .../test/tst/common/usdt/tst.enabled.ksh.out | 2 + .../dtrace/test/tst/common/usdt/tst.enabled2.ksh | 113 ++ .../test/tst/common/usdt/tst.enabled2.ksh.out | 3 + .../test/tst/common/usdt/tst.entryreturn.ksh | 118 ++ .../test/tst/common/usdt/tst.entryreturn.ksh.out | 10 + .../cmd/dtrace/test/tst/common/usdt/tst.fork.ksh | 105 + .../dtrace/test/tst/common/usdt/tst.fork.ksh.out | 4 + .../cmd/dtrace/test/tst/common/usdt/tst.forker.c | 47 + .../cmd/dtrace/test/tst/common/usdt/tst.forker.ksh | 55 + .../dtrace/test/tst/common/usdt/tst.guess32.ksh | 96 + .../dtrace/test/tst/common/usdt/tst.guess64.ksh | 100 + .../cmd/dtrace/test/tst/common/usdt/tst.header.ksh | 85 + .../dtrace/test/tst/common/usdt/tst.include.ksh | 61 + .../dtrace/test/tst/common/usdt/tst.linkpriv.ksh | 82 + .../dtrace/test/tst/common/usdt/tst.linkunpriv.ksh | 84 + .../dtrace/test/tst/common/usdt/tst.multiple.ksh | 99 + .../test/tst/common/usdt/tst.multiple.ksh.out | 5 + .../dtrace/test/tst/common/usdt/tst.nodtrace.ksh | 90 + .../test/tst/common/usdt/tst.onlyenabled.ksh | 82 + .../cmd/dtrace/test/tst/common/usdt/tst.reeval.ksh | 98 + .../cmd/dtrace/test/tst/common/usdt/tst.static.ksh | 98 + .../dtrace/test/tst/common/usdt/tst.static.ksh.out | 5 + .../dtrace/test/tst/common/usdt/tst.static2.ksh | 108 + .../test/tst/common/usdt/tst.static2.ksh.out | 5 + .../cmd/dtrace/test/tst/common/usdt/tst.user.ksh | 96 + .../dtrace/test/tst/common/usdt/tst.user.ksh.out | 2 + .../cmd/dtrace/test/tst/common/ustack/Makefile.kup | 0 .../dtrace/test/tst/common/ustack/tst.bigstack.c | 61 + .../dtrace/test/tst/common/ustack/tst.bigstack.d | 45 + .../dtrace/test/tst/common/ustack/tst.depth.ksh | 110 ++ .../cmd/dtrace/test/tst/common/ustack/tst.spin.c | 61 + .../cmd/dtrace/test/tst/common/ustack/tst.spin.ksh | 139 ++ .../cmd/dtrace/test/tst/common/vars/Makefile.kup | 0 .../onnv/cmd/dtrace/test/tst/common/vars/tst.gid.d | 41 + .../dtrace/test/tst/common/vars/tst.nullassign.d | 94 + .../cmd/dtrace/test/tst/common/vars/tst.ppid.d | 41 + .../dtrace/test/tst/common/vars/tst.ucaller.ksh | 65 + .../test/tst/common/vars/tst.ucaller.ksh.out | 3 + .../onnv/cmd/dtrace/test/tst/common/vars/tst.uid.d | 41 + .../test/tst/common/vars/tst.walltimestamp.d | 55 + .../dtrace/test/tst/common/version/Makefile.kup | 0 .../cmd/dtrace/test/tst/common/version/tst.1.0.d | 48 + .../onnv/cmd/dtrace/test/tst/i386/Makefile | 51 + .../onnv/cmd/dtrace/test/tst/i386/Makefile.kup | 0 .../cmd/dtrace/test/tst/i386/arrays/Makefile.kup | 0 .../dtrace/test/tst/i386/arrays/tst.uregsarray.d | 63 + .../cmd/dtrace/test/tst/i386/funcs/Makefile.kup | 0 .../cmd/dtrace/test/tst/i386/funcs/tst.badcopyin.d | 52 + .../dtrace/test/tst/i386/funcs/tst.badcopyinstr.d | 52 + .../dtrace/test/tst/i386/funcs/tst.badcopyout.d | 56 + .../dtrace/test/tst/i386/funcs/tst.badcopyoutstr.d | 56 + .../onnv/cmd/dtrace/test/tst/i386/pid/Makefile.kup | 0 .../cmd/dtrace/test/tst/i386/pid/tst.badinstr.d | 40 + .../cmd/dtrace/test/tst/i386/pid/tst.badinstr.s | 41 + .../onnv/cmd/dtrace/test/tst/i386/pid/tst.branch.d | 78 + .../onnv/cmd/dtrace/test/tst/i386/pid/tst.branch.s | 73 + .../cmd/dtrace/test/tst/i386/pid/tst.embedded.d | 73 + .../cmd/dtrace/test/tst/i386/pid/tst.embedded.s | 68 + .../onnv/cmd/dtrace/test/tst/i386/pid/tst.ret.d | 76 + .../onnv/cmd/dtrace/test/tst/i386/pid/tst.ret.s | 114 ++ .../cmd/dtrace/test/tst/i386/pid/tst.retlist.ksh | 50 + .../cmd/dtrace/test/tst/i386/pid/tst.retlist.s | 51 + .../cmd/dtrace/test/tst/i386/ustack/Makefile.kup | 0 .../dtrace/test/tst/i386/ustack/annotated_helper.d | 32 + .../dtrace/test/tst/i386/ustack/helper_helper.d | 32 + .../dtrace/test/tst/i386/ustack/tst.annotated.c | 43 + .../dtrace/test/tst/i386/ustack/tst.annotated.d | 35 + .../test/tst/i386/ustack/tst.annotated.d.out | 4 + .../dtrace/test/tst/i386/ustack/tst.circstack.d | 46 + .../dtrace/test/tst/i386/ustack/tst.circstack.s | 43 + .../cmd/dtrace/test/tst/i386/ustack/tst.helper.c | 82 + .../cmd/dtrace/test/tst/i386/ustack/tst.helper.d | 44 + .../dtrace/test/tst/i386/ustack/tst.helper.d.out | 4 + .../onnv/cmd/dtrace/test/tst/i86xpv/Makefile | 29 + .../onnv/cmd/dtrace/test/tst/i86xpv/Makefile.kup | 0 .../cmd/dtrace/test/tst/i86xpv/xdt/Makefile.kup | 0 .../cmd/dtrace/test/tst/i86xpv/xdt/tst.basic.ksh | 77 + .../dtrace/test/tst/i86xpv/xdt/tst.hvmenable.ksh | 64 + .../dtrace/test/tst/i86xpv/xdt/tst.memenable.ksh | 65 + .../dtrace/test/tst/i86xpv/xdt/tst.schedargs.ksh | 121 ++ .../dtrace/test/tst/i86xpv/xdt/tst.schedenable.ksh | 74 + .../onnv/cmd/dtrace/test/tst/sparc/Makefile | 51 + .../onnv/cmd/dtrace/test/tst/sparc/Makefile.kup | 0 .../cmd/dtrace/test/tst/sparc/arrays/Makefile.kup | 0 .../dtrace/test/tst/sparc/arrays/tst.uregsarray.d | 85 + .../cmd/dtrace/test/tst/sparc/pid/Makefile.kup | 0 .../tst/sparc/pid/err.D_PROC_ALIGN.misaligned.d | 40 + .../tst/sparc/pid/err.D_PROC_ALIGN.misaligned.exe | 29 + .../onnv/cmd/dtrace/test/tst/sparc/pid/tst.br.d | 70 + .../cmd/dtrace/test/tst/sparc/pid/tst.br.d.out | 23 + .../onnv/cmd/dtrace/test/tst/sparc/pid/tst.br.s | 81 + .../cmd/dtrace/test/tst/sparc/pid/tst.branch.d | 78 + .../cmd/dtrace/test/tst/sparc/pid/tst.branch.s | 63 + .../cmd/dtrace/test/tst/sparc/pid/tst.embedded.d | 73 + .../cmd/dtrace/test/tst/sparc/pid/tst.embedded.s | 59 + .../cmd/dtrace/test/tst/sparc/usdt/Makefile.kup | 0 .../dtrace/test/tst/sparc/usdt/tst.tailcall.ksh | 132 ++ .../cmd/dtrace/test/tst/sparc/ustack/Makefile.kup | 0 .../test/tst/sparc/ustack/annotated_helper.d | 32 + .../dtrace/test/tst/sparc/ustack/helper_helper.d | 32 + .../dtrace/test/tst/sparc/ustack/tst.annotated.c | 43 + .../dtrace/test/tst/sparc/ustack/tst.annotated.d | 35 + .../test/tst/sparc/ustack/tst.annotated.d.out | 4 + .../dtrace/test/tst/sparc/ustack/tst.circstack.d | 46 + .../dtrace/test/tst/sparc/ustack/tst.circstack.s | 44 + .../cmd/dtrace/test/tst/sparc/ustack/tst.helper.c | 81 + .../cmd/dtrace/test/tst/sparc/ustack/tst.helper.d | 44 + .../dtrace/test/tst/sparc/ustack/tst.helper.d.out | 4 + .../dtrace/test/tst/sparc/ustack/tst.trapstat.ksh | 87 + 1754 files changed, 96379 insertions(+) create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/Makefile create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/Makefile.com create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/amd64/Makefile create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/amd64/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/Makefile create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/act/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/act/time.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/agg/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/agg/clear.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/agg/dateprof.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/agg/denorm.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/agg/lquantize.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/agg/normalize.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/agg/renormalize.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/agg/trunc.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/agg/writes.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/agg/writesbycmd.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/agg/writesbycmdfd.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/agg/writetime.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/agg/writetimeq.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/anon/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/anon/iprb.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/buf/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/buf/ring.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/chapters create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/dtrace/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/dtrace/begin.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/dtrace/end.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/dtrace/error.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/fbt/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/fbt/delay.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/fbt/putnext.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/fbt/ssd.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/fbt/xioctl.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/intro/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/intro/countdown.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/intro/counter.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/intro/hello.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/intro/rwtime.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/intro/trussrw.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/io/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/io/applicat.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/io/iocpu.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/io/iosnoop.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/io/iothrough.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/io/iotime.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/io/whoio.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/io/whowrite.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/ip/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/ip/ipio.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/ip/ipproto.d create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/ip/tcprst.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/lockstat/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/lockstat/whatlock.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/mkdemo.pl create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/out/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/out/printa.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/proc/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/proc/lwptime.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/proc/progtime.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/proc/sig.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/proc/whoexec.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/profile/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/profile/prof.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/profile/profpri.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/profile/restest.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/firebird.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/howlong.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/nscd.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/pri.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/pritime.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/qlen.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/qtime.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/tick.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/ticktime.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/whatfor.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/where.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/whererun.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/whofor.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/whopreempt.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/whoqueue.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/whosteal.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/xterm.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/xwork.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/script/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/script/interp.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/script/syscall.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/script/tracewrite.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sdt/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sdt/callout.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sdt/interval.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sdt/intr.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/spec/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/spec/spec.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/spec/specopen.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/struct/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/struct/kstat.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/struct/ksyms.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/struct/rwinfo.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sysinfo/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sysinfo/find.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/tcp/Makefile.kup create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/tcp/tcp1stbyte.d create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/tcp/tcpbytes.d create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/tcp/tcpbytesstat.d create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/tcp/tcpconnlat.d create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/tcp/tcpio.d create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/tcp/tcpioflags.d create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/tcp/tcpsnoop.d create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/tcp/tcpstate.d create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/tcp/tcptop.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/udp/Makefile.kup create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/udp/udpbytes.d create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/udp/udpbytesstat.d create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/udp/udpio.d create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/udp/udpsnoop.d create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/udp/udptop.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/user/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/user/badopen.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/user/errorpath.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/user/libc.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/user/userfunc.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/vars/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/vars/clause.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/vars/rtime.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/vminfo/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/vminfo/soffice.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/dtrace.c create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/i386/Makefile create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/i386/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/sparc/Makefile create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/sparc/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/sparcv9/Makefile create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/sparcv9/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/Makefile create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/Makefile.subdirs create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/README create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/Makefile create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/baddof/Makefile create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/baddof/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/baddof/baddof.c create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/badioctl/Makefile create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/badioctl/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/badioctl/badioctl.c create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/chkargs/Makefile create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/chkargs/Makefile.com create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/chkargs/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/chkargs/amd64/Makefile create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/chkargs/amd64/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/chkargs/chkargs.c create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/chkargs/i386/Makefile create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/chkargs/i386/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/chkargs/sparc/Makefile create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/chkargs/sparc/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/chkargs/sparcv9/Makefile create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/chkargs/sparcv9/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/jdtrace/Getopt.java create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/jdtrace/JDTrace.java create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/jdtrace/Makefile create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/jdtrace/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/jdtrace/exception.lst create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/jdtrace/jdtrace.c create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/jdtrace/manifest/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/jdtrace/manifest/jdtrace.jar-manifest create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/scripts/Makefile create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/scripts/Makefile.kup create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/scripts/dstyle.pl create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/scripts/dtest.pl create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/Makefile create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/Makefile.com create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/Makefile create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_AGG_FUNC.bad.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_AGG_MDIM.bad.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_AGG_NULL.bad.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_AGG_REDEF.redef.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_AGG_SCALAR.avgtoofew.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_AGG_SCALAR.maxnoarg.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_AGG_SCALAR.mintoofew.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_AGG_SCALAR.quantizetoofew.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_AGG_SCALAR.stddevtoofew.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_AGG_SCALAR.sumtoofew.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_CLEAR_AGGARG.bad.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_CLEAR_PROTO.bad.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_FUNC_IDENT.bad.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_FUNC_UNDEF.badaggfunc.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_IDENT_UNDEF.badexpr.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_IDENT_UNDEF.badkey3.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_IDENT_UNDEF.noeffect.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_KEY_TYPE.badkey1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_KEY_TYPE.badkey2.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_KEY_TYPE.badkey4.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_BASETYPE.lqbad1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_BASETYPE.lqshort.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_BASEVAL.bad.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_LIMTYPE.lqbad1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_LIMVAL.bad.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_MATCHBASE.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_MATCHBASE.order.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_MATCHLIM.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_MATCHLIM.order.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_MATCHSTEP.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_MISMATCH.lqbadarg.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_STEPLARGE.lqtoofew.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_STEPSMALL.bad.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_STEPTYPE.lqbadinc.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_STEPVAL.bad.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_NORMALIZE_AGGARG.bad.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_NORMALIZE_PROTO.bad.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_NORMALIZE_SCALAR.bad.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_ARG.lquantizetoofew.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.avgnoarg.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.avgtoomany.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.counttoomany.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.lquantizenoarg.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.lquantizetoomany.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.maxnoarg.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.maxtoomany.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.minnoarg.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.mintoomany.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.quantizenoarg.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.quantizetoomany.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.stddevnoarg.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.stddevtoomany.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.sumnoarg.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.sumtoomany.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_TRUNC_AGGARG.bad.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_TRUNC_PROTO.badmany.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_TRUNC_PROTO.badnone.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_TRUNC_SCALAR.bad.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.allquant.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.allquant.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.avg.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.avg.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.avg_neg.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.avg_neg.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.clear.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.clear.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.clearavg.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.clearavg.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.clearavg2.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.clearavg2.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.cleardenormalize.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.cleardenormalize.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.clearlquantize.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.clearlquantize.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.clearnormalize.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.clearnormalize.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.clearstddev.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.clearstddev.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.count.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.count.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.count2.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.count2.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.count3.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.denormalize.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.denormalize.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.denormalizeonly.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.denormalizeonly.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.fmtnormalize.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.fmtnormalize.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.forms.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.forms.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.goodkey.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.keysort.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.keysort.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.lquantize.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.lquantize.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.lquantnormal.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.lquantnormal.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.lquantrange.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.lquantrange.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.lquantround.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.lquantround.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.lquantzero.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.lquantzero.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.max.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.max.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.max_neg.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.max_neg.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.min.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.min.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.min_neg.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.min_neg.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.multiaggs1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.multiaggs2.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.multiaggs2.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.multiaggs3.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.multiaggs3.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.multinormalize.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.multinormalize.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.neglquant.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.neglquant.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.negorder.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.negorder.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.negquant.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.negquant.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.negtrunc.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.negtrunc.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.negtruncquant.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.negtruncquant.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.normalize.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.normalize.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.order.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.order.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.quantize.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.quantize.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.quantmany.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.quantmany.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.quantround.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.quantround.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.quantzero.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.quantzero.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.signature.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.signedkeys.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.signedkeys.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.signedkeyspos.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.signedkeyspos.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.stddev.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.stddev.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.subr.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.sum.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.sum.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.trunc.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.trunc.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.trunc0.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.trunc0.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.truncquant.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.truncquant.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.valsortkeypos.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.valsortkeypos.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arithmetic/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arithmetic/err.D_DIV_ZERO.divby0.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arithmetic/err.D_DIV_ZERO.divby0_1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arithmetic/err.D_DIV_ZERO.divby0_2.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arithmetic/err.D_DIV_ZERO.modby0.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arithmetic/err.D_SYNTAX.addmin.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arithmetic/err.D_SYNTAX.divmin.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arithmetic/err.D_SYNTAX.muladd.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arithmetic/err.D_SYNTAX.muldiv.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arithmetic/tst.basics.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arithmetic/tst.complex.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arrays/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arrays/err.D_ARR_BADREF.bad.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arrays/err.D_DECL_ARRBIG.toobig.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arrays/err.D_DECL_ARRNULL.bad.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arrays/err.D_DECL_ARRSUB.bad.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arrays/err.D_DECL_PROTO_TYPE.badtuple.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arrays/err.D_IDENT_UNDEF.badureg.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arrays/tst.basic1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arrays/tst.basic2.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arrays/tst.basic3.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arrays/tst.basic4.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arrays/tst.basic5.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arrays/tst.basic6.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arrays/tst.uregsarray.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/err.D_OP_INCOMPAT.dupgtype.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/err.D_OP_INCOMPAT.dupttype.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/err.D_OP_INCOMPAT.this.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/err.D_PROTO_ARG.badsig.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/err.D_PROTO_LEN.toofew.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/err.D_PROTO_LEN.toomany.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/err.D_SYNTAX.errassign.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/err.tupoflow.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/tst.cpyarray.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/tst.diffprofile.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/tst.initialize.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/tst.invalidref.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/tst.misc.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/tst.orthogonality.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/tst.this.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/tst.valassign.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/begin/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/begin/err.D_PDESC_ZERO.begin.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/begin/err.D_PDESC_ZERO.tick.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/begin/tst.begin.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/begin/tst.begin.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/begin/tst.multibegin.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/begin/tst.multibegin.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/bitfields/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/bitfields/err.D_ADDROF_BITFIELD.BitfieldAddress.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/bitfields/err.D_DECL_BFCONST.NegBitField.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/bitfields/err.D_DECL_BFCONST.ZeroBitField.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/bitfields/err.D_DECL_BFSIZE.ExceedBaseType.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/bitfields/err.D_DECL_BFSIZE.GreaterThan64.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/bitfields/err.D_DECL_BFTYPE.badtype.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/bitfields/err.D_OFFSETOF_BITFIELD.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/bitfields/err.D_SIZEOF_BITFIELD.SizeofBitfield.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/bitfields/tst.BitFieldPromotion.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/bitfields/tst.SizeofBitField.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/err.end.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/err.resize1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/err.resize2.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/err.resize3.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/err.zerobuf.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.alignring.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.cputime.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.dynvarsize.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.fill1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.fill1.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.resize1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.resize2.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.resize3.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.ring1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.ring2.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.ring2.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.ring3.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.ring3.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.smallring.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.switch1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.switch1.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/err.D_XLATE_NOCONV.cpuusage.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/err.D_XLATE_NOCONV.nice.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/err.D_XLATE_NOCONV.priority.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/err.D_XLATE_NOCONV.prsize.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/err.D_XLATE_NOCONV.rssize.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.arg0.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.arg0clause.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.arg1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.arg1to8.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.arg1to8clause.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.caller.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.caller1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.epid.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.epid1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.errno.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.errno1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.execname.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.hpriority.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.id.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.id1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.ipl.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.ipl1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.lwpsinfo.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.lwpsinfo1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.pid.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.pid1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.psinfo.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.psinfo1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.tid.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.tid1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.timestamp.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.vtimestamp.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/clauses/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/clauses/err.D_IDENT_UNDEF.aggfun.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/clauses/err.D_IDENT_UNDEF.aggtup.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/clauses/err.D_IDENT_UNDEF.arrtup.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/clauses/err.D_IDENT_UNDEF.body.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/clauses/err.D_IDENT_UNDEF.both.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/clauses/err.D_IDENT_UNDEF.pred.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/clauses/tst.nopred.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/clauses/tst.pred.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/clauses/tst.predfirst.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/clauses/tst.predlast.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/cpc/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/cpc/err.D_PDESC_ZERO.lowfrequency.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/cpc/err.D_PDESC_ZERO.malformedoverflow.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/cpc/err.D_PDESC_ZERO.nonexistentevent.d create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/cpc/err.cpcvscpustatpart1.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/cpc/err.cpcvscpustatpart2.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/cpc/err.cputrackfailtostart.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/cpc/err.cputrackterminates.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/cpc/err.toomanyenablings.d create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/cpc/tst.allcpus.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/cpc/tst.genericevent.d create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/cpc/tst.platformevent.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/err.D_DECL_LOCASSC.NonLocalAssoc.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/err.D_DECL_LONGINT.LongStruct.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/err.D_DECL_PARMCLASS.BadStorageClass.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/err.D_DECL_PROTO_NAME.VoidName.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/err.D_DECL_PROTO_TYPE.Dyn.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/err.D_DECL_PROTO_VARARGS.VarLenArgs.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/err.D_DECL_PROTO_VOID.NonSoleVoid.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/err.D_DECL_SIGNINT.UnsignedStruct.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/err.D_DECL_VOIDATTR.ShortVoidDecl.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/tst.arrays.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/tst.basics.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/tst.funcs.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/tst.pointers.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/tst.varargsfuncs.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/badptr.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/countdown.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/counter.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/errorpath.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/hello.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/kstat.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/ksyms.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/renormalize.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/rtime.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/rw.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/rwinfo.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/rwtime.d create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/specopen.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/truss.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/trussrw.d create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/userfunc.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/drops/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/drops/drp.DTRACEDROP_AGGREGATION.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/drops/drp.DTRACEDROP_DBLERROR.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/drops/drp.DTRACEDROP_DYNAMIC.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/drops/drp.DTRACEDROP_PRINCIPAL.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/drops/drp.DTRACEDROP_PRINCIPAL.end.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/drops/drp.DTRACEDROP_SPEC.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/drops/drp.DTRACEDROP_SPECUNAVAIL.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/drops/drp.DTRACEDROP_STKSTROVERFLOW.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/err.D_PDESC_ZERO.InvalidDescription1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.APIVersion.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.AddSearchPath.d create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.CoalesceTrace.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.ELFGeneration.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.IncludedFilePath.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.ListProbesWithFunctions create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.ListProbesWithIDs create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.ListProbesWithModules create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.ListProbesWithNames create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.ListProbesWithProviders create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.ShowCompilerCode.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.TraceFunctions create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.TraceIDs create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.TraceModule create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.TraceNames create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.TraceProvider create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.VerboseStabilityReport.d create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.AddSearchPath.d.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.BufsizeGiga.d.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.BufsizeKilo.d.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.BufsizeMega.d.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.BufsizeTera.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DataModel32.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DataModel64.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DefineNameWithCPP.d.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DefineNameWithCPP.d.ksh.out create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithFunction.d.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithFunction.d.ksh.out create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithID.d.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithID.d.ksh.out create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithModule.d.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithModule.d.ksh.out create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithName.d.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithName.d.ksh.out create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithProvider.d.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithProvider.d.ksh.out create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithoutW.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ELFGenerationOut.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ELFGenerationWithO.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ExitStatus1.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ExitStatus2.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ExtraneousProbeIds.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidFuncName1.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidFuncName2.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidId1.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidId2.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidId3.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidModule1.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidModule2.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidModule3.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidModule4.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidProbeIdentifier.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidProvider1.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidProvider2.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidProvider3.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidProvider4.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceFunc1.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceFunc2.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceFunc3.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceFunc4.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceFunc5.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceFunc6.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceFunc7.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceFunc8.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceFunc9.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceID1.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceID2.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceID3.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceID4.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceID5.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceID6.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceID7.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceModule1.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceModule2.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceModule3.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceModule4.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceModule5.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceModule6.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceModule7.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceModule8.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceName1.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceName2.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceName3.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceName4.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceName5.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceName6.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceName7.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceName8.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceName9.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceProvider1.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceProvider2.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceProvider3.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceProvider4.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceProvider5.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.MultipleInvalidProbeId.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.PreprocessorStatement.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.QuietMode.d.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.QuietMode.d.ksh.out create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.TestCompile.d.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.TestCompile.d.ksh.out create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.UnDefineNameWithCPP.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ZeroFunctionProbes.d.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ZeroFunctionProbes.d.ksh.out create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ZeroModuleProbes.d.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ZeroModuleProbes.d.ksh.out create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ZeroNameProbes.d.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ZeroNameProbes.d.ksh.out create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ZeroProbeIdentfier.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ZeroProbesWithoutZ.d.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ZeroProviderProbes.d.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ZeroProviderProbes.d.ksh.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/end/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/end/err.D_IDENT_UNDEF.timespent.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/end/tst.end.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/end/tst.endwithoutbegin.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/end/tst.multibeginend.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/end/tst.multiend.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/enum/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/enum/err.D_DECL_IDRED.EnumSameName.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/enum/err.D_UNKNOWN.RepeatIdentifiers.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/enum/tst.EnumEquality.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/enum/tst.EnumSameValue.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/enum/tst.EnumValAssign.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/error/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/error/tst.DTRACEFLT_BADADDR.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/error/tst.DTRACEFLT_DIVZERO.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/error/tst.DTRACEFLT_UNKNOWN.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/error/tst.error.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/error/tst.errorend.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/exit/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/exit/err.D_PROTO_LEN.noarg.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/exit/err.exitarg1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/exit/tst.basic1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/err.D_PDESC_ZERO.notreturn.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.basic.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.functionentry.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.functionreturnvalue.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.ioctlargs.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.offset.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.offsetzero.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.return.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.return0.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.tailcall.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_FUNC_UNDEF.progenyofbad1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_OP_VFPTR.badop.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_ARG.chillbadarg.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_ARG.copyoutbadarg.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_ARG.mobadarg.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_ARG.raisebadarg.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.allocanoarg.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.badbreakpoint.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.chilltoofew.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.chilltoomany.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.copyoutstrbadarg.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.copyoutstrtoofew.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.copyouttoofew.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.copyouttoomany.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.motoofew.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.motoomany.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.mtabadarg.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.mtatoofew.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.mtatoomany.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.panicbadarg.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.progenyofbad2.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.stopbadarg.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_STRINGOF_TYPE.badstringof.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_VAR_UNDEF.badvar.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.badalloca.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.badalloca2.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.badbcopy.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.badbcopy1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.badbcopy2.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.badbcopy3.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.badbcopy4.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.badbcopy5.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.badbcopy6.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.badchill.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.chillbadarg.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.copyout.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.copyoutbadaddr.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.copyoutstrbadaddr.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.inet_ntoa6badaddr.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.inet_ntoabadaddr.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.inet_ntopbadaddr.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.inet_ntopbadarg.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.badfreopen.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.basename.d create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.basename.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.bcopy.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.chill.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.cleanpath.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.cleanpath.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.copyin.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.copyinto.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.ddi_pathname.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.default.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.freopen.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.ftruncate.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.ftruncate.ksh.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.hton.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.index.d create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.index.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.inet_ntoa.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.inet_ntoa.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.inet_ntoa6.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.inet_ntoa6.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.inet_ntop.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.inet_ntop.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.lltostr.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.lltostr.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.mutex_owned.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.mutex_owner.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.mutex_type_adaptive.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.progenyof.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.rand.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.strchr.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.strchr.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.strjoin.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.strjoin.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.strstr.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.strstr.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.strtok.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.strtok.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.strtok_null.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.substr.d create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.substr.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.substrminate.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.substrminate.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.system.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.system.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/grammar/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/grammar/err.D_ADDROF_LVAL.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/grammar/err.D_EMPTY.empty.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/grammar/tst.clauses.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/grammar/tst.stmts.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/inline/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/inline/err.D_DECL_IDRED.redef1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/inline/err.D_DECL_IDRED.redef2.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/inline/err.D_IDENT_UNDEF.recur.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/inline/err.D_OP_INCOMPAT.baddef1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/inline/err.D_OP_INCOMPAT.baddef2.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/inline/err.D_OP_INCOMPAT.badxlate.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/inline/tst.InlineDataAssign.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/inline/tst.InlineExpression.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/inline/tst.InlineKinds.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/inline/tst.InlineKinds.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/inline/tst.InlineTypedef.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/inline/tst.InlineWritableAssign.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/io/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/io/tst.fds.c create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/io/tst.fds.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/io/tst.fds.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/Makefile.kup create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/get.ipv4remote.pl create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/get.ipv6remote.pl create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv4localicmp.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv4localicmp.ksh.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv4localtcp.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv4localtcp.ksh.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv4localudp.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv4localudp.ksh.out create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv4remoteicmp.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv4remoteicmp.ksh.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv4remotetcp.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv4remotetcp.ksh.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv4remoteudp.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv4remoteudp.ksh.out create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv6localicmp.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv6localicmp.ksh.out create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv6remoteicmp.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv6remoteicmp.ksh.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.localtcpstate.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.localtcpstate.ksh.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.remotetcpstate.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.remotetcpstate.ksh.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/Makefile create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/manifest/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/manifest/test.jar-manifest create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/src/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/src/TestAbort.java create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/src/TestBean.java create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/src/TestClose.java create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/src/TestDrop.java create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/src/TestEnable.java create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/src/TestFunctionLookup.java create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/src/TestGetAggregate.java create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/src/TestMaxConsumers.java create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/src/TestMultiAggPrinta.java create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/src/TestProbeData.java create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/src/TestProbeDescription.java create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/src/TestStateMachine.java create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/src/TestStopLock.java create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/tst.Abort.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/tst.Abort.ksh.out create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/tst.Bean.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/tst.Bean.ksh.out create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/tst.Close.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/tst.Close.ksh.out create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/tst.Drop.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/tst.Drop.ksh.out create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/tst.Enable.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/tst.Enable.ksh.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/tst.FunctionLookup.c create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/tst.FunctionLookup.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/tst.FunctionLookup.ksh.out create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/tst.GetAggregate.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/tst.MaxConsumers.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/tst.MaxConsumers.ksh.out create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/tst.MultiAggPrinta.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/tst.MultiAggPrinta.ksh.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/tst.ProbeData.c create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/tst.ProbeData.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/tst.ProbeData.ksh.out create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/tst.ProbeDescription.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/tst.ProbeDescription.ksh.out create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/tst.StateMachine.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/tst.StateMachine.ksh.out create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/tst.StopLock.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/tst.StopLock.ksh.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/tst.printa.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/tst.printa.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/lexer/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/lexer/err.D_CHR_NL.char.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/lexer/err.D_CHR_NULL.char.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/lexer/err.D_INT_DIGIT.InvalidDigit.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/lexer/err.D_INT_OFLOW.BigInt.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/lexer/err.D_STR_NL.string.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/lexer/err.D_SYNTAX.brace1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/lexer/err.D_SYNTAX.brace2.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/lexer/err.D_SYNTAX.brack1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/lexer/err.D_SYNTAX.brack2.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/lexer/err.D_SYNTAX.brack3.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/lexer/err.D_SYNTAX.paren1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/lexer/err.D_SYNTAX.paren2.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/lexer/err.D_SYNTAX.paren3.d create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/lexer/tst.D_MACRO_OFLOW.ParIntOvflow.d.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/mdb/Makefile.kup create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/mdb/tst.dtracedcmd.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/mib/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/mib/tst.icmp.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/mib/tst.tcp.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/mib/tst.udp.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/misc/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/misc/err.D_PRAGMA_OPTSET.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/misc/tst.badopt.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/misc/tst.boolopt.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/misc/tst.boolopt.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/misc/tst.dynopt.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/misc/tst.dynopt.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/misc/tst.enablerace.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/misc/tst.haslam.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/misc/tst.include.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/misc/tst.macroglob.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/misc/tst.macroglob.ksh.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/misc/tst.roch.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/misc/tst.schrock.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/multiaggs/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/multiaggs/err.D_PRINTA_AGGKEY.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/multiaggs/err.D_PRINTA_AGGPROTO.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/multiaggs/tst.many.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/multiaggs/tst.many.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/multiaggs/tst.same.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/multiaggs/tst.same.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/multiaggs/tst.sort.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/multiaggs/tst.sort.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/multiaggs/tst.sortpos.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/multiaggs/tst.sortpos.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/multiaggs/tst.tuplecompat.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/multiaggs/tst.tuplecompat.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/multiaggs/tst.zero.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/multiaggs/tst.zero.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/multiaggs/tst.zero2.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/multiaggs/tst.zero2.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/multiaggs/tst.zero3.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/multiaggs/tst.zero3.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/nfs/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/nfs/tst.call.c create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/nfs/tst.call.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/nfs/tst.call3.c create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/nfs/tst.call3.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/offsetof/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/offsetof/err.D_OFFSETOF_BITFIELD.bitfield.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/offsetof/err.D_OFFSETOF_TYPE.badtype.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/offsetof/err.D_OFFSETOF_TYPE.notsou.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/offsetof/err.D_UNKNOWN.OffsetofNULL.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/offsetof/err.D_UNKNOWN.badmemb.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/offsetof/tst.OffsetofAlias.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/offsetof/tst.OffsetofArith.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/offsetof/tst.OffsetofUnion.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/offsetof/tst.struct.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/offsetof/tst.struct.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/offsetof/tst.union.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/offsetof/tst.union.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/operators/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/operators/tst.ternary.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/operators/tst.ternary.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pid/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pid/err.D_PDESC_ZERO.badlib.d create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pid/err.D_PDESC_ZERO.badlib.exe create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pid/err.D_PDESC_ZERO.badproc1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pid/err.D_PROC_BADPID.badproc2.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pid/err.D_PROC_CREATEFAIL.many.d create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pid/err.D_PROC_CREATEFAIL.many.exe create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pid/err.D_PROC_FUNC.badfunc.d create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pid/err.D_PROC_FUNC.badfunc.exe create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pid/err.D_PROC_LIB.libdash.d create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pid/err.D_PROC_LIB.libdash.exe create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.alldash.d create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.alldash.exe create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.badname.d create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.badname.exe create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.globdash.d create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.globdash.exe create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pid/err.D_PROC_OFF.toobig.d create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pid/err.D_PROC_OFF.toobig.exe create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pid/tst.addprobes.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pid/tst.args1.c create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pid/tst.args1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pid/tst.coverage.d create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pid/tst.coverage.exe create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pid/tst.emptystack.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pid/tst.emptystack.d.out create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pid/tst.emptystack.exe create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pid/tst.float.c create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pid/tst.float.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pid/tst.fork.c create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pid/tst.fork.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pid/tst.gcc.c create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pid/tst.gcc.d create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pid/tst.killonerror.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pid/tst.main.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pid/tst.manypids.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pid/tst.newprobes.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pid/tst.newprobes.ksh.out create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pid/tst.probemod.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pid/tst.provregex1.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pid/tst.provregex2.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pid/tst.provregex2.ksh.out create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pid/tst.provregex3.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pid/tst.provregex3.ksh.out create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pid/tst.provregex4.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pid/tst.provregex4.ksh.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pid/tst.ret1.c create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pid/tst.ret1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pid/tst.ret2.c create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pid/tst.ret2.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pid/tst.vfork.c create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pid/tst.vfork.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pid/tst.weak1.c create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pid/tst.weak1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pid/tst.weak2.c create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pid/tst.weak2.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/plockstat/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/plockstat/tst.available.d create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/plockstat/tst.available.exe create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/plockstat/tst.libmap.d create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/plockstat/tst.libmap.exe create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pointers/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pointers/err.BadAlign.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pointers/err.D_ADDROF_VAR.ArrayVar.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pointers/err.D_ADDROF_VAR.DynamicVar.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pointers/err.D_ADDROF_VAR.agg.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pointers/err.D_DEREF_NONPTR.noptr.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pointers/err.D_DEREF_VOID.VoidPointerDeref.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pointers/err.D_OP_ARRFUN.ArrayAssignment.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pointers/err.D_OP_INCOMPAT.VoidPointerArith.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pointers/err.D_OP_LVAL.AddressChange.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pointers/err.D_OP_PTR.NonPointerAccess.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pointers/err.D_OP_PTR.badpointer.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pointers/err.D_OP_SOU.BadPointerAccess.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pointers/err.D_OP_SOU.badpointer.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress2.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress3.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress4.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress5.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pointers/tst.ArrayPointer1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pointers/tst.ArrayPointer2.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pointers/tst.ArrayPointer3.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pointers/tst.GlobalVar.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pointers/tst.IntegerArithmetic1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pointers/tst.PointerArithmetic1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pointers/tst.PointerArithmetic2.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pointers/tst.PointerArithmetic3.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pointers/tst.PointerAssignment.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pointers/tst.ValidPointer1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pointers/tst.ValidPointer2.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pointers/tst.VoidCast.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pointers/tst.basic1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pointers/tst.basic2.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pragma/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pragma/err.D_PRAGERR.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pragma/err.D_PRAGMA_DEPEND.main.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pragma/err.D_PRAGMA_INVAL.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pragma/err.D_PRAGMA_MALFORM.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pragma/err.D_PRAGMA_UNUSED.UnusedPragma.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pragma/err.circlibdep.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pragma/err.invalidlibdep.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pragma/tst.libchain.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pragma/tst.libdep.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/pragma/tst.libdepfullyconnected.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/predicates/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/predicates/err.D_PRED_SCALAR.NonScalarPred.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/predicates/err.D_SYNTAX.invalid.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/predicates/err.D_SYNTAX.operr.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/predicates/tst.argsnotcached.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/predicates/tst.basics.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/predicates/tst.basics.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/predicates/tst.complex.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/predicates/tst.complex.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/predicates/tst.predcache.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/preprocessor/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/preprocessor/err.D_IDENT_UNDEF.afterprobe.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/preprocessor/err.D_PRAGCTL_INVAL.tabdefine.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/preprocessor/err.D_SYNTAX.withoutpound.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/preprocessor/err.defincomp.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/preprocessor/err.ifdefelsenotendif.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/preprocessor/err.ifdefincomp.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/preprocessor/err.ifdefnotendif.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/preprocessor/err.incompelse.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/preprocessor/err.mulelse.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/preprocessor/tst.ifdef.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/preprocessor/tst.ifdef.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/preprocessor/tst.ifndef.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/preprocessor/tst.ifndef.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/preprocessor/tst.ifnotdef.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/preprocessor/tst.ifnotdef.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/preprocessor/tst.logicaland.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/preprocessor/tst.logicaland.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/preprocessor/tst.logicalandor.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/preprocessor/tst.logicalandor.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/preprocessor/tst.logicalor.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/preprocessor/tst.logicalor.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/preprocessor/tst.muland.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/preprocessor/tst.muland.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/preprocessor/tst.mulor.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/preprocessor/tst.mulor.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/preprocessor/tst.precondi.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/preprocessor/tst.precondi.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/preprocessor/tst.predicatedeclare.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/preprocessor/tst.preexp.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/preprocessor/tst.preexp.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/preprocessor/tst.preexpelse.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/preprocessor/tst.preexpelse.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/preprocessor/tst.preexpif.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/preprocessor/tst.preexpif.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/preprocessor/tst.preexpifelse.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/preprocessor/tst.preexpifelse.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/preprocessor/tst.withinprobe.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/err.D_PRINTA_AGGARG.badagg.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/err.D_PRINTA_AGGARG.badfmt.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/err.D_PRINTA_AGGARG.badval.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/err.D_PRINTA_PROTO.bad.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/err.D_PRINTF_ARG_TYPE.jstack.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/err.D_PRINTF_ARG_TYPE.stack.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/err.D_PRINTF_ARG_TYPE.ustack.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.basics.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.basics.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.def.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.def.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.dynwidth.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.dynwidth.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.fmt.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.fmt.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.largeusersym.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.many.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.manyval.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.manyval.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.stack.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.tuple.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.tuple.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.walltimestamp.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.walltimestamp.ksh.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printf/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printf/err.D_PRINTF_AGG_CONV.aggfmt.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printf/err.D_PRINTF_ARG_EXTRA.toomany.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printf/err.D_PRINTF_ARG_EXTRA.widths.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printf/err.D_PRINTF_ARG_FMT.badfmt.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printf/err.D_PRINTF_ARG_PROTO.novalue.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printf/err.D_PRINTF_ARG_TYPE.aggarg.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printf/err.D_PRINTF_ARG_TYPE.recursive.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printf/err.D_PRINTF_DYN_PROTO.noprec.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printf/err.D_PRINTF_DYN_PROTO.nowidth.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printf/err.D_PRINTF_DYN_TYPE.badprec.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printf/err.D_PRINTF_DYN_TYPE.badwidth.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printf/err.D_PROTO_LEN.toofew.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printf/err.D_SYNTAX.badconv1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printf/err.D_SYNTAX.badconv2.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printf/err.D_SYNTAX.badconv3.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printf/tst.basics.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printf/tst.basics.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printf/tst.flags.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printf/tst.flags.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printf/tst.hello.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printf/tst.hello.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printf/tst.ints.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printf/tst.ints.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printf/tst.precs.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printf/tst.precs.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printf/tst.print-f.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printf/tst.print-f.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printf/tst.printT.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printf/tst.printT.ksh.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printf/tst.printY.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printf/tst.printY.ksh.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printf/tst.printcont.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printf/tst.printcont.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printf/tst.printeE.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printf/tst.printeE.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printf/tst.printgG.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printf/tst.printgG.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printf/tst.rawfmt.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printf/tst.rawfmt.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printf/tst.str.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printf/tst.str.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printf/tst.sym.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printf/tst.sym.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printf/tst.uints.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printf/tst.uints.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printf/tst.widths.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printf/tst.widths.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printf/tst.widths1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printf/tst.wp.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printf/tst.wp.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/privs/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/privs/tst.func_access.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/privs/tst.op_access.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/privs/tst.unpriv_funcs.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/probes/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/probes/err.D_PDESC_ZERO.probeqtn.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/probes/err.D_PDESC_ZERO.probestar.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/probes/err.D_PDESC_ZERO.tickstar.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/probes/err.D_SYNTAX.assign.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/probes/err.D_SYNTAX.declare.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/probes/err.D_SYNTAX.declarein.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/probes/err.D_SYNTAX.lbraces.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/probes/err.D_SYNTAX.probespec.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/probes/err.D_SYNTAX.rbraces.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/probes/err.D_SYNTAX.recdec.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/probes/tst.basic1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/probes/tst.check.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/probes/tst.declare.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/probes/tst.declareafter.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/probes/tst.emptyprobe.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/probes/tst.pragma.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/probes/tst.pragmaaftertab.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/probes/tst.pragmainside.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/probes/tst.pragmaoutside.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/probes/tst.probestar.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/proc/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/proc/tst.create.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/proc/tst.discard.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/proc/tst.exec.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/proc/tst.execfail.ENOENT.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/proc/tst.execfail.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/proc/tst.exitcore.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/proc/tst.exitexit.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/proc/tst.exitkilled.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/proc/tst.signal.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/proc/tst.sigwait.c create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/proc/tst.sigwait.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/proc/tst.startexit.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/profile-n/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/profile-n/err.D_PDESC_ZERO.profile.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/profile-n/err.D_PDESC_ZEROonens.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/profile-n/err.D_PDESC_ZEROonensec.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/profile-n/err.D_PDESC_ZEROoneus.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/profile-n/err.D_PDESC_ZEROoneusec.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/profile-n/tst.argtest.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/profile-n/tst.argtest.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/profile-n/tst.basic.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/profile-n/tst.basic.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/profile-n/tst.func.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/profile-n/tst.mod.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/profile-n/tst.profilehz.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/profile-n/tst.profilehz.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/profile-n/tst.profilems.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/profile-n/tst.profilems.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/profile-n/tst.profilemsec.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/profile-n/tst.profilemsec.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/profile-n/tst.profilenhz.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/profile-n/tst.profilenhz.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/profile-n/tst.profilens.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/profile-n/tst.profilens.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/profile-n/tst.profilensec.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/profile-n/tst.profilensec.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/profile-n/tst.profiles.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/profile-n/tst.profiles.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/profile-n/tst.profilesec.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/profile-n/tst.profilesec.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/profile-n/tst.profileus.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/profile-n/tst.profileus.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/profile-n/tst.profileusec.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/profile-n/tst.profileusec.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/profile-n/tst.sym.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/profile-n/tst.ufunc.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/profile-n/tst.ufuncsort.c create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/profile-n/tst.ufuncsort.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/profile-n/tst.ufuncsort.ksh.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/profile-n/tst.umod.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/profile-n/tst.usym.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/providers/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/providers/err.D_PDESC_INVAL.wrongdec4.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/providers/err.D_PDESC_ZERO.nonprofile.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/providers/err.D_PDESC_ZERO.wrongdec1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/providers/err.D_PDESC_ZERO.wrongdec2.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/providers/err.D_PDESC_ZERO.wrongdec3.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/providers/tst.basics.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/providers/tst.basics.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/providers/tst.beginexit.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/providers/tst.beginprof.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/providers/tst.beginprof.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/providers/tst.probattrs.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/providers/tst.probattrs.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/providers/tst.probefunc.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/providers/tst.probefunc.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/providers/tst.probemod.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/providers/tst.probemod.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/providers/tst.probename.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/providers/tst.probename.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/providers/tst.probprov.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/providers/tst.probprov.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/providers/tst.profend.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/providers/tst.profend.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/providers/tst.profexit.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/providers/tst.profexit.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/providers/tst.trace.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/providers/tst.trace.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/providers/tst.twoprof.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/providers/tst.twoprof.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/raise/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/raise/tst.raise1.c create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/raise/tst.raise1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/raise/tst.raise2.c create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/raise/tst.raise2.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/raise/tst.raise3.c create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/raise/tst.raise3.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/rates/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/rates/tst.aggrate.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/rates/tst.aggrate.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/rates/tst.statusrate.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/rates/tst.switchrate.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/rates/tst.switchrate.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/safety/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/safety/tst.basename.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/safety/tst.caller.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/safety/tst.cleanpath.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/safety/tst.copyin.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/safety/tst.copyin2.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/safety/tst.ddi_pathname.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/safety/tst.dirname.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/safety/tst.errno.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/safety/tst.execname.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/safety/tst.gid.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/safety/tst.hton.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/safety/tst.index.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/safety/tst.msgdsize.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/safety/tst.msgsize.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/safety/tst.null.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/safety/tst.pid.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/safety/tst.ppid.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/safety/tst.progenyof.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/safety/tst.random.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/safety/tst.rw.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/safety/tst.shortstr.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/safety/tst.stack.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/safety/tst.stackdepth.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/safety/tst.stddev.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/safety/tst.strchr.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/safety/tst.strjoin.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/safety/tst.strstr.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/safety/tst.strtok.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/safety/tst.substr.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/safety/tst.ucaller.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/safety/tst.uid.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/safety/tst.unalign.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/safety/tst.uregs.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/safety/tst.ustack.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/safety/tst.ustackdepth.d create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/safety/tst.vahole.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/safety/tst.violentdeath.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/safety/tst.zonename.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/scalars/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/scalars/err.D_ARR_LOCAL.thisarray.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/scalars/err.D_DECL_CLASS.selfthis.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/scalars/err.D_DECL_CLASS.thisself.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/scalars/err.D_DECL_IDRED.errval.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/scalars/err.D_OP_INCOMPAT.dec.err.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/scalars/err.D_OP_INCOMPAT.dupgtype.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/scalars/err.D_OP_INCOMPAT.dupltype.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/scalars/err.D_OP_INCOMPAT.dupttype.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/scalars/err.D_SYNTAX.declare.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/scalars/tst.basicvar.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/scalars/tst.basicvar.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/scalars/tst.localvar.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/scalars/tst.misc.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/scalars/tst.self.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/scalars/tst.selfarray.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/scalars/tst.selfarray2.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/scalars/tst.selfthis.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/scalars/tst.this.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/scalars/tst.thisself.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/sched/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/sched/tst.enqueue.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/sched/tst.oncpu.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/sched/tst.stackdepth.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/scripting/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/scripting/err.D_MACRO_UNDEF.invalidargs.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/scripting/err.D_OP_LVAL.rdonly.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/scripting/err.D_OP_WRITE.usepidmacro.d create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/scripting/err.D_SYNTAX.concat.d create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/scripting/err.D_SYNTAX.desc.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/scripting/err.D_SYNTAX.inval.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/scripting/err.D_SYNTAX.pid.d create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/scripting/tst.D_MACRO_UNUSED.overflow.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/scripting/tst.arg0.d create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/scripting/tst.arguments.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/scripting/tst.assign.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/scripting/tst.basic.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/scripting/tst.egid.d create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/scripting/tst.egid.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/scripting/tst.euid.d create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/scripting/tst.euid.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/scripting/tst.gid.d create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/scripting/tst.gid.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/scripting/tst.pgid.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/scripting/tst.pid.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/scripting/tst.ppid.d create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/scripting/tst.ppid.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/scripting/tst.projid.d create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/scripting/tst.projid.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/scripting/tst.quite.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/scripting/tst.sid.d create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/scripting/tst.sid.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/scripting/tst.stringmacro.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/scripting/tst.taskid.d create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/scripting/tst.taskid.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/scripting/tst.trace.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/scripting/tst.uid.d create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/scripting/tst.uid.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/sdt/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/sdt/tst.sdtargs.c create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/sdt/tst.sdtargs.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/sizeof/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/sizeof/err.D_IDENT_BADREF.SizeofAssoc.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/sizeof/err.D_IDENT_UNDEF.UnknownSymbol.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/sizeof/err.D_SIZEOF_TYPE.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/sizeof/err.D_SYNTAX.SizeofBadType.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/sizeof/tst.SizeofArray.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/sizeof/tst.SizeofDataTypes.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/sizeof/tst.SizeofExpression.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/sizeof/tst.SizeofNULL.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/sizeof/tst.SizeofStrConst.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/sizeof/tst.SizeofStrConst.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/sizeof/tst.SizeofString1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/sizeof/tst.SizeofString1.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/sizeof/tst.SizeofString2.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/sizeof/tst.SizeofString2.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/bug.1001148.SpecSizeVariations.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/err.BufSizeVariations1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/err.BufSizeVariations2.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/err.D_ACT_SPEC.SpeculateWithBreakPoint.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/err.D_ACT_SPEC.SpeculateWithChill.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/err.D_ACT_SPEC.SpeculateWithCopyOut.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/err.D_ACT_SPEC.SpeculateWithCopyOutStr.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/err.D_ACT_SPEC.SpeculateWithPanic.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/err.D_ACT_SPEC.SpeculateWithRaise.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/err.D_ACT_SPEC.SpeculateWithStop.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/err.D_AGG_COMM.AggAftCommit.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/err.D_AGG_SPEC.SpeculateWithAvg.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/err.D_AGG_SPEC.SpeculateWithCount.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/err.D_AGG_SPEC.SpeculateWithLquant.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/err.D_AGG_SPEC.SpeculateWithMax.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/err.D_AGG_SPEC.SpeculateWithMin.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/err.D_AGG_SPEC.SpeculateWithQuant.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/err.D_AGG_SPEC.SpeculateWithStddev.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/err.D_AGG_SPEC.SpeculateWithSum.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/err.D_COMM_COMM.CommitAftCommit.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/err.D_COMM_COMM.DisjointCommit.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/err.D_COMM_DREC.CommitAftDataRec.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/err.D_DREC_COMM.DataRecAftCommit.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/err.D_DREC_COMM.ExitAfterCommit.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/err.D_EXIT_SPEC.ExitAftSpec.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/err.D_PRAGMA_MALFORM.NspecExpr.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/err.D_PRAGMA_OPTSET.HugeNspecValue.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/err.D_PRAGMA_OPTSET.InvalidSpecSize.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/err.D_PRAGMA_OPTSET.NegSpecSize.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/err.D_PROTO_LEN.SpecNoId.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/err.D_SPEC_COMM.SpecAftCommit.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/err.D_SPEC_DREC.SpecAftDataRec.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/err.D_SPEC_SPEC.SpecAftSpec.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/err.NegativeBufSize.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/err.NegativeNspec.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/err.NegativeSpecSize.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/err.SpecSizeVariations1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/err.SpecSizeVariations2.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/tst.CommitAfterDiscard.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/tst.CommitWithZero.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/tst.DataRecAftDiscard.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/tst.DiscardAftCommit.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/tst.DiscardAftDataRec.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/tst.DiscardAftDiscard.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/tst.DiscardWithZero.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/tst.ExitAftDiscard.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/tst.NoSpecBuffer.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/tst.SpecSizeVariations1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/tst.SpecSizeVariations2.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/tst.SpecSizeVariations3.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/tst.SpeculateWithRandom.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/tst.SpeculationCommit.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/tst.SpeculationDiscard.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/tst.SpeculationID.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/tst.SpeculationWithZero.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/tst.TwoSpecBuffers.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/tst.negcommit.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/tst.negspec.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/speculation/tst.zerosize.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/stability/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/stability/err.D_ATTR_MIN.MinAttributes.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/stack/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/stack/err.D_STACK_PROTO.bad.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/stack/err.D_STACK_SIZE.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/stack/err.D_USTACK_FRAMES.bad.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/stack/err.D_USTACK_PROTO.bad.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/stack/err.D_USTACK_STRSIZE.bad.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/stack/tst.default.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/stackdepth/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/stackdepth/tst.default.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/stop/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/stop/tst.stop1.c create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/stop/tst.stop1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/stop/tst.stop2.c create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/stop/tst.stop2.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/strlen/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/strlen/tst.strlen1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/struct/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/struct/err.D_ADDROF_VAR.StructPointer.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/struct/err.D_DECL_COMBO.StructWithoutColon.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/struct/err.D_DECL_COMBO.StructWithoutColon1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/struct/err.D_DECL_INCOMPLETE.circular.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/struct/err.D_DECL_INCOMPLETE.order.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/struct/err.D_DECL_INCOMPLETE.order2.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/struct/err.D_DECL_INCOMPLETE.recursive.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/struct/err.D_DECL_INCOMPLETE.simple.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/struct/err.D_DECL_VOIDOBJ.baddec.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/struct/err.D_PROTO_ARG.DupStructAssoc.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/struct/tst.StructAssoc.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/struct/tst.StructDataTypes.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/struct/tst.StructInside.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/struct/tst.clauselocal.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/struct/tst.clauselocal.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/syscall/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/syscall/tst.args.c create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/syscall/tst.args.d create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/syscall/tst.openret.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/sysevent/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/sysevent/tst.post.c create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/sysevent/tst.post.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/sysevent/tst.post_chan.c create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/sysevent/tst.post_chan.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/tick-n/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/tick-n/err.D_PDESC_ZERO.tick.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/tick-n/err.D_PDESC_ZEROonens.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/tick-n/err.D_PDESC_ZEROonensec.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/tick-n/err.D_PDESC_ZEROoneus.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/tick-n/err.D_PDESC_ZEROoneusec.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/tick-n/tst.tickarg0.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/tick-n/tst.tickms.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/tick-n/tst.tickms.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/tick-n/tst.tickmsec.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/tick-n/tst.tickmsec.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/tick-n/tst.tickns.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/tick-n/tst.tickns.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/tick-n/tst.ticknsec.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/tick-n/tst.ticknsec.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/tick-n/tst.ticks.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/tick-n/tst.ticks.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/tick-n/tst.ticksec.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/tick-n/tst.ticksec.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/tick-n/tst.tickus.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/tick-n/tst.tickus.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/tick-n/tst.tickusec.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/tick-n/tst.tickusec.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/trace/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/trace/err.D_PROTO_LEN.bad.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/trace/err.D_TRACE_VOID.bad.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/trace/tst.misc.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/trace/tst.qstring.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/trace/tst.qstring.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/trace/tst.string.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/tracemem/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/tracemem/err.D_PROTO_ARG.badsize.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/tracemem/err.D_PROTO_LEN.toofew.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/tracemem/err.D_PROTO_LEN.toomany.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/tracemem/err.D_TRACEMEM_ADDR.badaddr.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/tracemem/err.D_TRACEMEM_SIZE.negsize.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/tracemem/err.D_TRACEMEM_SIZE.zerosize.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/tracemem/tst.rootvp.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/translators/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/translators/err.D_DECL_TYPERED.BadTransDecl.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/translators/err.D_OP_INCOMPLETE.NonExistentInput1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/translators/err.D_SYNTAX.BadTransDecl1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/translators/err.D_SYNTAX.BadTransDecl3.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/translators/err.D_SYNTAX.BadTransDecl4.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/translators/err.D_TYPE_MEMBER.NonExistentInput2.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/translators/err.D_XLATE_INCOMPAT.BadInputType1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/translators/err.D_XLATE_MEMB.NonExistentOutput2.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/translators/err.D_XLATE_NONE.BadTransDecl6.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/translators/err.D_XLATE_REDECL.RepeatTransDecl.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/translators/err.D_XLATE_SOU.BadTransDecl8.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/translators/err.D_XLATE_SOU.BadTransInt.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/translators/err.D_XLATE_SOU.NonExistentOutput1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/translators/man.TestTransStability.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/translators/tst.CircularTransDecl.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/translators/tst.EmptyTransDecl.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/translators/tst.ForwardTag.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/translators/tst.InputAliasTrans.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/translators/tst.InputIntTrans.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/translators/tst.OutputAliasTrans.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/translators/tst.PartialDereferencing.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/translators/tst.PartialOutputTransDefn.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/translators/tst.ProcModelTrans.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/translators/tst.RepeatDeclaration.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/translators/tst.SimultaneousTranslators.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/translators/tst.StructureAssignment.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/translators/tst.TransNonPointer.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/translators/tst.TransOutputPointer.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/translators/tst.TransPointer.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/translators/tst.TranslateSelf.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/translators/tst.UnionInputTrans.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/translators/tst.UnionOutputTrans.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/typedef/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/typedef/err.D_DECL_IDRED.DupTypeDef.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/typedef/err.D_SYNTAX.BadExistingTypedef.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/typedef/err.D_SYNTAX.TypedefInClause.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/typedef/tst.ChainTypedef.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/typedef/tst.TypedefDataAssign.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/types/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/types/err.D_CAST_INVAL.badcast.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/types/err.D_CG_DYN.ResultDynType.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/types/err.D_CHR_OFLOW.charconst.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/types/err.D_DECL_BADCLASS.bad.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/types/err.D_DECL_CHARATTR.badtype3.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/types/err.D_DECL_COMBO.badtype4.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/types/err.D_DECL_COMBO.badtype5.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/types/err.D_DECL_ENCONST.badeval.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/types/err.D_DECL_ENOFLOW.enoflow.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/types/err.D_DECL_ENOFLOW.enuflow.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/types/err.D_DECL_SCOPE.scopeop.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/types/err.D_DECL_USELESS.baddec.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/types/err.D_OP_ACT.badcond.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/types/err.D_OP_ARITH.badoperand.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/types/err.D_OP_INCOMPAT.badassign.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/types/err.D_OP_INT.badbitop.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/types/err.D_OP_INT.badshift.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/types/err.D_OP_SCALAR.badcond.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/types/err.D_OP_SCALAR.badincop.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/types/err.D_OP_SCALAR.badlogop.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/types/err.D_PROTO_LEN.badcond1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/types/err.D_SYNTAX.badenum.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/types/err.D_SYNTAX.badid.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/types/err.D_SYNTAX.badstruct.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/types/err.D_UNKNOWN.badtype1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/types/err.D_UNKNOWN.badtype2.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/types/err.D_UNKNOWN.dupenum.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/types/err.D_UNKNOWN.dupstruct.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/types/err.D_XLATE_REDECL.ResultDynType.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/types/tst.assignops.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/types/tst.badshiftops.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/types/tst.basics.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/types/tst.basics.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/types/tst.bitops.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/types/tst.charconstants.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/types/tst.complex.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/types/tst.condexpr.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/types/tst.constants.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/types/tst.conv.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/types/tst.enum.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/types/tst.intincop.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/types/tst.intops.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/types/tst.inttypes.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/types/tst.ptrincop.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/types/tst.ptrops.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/types/tst.relenum.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/types/tst.relstring.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/types/tst.shiftops.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/types/tst.stringconstants.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/types/tst.struct.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/types/tst.typedef.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/types/tst.unaryop.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/union/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/union/err.D_ADDROF_VAR.UnionPointer.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/union/err.D_DECL_COMBO.UnionWithoutColon.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/union/err.D_DECL_COMBO.UnionWithoutColon1.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/union/err.D_DECL_INCOMPLETE.circular.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/union/err.D_DECL_INCOMPLETE.order.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/union/err.D_DECL_INCOMPLETE.recursive.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/union/err.D_DECL_INCOMPLETE.simple.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/union/err.D_PROTO_ARG.DupUnionAssoc.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/union/tst.UnionAssoc.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/union/tst.UnionDataTypes.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/union/tst.UnionInside.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/usdt/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/usdt/argmap.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/usdt/args.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/usdt/forker.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/usdt/tst.andpid.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/usdt/tst.argmap.c create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/usdt/tst.argmap.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/usdt/tst.args.c create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/usdt/tst.args.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/usdt/tst.badguess.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/usdt/tst.corruptenv.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/usdt/tst.dlclose1.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/usdt/tst.dlclose1.ksh.out create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/usdt/tst.dlclose2.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/usdt/tst.dlclose2.ksh.out create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/usdt/tst.dlclose3.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/usdt/tst.eliminate.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/usdt/tst.enabled.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/usdt/tst.enabled.ksh.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/usdt/tst.enabled2.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/usdt/tst.enabled2.ksh.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/usdt/tst.entryreturn.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/usdt/tst.entryreturn.ksh.out create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/usdt/tst.fork.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/usdt/tst.fork.ksh.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/usdt/tst.forker.c create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/usdt/tst.forker.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/usdt/tst.guess32.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/usdt/tst.guess64.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/usdt/tst.header.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/usdt/tst.include.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/usdt/tst.linkpriv.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/usdt/tst.linkunpriv.ksh create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/usdt/tst.multiple.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/usdt/tst.multiple.ksh.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/usdt/tst.nodtrace.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/usdt/tst.onlyenabled.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/usdt/tst.reeval.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/usdt/tst.static.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/usdt/tst.static.ksh.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/usdt/tst.static2.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/usdt/tst.static2.ksh.out create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/usdt/tst.user.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/usdt/tst.user.ksh.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ustack/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ustack/tst.bigstack.c create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ustack/tst.bigstack.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ustack/tst.depth.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ustack/tst.spin.c create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ustack/tst.spin.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/vars/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/vars/tst.gid.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/vars/tst.nullassign.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/vars/tst.ppid.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/vars/tst.ucaller.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/vars/tst.ucaller.ksh.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/vars/tst.uid.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/vars/tst.walltimestamp.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/version/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/version/tst.1.0.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/i386/Makefile create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/i386/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/i386/arrays/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/i386/arrays/tst.uregsarray.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/i386/funcs/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/i386/funcs/tst.badcopyin.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/i386/funcs/tst.badcopyinstr.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/i386/funcs/tst.badcopyout.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/i386/funcs/tst.badcopyoutstr.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/i386/pid/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/i386/pid/tst.badinstr.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/i386/pid/tst.badinstr.s create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/i386/pid/tst.branch.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/i386/pid/tst.branch.s create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/i386/pid/tst.embedded.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/i386/pid/tst.embedded.s create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/i386/pid/tst.ret.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/i386/pid/tst.ret.s create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/i386/pid/tst.retlist.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/i386/pid/tst.retlist.s create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/i386/ustack/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/i386/ustack/annotated_helper.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/i386/ustack/helper_helper.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/i386/ustack/tst.annotated.c create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/i386/ustack/tst.annotated.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/i386/ustack/tst.annotated.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/i386/ustack/tst.circstack.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/i386/ustack/tst.circstack.s create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/i386/ustack/tst.helper.c create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/i386/ustack/tst.helper.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/i386/ustack/tst.helper.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/i86xpv/Makefile create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/i86xpv/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/i86xpv/xdt/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/i86xpv/xdt/tst.basic.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/i86xpv/xdt/tst.hvmenable.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/i86xpv/xdt/tst.memenable.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/i86xpv/xdt/tst.schedargs.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/i86xpv/xdt/tst.schedenable.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/sparc/Makefile create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/sparc/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/sparc/arrays/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/sparc/arrays/tst.uregsarray.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/sparc/pid/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/sparc/pid/err.D_PROC_ALIGN.misaligned.d create mode 100755 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/sparc/pid/err.D_PROC_ALIGN.misaligned.exe create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/sparc/pid/tst.br.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/sparc/pid/tst.br.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/sparc/pid/tst.br.s create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/sparc/pid/tst.branch.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/sparc/pid/tst.branch.s create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/sparc/pid/tst.embedded.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/sparc/pid/tst.embedded.s create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/sparc/usdt/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/sparc/usdt/tst.tailcall.ksh create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/sparc/ustack/Makefile.kup create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/sparc/ustack/annotated_helper.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/sparc/ustack/helper_helper.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/sparc/ustack/tst.annotated.c create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/sparc/ustack/tst.annotated.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/sparc/ustack/tst.annotated.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/sparc/ustack/tst.circstack.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/sparc/ustack/tst.circstack.s create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/sparc/ustack/tst.helper.c create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/sparc/ustack/tst.helper.d create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/sparc/ustack/tst.helper.d.out create mode 100644 src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/sparc/ustack/tst.trapstat.ksh (limited to 'src/VBox/ExtPacks/VBoxDTrace/onnv/cmd') diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/Makefile b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/Makefile new file mode 100644 index 00000000..ebb091d5 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/Makefile @@ -0,0 +1,57 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# + +PROG= dtrace + +include ../Makefile.cmd + +SUBDIRS= $(MACH) demo test +$(BUILD64)SUBDIRS += $(MACH64) + +all := TARGET = all +install := TARGET = install +clean := TARGET = clean +clobber := TARGET = clobber +lint := TARGET = lint + +.KEEP_STATE: + +all: $(SUBDIRS) + +clean clobber lint: $(SUBDIRS) + +install: $(SUBDIRS) + -$(RM) $(ROOTUSRSBINPROG) + -$(LN) $(ISAEXEC) $(ROOTUSRSBINPROG) + +$(SUBDIRS): FRC + @cd $@; pwd; $(MAKE) $(TARGET) + +FRC: + +include ../Makefile.targ diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/Makefile.com b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/Makefile.com new file mode 100644 index 00000000..2f69e31b --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/Makefile.com @@ -0,0 +1,57 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2009 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +PROG = dtrace +OBJS = dtrace.o +SRCS = $(OBJS:%.o=../%.c) + +include ../../Makefile.cmd + +CFLAGS += $(CCVERBOSE) +CFLAGS64 += $(CCVERBOSE) +LDLIBS += -ldtrace -lproc -lctf -lelf + +FILEMODE = 0555 + +CLEANFILES += $(OBJS) + +.KEEP_STATE: + +all: $(PROG) + +$(PROG): $(OBJS) + $(LINK.c) -o $@ $(OBJS) $(LDLIBS) + $(POST_PROCESS) ; $(STRIP_STABS) + +clean: + -$(RM) $(CLEANFILES) + +lint: lint_SRCS + +%.o: ../%.c + $(COMPILE.c) $< + +include ../../Makefile.targ diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/amd64/Makefile b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/amd64/Makefile new file mode 100644 index 00000000..a34a1e5e --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/amd64/Makefile @@ -0,0 +1,32 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# + +include ../Makefile.com +include ../../Makefile.cmd.64 + +install: all $(ROOTUSRSBINPROG64) diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/amd64/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/amd64/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/Makefile b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/Makefile new file mode 100644 index 00000000..7da281ed --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/Makefile @@ -0,0 +1,167 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. +# + +include ../../Makefile.cmd + +i386_DFILES = \ + iprb.d + +DFILES = \ + applicat.d \ + badopen.d \ + begin.d \ + callout.d \ + clause.d \ + clear.d \ + countdown.d \ + counter.d \ + dateprof.d \ + delay.d \ + denorm.d \ + end.d \ + error.d \ + errorpath.d \ + find.d \ + firebird.d \ + hello.d \ + howlong.d \ + interp.d \ + interval.d \ + intr.d \ + iocpu.d \ + iosnoop.d \ + iothrough.d \ + iotime.d \ + ipio.d \ + ipproto.d \ + tcprst.d \ + kstat.d \ + ksyms.d \ + libc.d \ + lquantize.d \ + lwptime.d \ + normalize.d \ + nscd.d \ + pri.d \ + printa.d \ + pritime.d \ + prof.d \ + profpri.d \ + progtime.d \ + putnext.d \ + qlen.d \ + qtime.d \ + renormalize.d \ + restest.d \ + ring.d \ + rtime.d \ + rwinfo.d \ + rwtime.d \ + sig.d \ + soffice.d \ + spec.d \ + specopen.d \ + ssd.d \ + syscall.d \ + tcp1stbyte.d \ + tcpbytes.d \ + tcpbytesstat.d \ + tcpconnlat.d \ + tcpio.d \ + tcpioflags.d \ + tcpsnoop.d \ + tcpstate.d \ + tcptop.d \ + tick.d \ + ticktime.d \ + time.d \ + tracewrite.d \ + trunc.d \ + trussrw.d \ + udpbytes.d \ + udpbytesstat.d \ + udpio.d \ + udpsnoop.d \ + udptop.d \ + userfunc.d \ + whatfor.d \ + whatlock.d \ + where.d \ + whererun.d \ + whoexec.d \ + whofor.d \ + whoio.d \ + whopreempt.d \ + whoqueue.d \ + whosteal.d \ + whowrite.d \ + writes.d \ + writesbycmd.d \ + writesbycmdfd.d \ + writetime.d \ + writetimeq.d \ + xioctl.d \ + xterm.d \ + xwork.d \ + $($(MACH)_DFILES) + +HTMLFILES = index.html + +DEMOFILES = \ + $(DFILES) \ + $(HTMLFILES) \ + sunlogo.gif + +MKDEMO = mkdemo +CLEANFILES += $(DFILES) $(MKDEMO) + +ROOTDEMODIR = $(ROOT)/usr/demo/dtrace +ROOTDEMOFILES = $(DEMOFILES:%=$(ROOTDEMODIR)/%) + +all: $(DEMOFILES) + +clobber clean: + -$(RM) $(CLEANFILES) + +clean.lint install_h lint: + +install: $(ROOTDEMOFILES) + +$(ROOTDEMODIR): + $(INS.dir) + +$(ROOTDEMODIR)/%: % + $(INS.file) + +$(HTMLFILES): $(DFILES) $(MKDEMO) + ./$(MKDEMO) $@ + +$(DFILES): $(MKDEMO) + ./$(MKDEMO) $@ + +$(ROOTDEMOFILES): $(ROOTDEMODIR) + +$(ROOTDEMODIR) := DIRMODE = 755 + +$(ROOTDEMOFILES) := FILEMODE = 644 diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/act/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/act/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/act/time.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/act/time.d new file mode 100644 index 00000000..b7afd4cb --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/act/time.d @@ -0,0 +1,44 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma D option quiet +#pragma D option destructive +#pragma D option switchrate=5sec + +tick-1sec +/n++ < 5/ +{ + printf("walltime : %Y\n", walltimestamp); + printf("date : "); + system("date"); + printf("\n"); +} + +tick-1sec +/n == 5/ +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/agg/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/agg/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/agg/clear.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/agg/clear.d new file mode 100644 index 00000000..4b90a09a --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/agg/clear.d @@ -0,0 +1,45 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma D option quiet + +BEGIN +{ + last = timestamp; +} + +syscall:::entry +{ + @func[execname] = count(); +} + +tick-10sec +{ + normalize(@func, (timestamp - last) / 1000000000); + printa(@func); + clear(@func); + last = timestamp; +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/agg/dateprof.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/agg/dateprof.d new file mode 100644 index 00000000..19a63c5e --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/agg/dateprof.d @@ -0,0 +1,52 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +syscall::exec:return, +syscall::exece:return +/execname == "date"/ +{ + self->start = vtimestamp; +} + +syscall:::entry +/self->start/ +{ + /* + * We linearly quantize on the current virtual time minus our + * process's start time. We divide by 1000 to yield microseconds + * rather than nanoseconds. The range runs from 0 to 10 milliseconds + * in steps of 100 microseconds; we expect that no date(1) process + * will take longer than 10 milliseconds to complete. + */ + @["system calls over time"] = + lquantize((vtimestamp - self->start) / 1000, 0, 10000, 100); +} + +syscall::rexit:entry +/self->start/ +{ + self->start = 0; +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/agg/denorm.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/agg/denorm.d new file mode 100644 index 00000000..6e58596f --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/agg/denorm.d @@ -0,0 +1,51 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma D option quiet + +BEGIN +{ + start = timestamp; +} + +syscall:::entry +{ + @func[execname] = count(); +} + +END +{ + this->seconds = (timestamp - start) / 1000000000; + printf("Ran for %d seconds.\n", this->seconds); + + printf("Per-second rate:\n"); + normalize(@func, this->seconds); + printa(@func); + + printf("\nRaw counts:\n"); + denormalize(@func); + printa(@func); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/agg/lquantize.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/agg/lquantize.d new file mode 100644 index 00000000..833c73ac --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/agg/lquantize.d @@ -0,0 +1,30 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +syscall::write:entry +{ + @fds[execname] = lquantize(arg0, 0, 100, 1); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/agg/normalize.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/agg/normalize.d new file mode 100644 index 00000000..cce12027 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/agg/normalize.d @@ -0,0 +1,49 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma D option quiet + +BEGIN +{ + /* + * Get the start time, in nanoseconds. + */ + start = timestamp; +} + +syscall:::entry +{ + @func[execname] = count(); +} + +END +{ + /* + * Normalize the aggregation based on the number of seconds we have + * been running. (There are 1,000,000,000 nanoseconds in one second.) + */ + normalize(@func, (timestamp - start) / 1000000000); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/agg/renormalize.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/agg/renormalize.d new file mode 100644 index 00000000..a6a15107 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/agg/renormalize.d @@ -0,0 +1,43 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma D option quiet + +BEGIN +{ + start = timestamp; +} + +syscall:::entry +{ + @func[execname] = count(); +} + +tick-10sec +{ + normalize(@func, (timestamp - start) / 1000000000); + printa(@func); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/agg/trunc.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/agg/trunc.d new file mode 100644 index 00000000..76965f8b --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/agg/trunc.d @@ -0,0 +1,46 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma D option quiet + +BEGIN +{ + last = timestamp; +} + +syscall:::entry +{ + @func[execname] = count(); +} + +tick-10sec +{ + trunc(@func, 10); + normalize(@func, (timestamp - last) / 1000000000); + printa(@func); + clear(@func); + last = timestamp; +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/agg/writes.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/agg/writes.d new file mode 100644 index 00000000..9de61541 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/agg/writes.d @@ -0,0 +1,30 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +syscall::write:entry +{ + @counts["write system calls"] = count(); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/agg/writesbycmd.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/agg/writesbycmd.d new file mode 100644 index 00000000..bcbefae1 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/agg/writesbycmd.d @@ -0,0 +1,30 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +syscall::write:entry +{ + @counts[execname] = count(); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/agg/writesbycmdfd.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/agg/writesbycmdfd.d new file mode 100644 index 00000000..8b92cb83 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/agg/writesbycmdfd.d @@ -0,0 +1,30 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +syscall::write:entry +{ + @counts[execname, arg0] = count(); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/agg/writetime.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/agg/writetime.d new file mode 100644 index 00000000..b770f5b0 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/agg/writetime.d @@ -0,0 +1,37 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +syscall::write:entry +{ + self->ts = timestamp; +} + +syscall::write:return +/self->ts/ +{ + @time[execname] = avg(timestamp - self->ts); + self->ts = 0; +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/agg/writetimeq.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/agg/writetimeq.d new file mode 100644 index 00000000..9b494090 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/agg/writetimeq.d @@ -0,0 +1,37 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +syscall::write:entry +{ + self->ts = timestamp; +} + +syscall::write:return +/self->ts/ +{ + @time[execname] = quantize(timestamp - self->ts); + self->ts = 0; +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/anon/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/anon/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/anon/iprb.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/anon/iprb.d new file mode 100644 index 00000000..f73f6a73 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/anon/iprb.d @@ -0,0 +1,39 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +fbt::iprbattach:entry +{ + self->trace = 1; +} + +fbt::: +/self->trace/ +{} + +fbt::iprbattach:return +{ + self->trace = 0; +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/buf/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/buf/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/buf/ring.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/buf/ring.d new file mode 100644 index 00000000..116bbd41 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/buf/ring.d @@ -0,0 +1,39 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma D option bufpolicy=ring +#pragma D option bufsize=16k + +syscall:::entry +/execname == $1/ +{ + trace(timestamp); +} + +syscall::rexit:entry +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/chapters b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/chapters new file mode 100644 index 00000000..2160a0cf --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/chapters @@ -0,0 +1,125 @@ +name: book +title: Solaris Dynamic Tracing Guide +index: 0 +url: http://wikis.sun.com/display/DTrace/Documentation + +name: act +title: Actions and Subroutines +index: 10 +url: http://wikis.sun.com/display/DTrace/Actions+and+Subroutines + +name: agg +title: Aggregations +index: 9 +url: http://wikis.sun.com/display/DTrace/Aggregations + +name: anon +title: Anonymous Tracing +index: 34 +url: http://wikis.sun.com/display/DTrace/Anonymous+Tracing + +name: buf +title: Buffers and Buffering +index: 11 +url: http://wikis.sun.com/display/DTrace/Buffers+and+Buffering + +name: dtrace +title: dtrace Provider +index: 17 +url: http://wikis.sun.com/display/DTrace/dtrace+Provider + +name: fbt +title: fbt Provider +index: 20 +url: http://wikis.sun.com/display/DTrace/fbt+Provider + +name: intro +title: Introduction +index: 1 +url: http://wikis.sun.com/display/DTrace/Introduction + +name: io +title: io Provider +index: 27 +url: http://wikis.sun.com/display/DTrace/io+Provider + +name: lockstat +title: lockstat Provider +index: 18 +url: http://wikis.sun.com/display/DTrace/lockstat+Provider + +name: out +title: Output Formatting +index: 12 +url: http://wikis.sun.com/display/DTrace/Output+Formatting + +name: proc +title: proc Provider +index: 25 +url: http://wikis.sun.com/display/DTrace/proc+Provider + +name: profile +title: profile Provider +index: 19 +url: http://wikis.sun.com/display/DTrace/profile+Provider + +name: sched +title: sched Provider +index: 26 +url: http://wikis.sun.com/display/DTrace/sched+Provider + +name: script +title: Scripting +index: 15 +url: http://wikis.sun.com/display/DTrace/Scripting + +name: sdt +title: sdt Provider +index: 22 +url: http://wikis.sun.com/display/DTrace/sdt+Provider + +name: spec +title: Speculative Tracing +index: 13 +url: http://wikis.sun.com/display/DTrace/Speculative+Tracing + +name: struct +title: Structs and Unions +index: 7 +url: http://wikis.sun.com/display/DTrace/Structs+and+Unions + +name: sysinfo +title: sysinfo Provider +index: 23 +url: http://wikis.sun.com/display/DTrace/sysinfo+Provider + +name: user +title: User Process Tracing +index: 32 +url: http://wikis.sun.com/display/DTrace/User+Process+Tracing + +name: vars +title: Variables +index: 3 +url: http://wikis.sun.com/display/DTrace/Variables + +name: vminfo +title: vminfo Provider +index: 24 +url: http://wikis.sun.com/display/DTrace/vminfo+Provider + +name: ip +title: ip Provider +index: 101 +url: http://wikis.sun.com/display/DTrace/ip+Provider + +name: tcp +title: tcp Provider +index: 102 +url: http://wikis.sun.com/display/DTrace/tcp+Provider + +name: udp +title: udp Provider +index: 103 +url: http://wikis.sun.com/display/DTrace/udp+Provider + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/dtrace/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/dtrace/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/dtrace/begin.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/dtrace/begin.d new file mode 100644 index 00000000..a3786017 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/dtrace/begin.d @@ -0,0 +1,42 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +BEGIN +{ + prot[0] = "---"; + prot[1] = "r--"; + prot[2] = "-w-"; + prot[3] = "rw-"; + prot[4] = "--x"; + prot[5] = "r-x"; + prot[6] = "-wx"; + prot[7] = "rwx"; +} + +syscall::mmap:entry +{ + printf("mmap with prot = %s", prot[arg2 & 0x7]); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/dtrace/end.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/dtrace/end.d new file mode 100644 index 00000000..4390b10a --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/dtrace/end.d @@ -0,0 +1,39 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +BEGIN +{ + start = timestamp; +} + +/* + * ... other tracing actions... + */ + +END +{ + printf("total time: %d secs", (timestamp - start) / 1000000000); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/dtrace/error.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/dtrace/error.d new file mode 100644 index 00000000..97115763 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/dtrace/error.d @@ -0,0 +1,35 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +BEGIN +{ + *(char *)NULL; +} + +ERROR +{ + printf("Hit an error!"); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/fbt/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/fbt/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/fbt/delay.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/fbt/delay.d new file mode 100644 index 00000000..1a523336 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/fbt/delay.d @@ -0,0 +1,39 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +fbt::delay:entry, +fbt::drv_usecwait:entry +{ + self->in = timestamp +} + +fbt::delay:return, +fbt::drv_usecwait:return +/self->in/ +{ + @snoozers[stack()] = quantize(timestamp - self->in); + self->in = 0; +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/fbt/putnext.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/fbt/putnext.d new file mode 100644 index 00000000..dd91ea06 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/fbt/putnext.d @@ -0,0 +1,30 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +fbt::putnext:entry +{ + @calls[stringof(args[0]->q_qinfo->qi_minfo->mi_idname)] = count(); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/fbt/ssd.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/fbt/ssd.d new file mode 100644 index 00000000..6b78ab9d --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/fbt/ssd.d @@ -0,0 +1,31 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +fbt:ssd::return +/arg1 == EIO/ +{ + printf("%s+%x returned EIO.", probefunc, arg0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/fbt/xioctl.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/fbt/xioctl.d new file mode 100644 index 00000000..33147682 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/fbt/xioctl.d @@ -0,0 +1,50 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +/* + * To make the output more readable, we want to indent every function entry + * (and unindent every function return). This is done by setting the + * "flowindent" option. + */ +#pragma D option flowindent + +syscall::ioctl:entry +/execname == "xclock" && guard++ == 0/ +{ + self->traceme = 1; + printf("fd: %d", arg0); +} + +fbt::: +/self->traceme/ +{} + +syscall::ioctl:return +/self->traceme/ +{ + self->traceme = 0; + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/intro/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/intro/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/intro/countdown.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/intro/countdown.d new file mode 100644 index 00000000..3fdb7904 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/intro/countdown.d @@ -0,0 +1,43 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +dtrace:::BEGIN +{ + i = 10; +} + +profile:::tick-1sec +/i > 0/ +{ + trace(i--); +} + +profile:::tick-1sec +/i == 0/ +{ + trace("blastoff!"); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/intro/counter.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/intro/counter.d new file mode 100644 index 00000000..bda153a8 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/intro/counter.d @@ -0,0 +1,44 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +/* + * Count off and report the number of seconds elapsed + */ +dtrace:::BEGIN +{ + i = 0; +} + +profile:::tick-1sec +{ + i = i + 1; + trace(i); +} + +dtrace:::END +{ + trace(i); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/intro/hello.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/intro/hello.d new file mode 100644 index 00000000..b5842915 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/intro/hello.d @@ -0,0 +1,31 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +BEGIN +{ + trace("hello, world"); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/intro/rwtime.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/intro/rwtime.d new file mode 100644 index 00000000..c005fbc4 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/intro/rwtime.d @@ -0,0 +1,39 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +syscall::read:entry, +syscall::write:entry +/pid == $1/ +{ + ts[probefunc] = timestamp; +} + +syscall::read:return, +syscall::write:return +/pid == $1 && ts[probefunc] != 0/ +{ + printf("%d nsecs", timestamp - ts[probefunc]); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/intro/trussrw.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/intro/trussrw.d new file mode 100644 index 00000000..590782f2 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/intro/trussrw.d @@ -0,0 +1,38 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +syscall::read:entry, +syscall::write:entry +/pid == $1/ +{ + printf("%s(%d, 0x%x, %4d)", probefunc, arg0, arg1, arg2); +} + +syscall::read:return, syscall::write:return +/pid == $1/ +{ + printf("\t\t = %d\n", arg1); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/io/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/io/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/io/applicat.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/io/applicat.d new file mode 100644 index 00000000..44bce364 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/io/applicat.d @@ -0,0 +1,32 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +io:::start +/execname == "soffice.bin" && args[2]->fi_name == "applicat.rdb"/ +{ + @ = lquantize(args[2]->fi_offset != -1 ? + args[2]->fi_offset / (1000 * 1024) : -1, 0, 1000); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/io/iocpu.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/io/iocpu.d new file mode 100644 index 00000000..6957071c --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/io/iocpu.d @@ -0,0 +1,65 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma D option quiet + +sched:::on-cpu +/execname == "soffice.bin"/ +{ + self->on = vtimestamp; +} + +sched:::off-cpu +/self->on/ +{ + @time[""] = sum(vtimestamp - self->on); + self->on = 0; +} + +io:::wait-start +/execname == "soffice.bin"/ +{ + self->wait = timestamp; +} + +io:::wait-done +/self->wait/ +{ + @io[args[2]->fi_name] = sum(timestamp - self->wait); + @time[""] = sum(timestamp - self->wait); + self->wait = 0; +} + +END +{ + printf("Time breakdown (milliseconds):\n"); + normalize(@time, 1000000); + printa(" %-50s %15@d\n", @time); + + printf("\nI/O wait breakdown (milliseconds):\n"); + normalize(@io, 1000000); + printa(" %-50s %15@d\n", @io); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/io/iosnoop.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/io/iosnoop.d new file mode 100644 index 00000000..1db6290c --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/io/iosnoop.d @@ -0,0 +1,38 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma D option quiet + +BEGIN +{ + printf("%10s %58s %2s\n", "DEVICE", "FILE", "RW"); +} + +io:::start +{ + printf("%10s %58s %2s\n", args[1]->dev_statname, + args[2]->fi_pathname, args[0]->b_flags & B_READ ? "R" : "W"); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/io/iothrough.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/io/iothrough.d new file mode 100644 index 00000000..b5b2e7e3 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/io/iothrough.d @@ -0,0 +1,66 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma D option quiet + +io:::start +{ + start[args[0]->b_edev, args[0]->b_blkno] = timestamp; +} + +io:::done +/start[args[0]->b_edev, args[0]->b_blkno]/ +{ + /* + * We want to get an idea of our throughput to this device in KB/sec. + * What we have, however, is nanoseconds and bytes. That is we want + * to calculate: + * + * bytes / 1024 + * ------------------------ + * nanoseconds / 1000000000 + * + * But we can't calculate this using integer arithmetic without losing + * precision (the denomenator, for one, is between 0 and 1 for nearly + * all I/Os). So we restate the fraction, and cancel: + * + * bytes 1000000000 bytes 976562 + * --------- * ------------- = --------- * ------------- + * 1024 nanoseconds 1 nanoseconds + * + * This is easy to calculate using integer arithmetic; this is what + * we do below. + */ + this->elapsed = timestamp - start[args[0]->b_edev, args[0]->b_blkno]; + @[args[1]->dev_statname, args[1]->dev_pathname] = + quantize((args[0]->b_bcount * 976562) / this->elapsed); + start[args[0]->b_edev, args[0]->b_blkno] = 0; +} + +END +{ + printa(" %s (%s)\n%@d\n", @); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/io/iotime.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/io/iotime.d new file mode 100644 index 00000000..0e0f6ac7 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/io/iotime.d @@ -0,0 +1,47 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma D option quiet + +BEGIN +{ + printf("%10s %58s %2s %7s\n", "DEVICE", "FILE", "RW", "MS"); +} + +io:::start +{ + start[args[0]->b_edev, args[0]->b_blkno] = timestamp; +} + +io:::done +/start[args[0]->b_edev, args[0]->b_blkno]/ +{ + this->elapsed = timestamp - start[args[0]->b_edev, args[0]->b_blkno]; + printf("%10s %58s %2s %3d.%03d\n", args[1]->dev_statname, + args[2]->fi_pathname, args[0]->b_flags & B_READ ? "R" : "W", + this->elapsed / 1000000, (this->elapsed / 1000) % 1000); + start[args[0]->b_edev, args[0]->b_blkno] = 0; +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/io/whoio.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/io/whoio.d new file mode 100644 index 00000000..f660b343 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/io/whoio.d @@ -0,0 +1,38 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma D option quiet + +io:::start +{ + @[args[1]->dev_statname, execname, pid] = sum(args[0]->b_bcount); +} + +END +{ + printf("%10s %20s %10s %15s\n", "DEVICE", "APP", "PID", "BYTES"); + printa("%10s %20s %10d %15@d\n", @); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/io/whowrite.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/io/whowrite.d new file mode 100644 index 00000000..6a4ffdd8 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/io/whowrite.d @@ -0,0 +1,39 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma D option quiet + +io:::start +/args[0]->b_flags & B_WRITE/ +{ + @[execname, args[2]->fi_dirname] = count(); +} + +END +{ + printf("%20s %51s %5s\n", "WHO", "WHERE", "COUNT"); + printa("%20s %51s %5@d\n", @); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/ip/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/ip/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/ip/ipio.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/ip/ipio.d new file mode 100644 index 00000000..0a7cc6f3 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/ip/ipio.d @@ -0,0 +1,52 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma D option quiet +#pragma D option switchrate=10hz + +dtrace:::BEGIN +{ + printf(" %3s %10s %15s %15s %8s %6s\n", "CPU", "DELTA(us)", + "SOURCE", "DEST", "INT", "BYTES"); + last = timestamp; +} + +ip:::send +{ + this->elapsed = (timestamp - last) / 1000; + printf(" %3d %10d %15s -> %15s %8s %6d\n", cpu, this->elapsed, + args[2]->ip_saddr, args[2]->ip_daddr, args[3]->if_name, + args[2]->ip_plength); + last = timestamp; +} + +ip:::receive +{ + this->elapsed = (timestamp - last) / 1000; + printf(" %3d %10d %15s <- %15s %8s %6d\n", cpu, this->elapsed, + args[2]->ip_daddr, args[2]->ip_saddr, args[3]->if_name, + args[2]->ip_plength); + last = timestamp; +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/ip/ipproto.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/ip/ipproto.d new file mode 100644 index 00000000..f5f3656e --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/ip/ipproto.d @@ -0,0 +1,45 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma D option quiet + +dtrace:::BEGIN +{ + printf("Tracing... Hit Ctrl-C to end.\n"); +} + +ip:::send, +ip:::receive +{ + this->protostr = args[2]->ip_ver == 4 ? + args[4]->ipv4_protostr : args[5]->ipv6_nextstr; + @num[args[2]->ip_saddr, args[2]->ip_daddr, this->protostr] = count(); +} + +dtrace:::END +{ + printf(" %-28s %-28s %6s %8s\n", "SADDR", "DADDR", "PROTO", "COUNT"); + printa(" %-28s %-28s %6s %@8d\n", @num); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/ip/tcprst.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/ip/tcprst.d new file mode 100755 index 00000000..a2d88e1c --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/ip/tcprst.d @@ -0,0 +1,284 @@ +#!/usr/sbin/dtrace -Cqs +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma D option dynvarsize=64m + +#define TH_RST 0x04 +#define MAX_RECORDS 10 +#define M_CTL 0x0d + +#define PRINT_MAIN_HEADER() \ + (printf("\n%-25s %-6s %-25s %-6s %-10s %-10s %8s %8s\n", \ + "LADDR", "LPORT", "RADDR", "RPORT", "ISS", "IRS", \ + "SND_CNT", "RCV_CNT")) + +#define PRINT_RECORD_HEADER() \ + (printf("%-20s %-20s %-3s %15s %15s %8s %8s %5s\n", \ + "PROBENAME", "TIME", "S/R", "SEQ", "ACK", "DATALEN", \ + "WND", "FLAGS")) + +#define PRINT_MAIN_HEADER_VALUES() \ + (printf("%-25s %-6d %-25s %-6d %-10d %-10d %8d %8d\n", \ + laddr[self->conn_id], lport[self->conn_id], \ + faddr[self->conn_id], fport[self->conn_id], \ + iss[self->conn_id], irs[self->conn_id], \ + send_count[self->conn_id], recv_count[self->conn_id])) + +#define PRINT_HEADER() \ + PRINT_MAIN_HEADER(); PRINT_MAIN_HEADER_VALUES(); \ + PRINT_RECORD_HEADER() + +#define PRINT_RECORD(i) \ + (printf("%-20s %-20Y %-3s %15d %15d %8d %8d %2x\n", \ + probe_name[self->conn_id, i], \ + conn_time[self->conn_id, i], \ + send_recv[self->conn_id, i], \ + seqno[self->conn_id, i], \ + ack[self->conn_id, i], \ + datalen[self->conn_id, i], \ + wnd[self->conn_id, i], \ + flags[self->conn_id, i])) + +tcp-trace-* +{ + /* extract connection details */ + + this->mp = (mblk_t *)arg0; + this->mp = (this->mp->b_datap->db_type == M_CTL? + this->mp->b_cont : this->mp); + self->tcpp = (tcp_t *)arg1; + this->connp = (conn_t *)self->tcpp->tcp_connp; + + self->iph = (ipha_t *)this->mp->b_rptr; + this->iph_length = + (int)(((ipha_t *)self->iph)->ipha_version_and_hdr_length + & 0xF) << 2; + self->tcph = (tcpha_t *)((char *)self->iph + this->iph_length); + this->tcph_length = + (((tcph_t *)self->tcph)->th_offset_and_rsrvd[0] >>2) &(0xF << 2); + + /* ports */ + self->i_lport = ntohs(this->connp->u_port.tcpu_ports.tcpu_lport); + self->i_fport = ntohs(this->connp->u_port.tcpu_ports.tcpu_fport); + + /* IP addresses */ + this->i_fad = (in6_addr_t *)&this->connp->connua_v6addr.connua_faddr; + this->i_lad = (in6_addr_t *)&this->connp->connua_v6addr.connua_laddr; + + /* the address would either be IPv6 or IPv4-mapped-IPv6 */ + self->i_faddr = inet_ntop(AF_INET6, (void *)this->i_fad); + self->i_laddr = inet_ntop(AF_INET6, (void *)this->i_lad); + + /* create connection identifier, so we can track packets by conn */ + self->conn_id = (uint64_t)self->tcpp->tcp_connp; +} + +tcp-trace-* +/first[self->conn_id] == 0/ +{ + /* initialize counters - this is the first packet for this connection */ + pcount[self->conn_id] = -1; + rollover[self->conn_id] = 0; + end_ptr[self->conn_id] = 0; + num[self->conn_id] = 0; + + first[self->conn_id] = 1; + + /* connection info */ + laddr[self->conn_id] = self->i_laddr; + faddr[self->conn_id] = self->i_faddr; + lport[self->conn_id] = self->i_lport; + fport[self->conn_id] = self->i_fport; + iss[self->conn_id] = self->tcpp->tcp_iss; + irs[self->conn_id] = self->tcpp->tcp_irs; + +} + +tcp-trace-* +{ + /* counters, to keep track of how much info to dump */ + pcount[self->conn_id]++; + rollover[self->conn_id] |= pcount[self->conn_id]/MAX_RECORDS; + pcount[self->conn_id] = pcount[self->conn_id]%MAX_RECORDS; + self->pcount = pcount[self->conn_id]; + end_ptr[self->conn_id] = self->pcount; + num[self->conn_id] = (rollover[self->conn_id]? + MAX_RECORDS : pcount[self->conn_id] + 1); + conn_time[self->conn_id, self->pcount] = walltimestamp; + + /* tcp state info */ + seqno[self->conn_id, self->pcount] = ntohl(self->tcph->tha_seq); + ack[self->conn_id, self->pcount] = ntohl(self->tcph->tha_ack); + datalen[self->conn_id, self->pcount] = ntohs(self->iph->ipha_length); + wnd[self->conn_id, self->pcount] = ntohs(self->tcph->tha_win); + probe_name[self->conn_id, self->pcount] = probename; + + /* flag 0x04 indicates a RST packet */ + flags[self->conn_id, self->pcount] = self->tcph->tha_flags; + self->flags = self->tcph->tha_flags; +} + +tcp-trace-send +{ + send_count[self->conn_id]++; + send_recv[self->conn_id, self->pcount] = "S"; +} + +tcp-trace-recv +{ + recv_count[self->conn_id]++; + send_recv[self->conn_id, self->pcount] = "R"; +} + +tcp-trace-* +/(self->flags & TH_RST)/ +{ + PRINT_HEADER(); + + self->i = (end_ptr[self->conn_id] + MAX_RECORDS - num[self->conn_id] + + 1)%MAX_RECORDS; +} + +tcp-trace-* +/(self->flags & TH_RST) && (num[self->conn_id] >= 10)/ +{ + PRINT_RECORD(self->i); + self->i = (self->i + 1)%MAX_RECORDS; + + num[self->conn_id]--; +} + +tcp-trace-* +/(self->flags & TH_RST) && (num[self->conn_id] >= 9)/ +{ + PRINT_RECORD(self->i); + self->i = (self->i + 1)%MAX_RECORDS; + + num[self->conn_id]--; +} + +tcp-trace-* +/(self->flags & TH_RST) && (num[self->conn_id] >= 8)/ +{ + PRINT_RECORD(self->i); + self->i = (self->i + 1)%MAX_RECORDS; + + num[self->conn_id]--; +} + +tcp-trace-* +/(self->flags & TH_RST) && (num[self->conn_id] >= 7)/ +{ + PRINT_RECORD(self->i); + self->i = (self->i + 1)%MAX_RECORDS; + + num[self->conn_id]--; +} + +tcp-trace-* +/(self->flags & TH_RST) && (num[self->conn_id] >= 6)/ +{ + PRINT_RECORD(self->i); + self->i = (self->i + 1)%MAX_RECORDS; + + num[self->conn_id]--; +} + +tcp-trace-* +/(self->flags & TH_RST) && (num[self->conn_id] >= 5)/ +{ + PRINT_RECORD(self->i); + self->i = (self->i + 1)%MAX_RECORDS; + + num[self->conn_id]--; +} + +tcp-trace-* +/(self->flags & TH_RST) && (num[self->conn_id] >= 4)/ +{ + PRINT_RECORD(self->i); + self->i = (self->i + 1)%MAX_RECORDS; + + num[self->conn_id]--; +} + +tcp-trace-* +/(self->flags & TH_RST) && (num[self->conn_id] >= 3)/ +{ + PRINT_RECORD(self->i); + self->i = (self->i + 1)%MAX_RECORDS; + + num[self->conn_id]--; +} + +tcp-trace-* +/(self->flags & TH_RST) && (num[self->conn_id] >= 2)/ +{ + PRINT_RECORD(self->i); + self->i = (self->i + 1)%MAX_RECORDS; + + num[self->conn_id]--; +} + +tcp-trace-* +/(self->flags & TH_RST) && (num[self->conn_id] >= 1)/ +{ + PRINT_RECORD(self->i); + self->i = (self->i + 1)%MAX_RECORDS; + + num[self->conn_id]--; + self->reset = self->conn_id; +} + +tcp-trace-* +/self->reset/ +{ + pcount[self->reset] = -1; + rollover[self->reset] = 0; + end_ptr[self->reset] = 0; + num[self->reset] = 0; + + self->reset = 0; +} + +conn-destroy +{ + /* clear old connection state */ + this->conn_id = (uint64_t)arg0; + + pcount[this->conn_id] = -1; + rollover[this->conn_id] = 0; + end_ptr[this->conn_id] = 0; + num[this->conn_id] = 0; + first[this->conn_id] = 0; + + laddr[this->conn_id] = 0; + faddr[this->conn_id] = 0; + lport[this->conn_id] = 0; + fport[this->conn_id] = 0; + iss[this->conn_id] = 0; + irs[this->conn_id] = 0; +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/lockstat/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/lockstat/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/lockstat/whatlock.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/lockstat/whatlock.d new file mode 100644 index 00000000..7ad20c5c --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/lockstat/whatlock.d @@ -0,0 +1,37 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +lockstat:::adaptive-acquire +/execname == "date"/ +{ + @locks["adaptive"] = count(); +} + +lockstat:::spin-acquire +/execname == "date"/ +{ + @locks["spin"] = count(); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/mkdemo.pl b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/mkdemo.pl new file mode 100644 index 00000000..f2bc3ec7 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/mkdemo.pl @@ -0,0 +1,227 @@ +#!/usr/perl5/bin/perl -w +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" + +require 5.005; + +use strict; +use warnings; +use Time::localtime; +use File::Basename; + +our ($cmd, $chapfile, $htmlfile, $dtrace_url, %chaps); + +$cmd = "mkdemo"; +$chapfile = "chapters"; +$htmlfile = "index.html"; +$dtrace_url = "http://www.sun.com/bigadmin/content/dtrace"; + +sub chaps_read { + my $fatal; + my %hash; + + open(CHAPS, "$chapfile"); + + while () { + my $field; + my $value; + + chop; + + if (/^#/) { + next; + } + + if (!/:/) { + if (exists $hash{'name'}) { + if (exists $chaps{$hash{'name'}}) { + print "$cmd: chapter $hash{'name'} "; + print "has two entries.\n"; + $fatal = 1; + } + + $chaps{$hash{'name'}} = { %hash }; + %hash = (); + next; + } + + %hash = (); + next; + } + + ($field, $value) = split /:\s*/, $_, 2; + + if ($field eq "descr") { + $value .= " "; + } + + $hash{$field} .= $value; + } + + if ($fatal) { + print "$cmd: fatal errors; cannot proceed.\n"; + exit; + } + + close (CHAPS); +} + +sub chaps_ascending { + $chaps{$a}{index} <=> $chaps{$b}{index}; +} + +sub demo_process { + my $chap = $_[0]; + my $demo = $_[1]; + my $year = localtime->year() + 1900; + + open DEMO, "<$chap/$demo" or die "Can't open demo $chap/$demo"; + open OUT, ">$demo" or die "Can't open $demo"; + + while () { + print OUT $_; + + if (/Use is subject to license terms/) { + print OUT <$outfile" or die "Can't open $outfile."; + + print HTML "\n\n"; + print HTML "Example DTrace Scripts\n"; + print HTML "\n\n"; + + print HTML "\n

\n\n"; + print HTML "

\n"; + print HTML "
"; + print HTML "

DTrace Examples

\n"; + + print HTML "

\n"; + print HTML "Here are the DTrace scripts\n"; + print HTML "that are used as examples in the\n"; + print HTML "$chaps{book}{title}. "; + print HTML "For more information on any one script, follow the link\n"; + print HTML "to its corresponding chapter.\n"; + print HTML "

\n


\n"; + + print HTML "\n"; + print HTML "\n"; + print HTML "\n"; + print HTML "\n"; + + foreach $chap (sort chaps_ascending (keys %chaps)) { + my @demos; + my $demo; + + # + # Open the directory associated with the chapter. + # + if ($chap =~ /^book$/) { + next; + } + + opendir(DEMOS, $chap) || die("Cannot open directory $chap"); + @demos = readdir(DEMOS); + closedir(DEMOS); + + print HTML "\n"; + print HTML "\n"; + + print HTML "\n"; + } + + print HTML "
"; + print HTML "ChapterScript
"; + print HTML ""; + print HTML "$chaps{$chap}{title}\n"; + + foreach $demo (sort(@demos)) { + if ($demo !~ /^[a-z].*\.d$/) { + next; + } + + print HTML "\n"; + + demo_process($chap, $demo); + } + + print HTML "
$demo"; + print HTML "
\n


Copyright "; + print HTML localtime->year() + 1900; + print HTML " Sun Microsystems\n"; + print HTML "
\n"; + print HTML "\n\n"; + close HTML; +} + +chaps_read(); + +if (basename($ARGV[0]) ne "$htmlfile") { + demo_find(basename($ARGV[0])); +} else { + chaps_process($htmlfile); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/out/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/out/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/out/printa.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/out/printa.d new file mode 100644 index 00000000..f3cee56c --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/out/printa.d @@ -0,0 +1,35 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +profile:::profile-997 +{ + @a[caller] = count(); +} + +END +{ + printa("%@8u %a\n", @a); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/proc/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/proc/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/proc/lwptime.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/proc/lwptime.d new file mode 100644 index 00000000..53949af4 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/proc/lwptime.d @@ -0,0 +1,38 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +proc:::lwp-start +/tid != 1/ +{ + self->start = timestamp; +} + +proc:::lwp-exit +/self->start/ +{ + @[execname] = quantize(timestamp - self->start); + self->start = 0; +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/proc/progtime.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/proc/progtime.d new file mode 100644 index 00000000..8bfa369f --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/proc/progtime.d @@ -0,0 +1,37 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +proc:::start +{ + self->start = timestamp; +} + +proc:::exit +/self->start/ +{ + @[execname] = quantize(timestamp - self->start); + self->start = 0; +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/proc/sig.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/proc/sig.d new file mode 100644 index 00000000..07d9b25c --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/proc/sig.d @@ -0,0 +1,39 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma D option quiet + +proc:::signal-send +{ + @[execname, stringof(args[1]->pr_fname), args[2]] = count(); +} + +END +{ + printf("%20s %20s %12s %s\n", + "SENDER", "RECIPIENT", "SIG", "COUNT"); + printa("%20s %20s %12d %@d\n", @); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/proc/whoexec.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/proc/whoexec.d new file mode 100644 index 00000000..ee0fe4ff --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/proc/whoexec.d @@ -0,0 +1,51 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma D option quiet + +proc:::exec +{ + self->parent = execname; +} + +proc:::exec-success +/self->parent != NULL/ +{ + @[self->parent, execname] = count(); + self->parent = NULL; +} + +proc:::exec-failure +/self->parent != NULL/ +{ + self->parent = NULL; +} + +END +{ + printf("%-20s %-20s %s\n", "WHO", "WHAT", "COUNT"); + printa("%-20s %-20s %@d\n", @); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/profile/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/profile/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/profile/prof.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/profile/prof.d new file mode 100644 index 00000000..4eedf502 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/profile/prof.d @@ -0,0 +1,39 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma D option quiet + +profile-97 +/pid != 0/ +{ + @proc[pid, execname] = count(); +} + +END +{ + printf("%-8s %-40s %s\n", "PID", "CMD", "COUNT"); + printa("%-8d %-40s %@d\n", @proc); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/profile/profpri.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/profile/profpri.d new file mode 100644 index 00000000..615594b5 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/profile/profpri.d @@ -0,0 +1,31 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +profile-1001 +/pid == $1/ +{ + @proc[execname] = lquantize(curlwpsinfo->pr_pri, 0, 100, 10); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/profile/restest.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/profile/restest.d new file mode 100644 index 00000000..390ea124 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/profile/restest.d @@ -0,0 +1,45 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +profile-5000 +{ + /* + * We divide by 1,000,000 to convert nanoseconds to milliseconds, and + * then we take the value mod 10 to get the current millisecond within + * a 10 millisecond window. On platforms that do not support truly + * arbitrary resolution profile probes, all of the profile-5000 probes + * will fire on roughly the same millisecond. On platforms that + * support a truly arbitrary resolution, the probe firings will be + * evenly distributed across the milliseconds. + */ + @ms = lquantize((timestamp / 1000000) % 10, 0, 10, 1); +} + +tick-1sec +/i++ >= 10/ +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/firebird.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/firebird.d new file mode 100644 index 00000000..ab65e956 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/firebird.d @@ -0,0 +1,52 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma D option quiet + +sched:::sleep +/execname == "MozillaFirebird" && curlwpsinfo->pr_stype == SOBJ_CV/ +{ + bedtime[curlwpsinfo->pr_addr] = timestamp; +} + +sched:::wakeup +/execname == "MozillaFirebird" && bedtime[args[0]->pr_addr]/ +{ + @[args[1]->pr_pid, args[0]->pr_lwpid, pid, curlwpsinfo->pr_lwpid] = + quantize(timestamp - bedtime[args[0]->pr_addr]); + bedtime[args[0]->pr_addr] = 0; +} + +sched:::wakeup +/bedtime[args[0]->pr_addr]/ +{ + bedtime[args[0]->pr_addr] = 0; +} + +END +{ + printa("%d/%d sleeping on %d/%d:\n%@d\n", @); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/howlong.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/howlong.d new file mode 100644 index 00000000..0fcfa1c1 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/howlong.d @@ -0,0 +1,42 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +sched:::off-cpu +/curlwpsinfo->pr_state == SSLEEP/ +{ + self->cpu = cpu; + self->ts = timestamp; +} + +sched:::on-cpu +/self->ts/ +{ + @[self->cpu == cpu ? + "sleep time, no CPU migration" : "sleep time, CPU migration"] = + lquantize((timestamp - self->ts) / 1000000, 0, 500, 25); + self->ts = 0; + self->cpu = 0; +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/nscd.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/nscd.d new file mode 100644 index 00000000..8e30ac44 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/nscd.d @@ -0,0 +1,45 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +sched:::sleep +/curlwpsinfo->pr_stype == SOBJ_SHUTTLE/ +{ + bedtime[curlwpsinfo->pr_addr] = timestamp; +} + +sched:::wakeup +/execname == "nscd" && bedtime[args[0]->pr_addr]/ +{ + @[stringof(curpsinfo->pr_fname), stringof(args[1]->pr_fname)] = + quantize(timestamp - bedtime[args[0]->pr_addr]); + bedtime[args[0]->pr_addr] = 0; +} + +sched:::wakeup +/bedtime[args[0]->pr_addr]/ +{ + bedtime[args[0]->pr_addr] = 0; +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/pri.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/pri.d new file mode 100644 index 00000000..ea76fd79 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/pri.d @@ -0,0 +1,31 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +sched:::change-pri +{ + @[stringof(args[0]->pr_clname)] = + lquantize(args[2] - args[0]->pr_pri, -50, 50, 5); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/pritime.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/pritime.d new file mode 100644 index 00000000..2c80e6a7 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/pritime.d @@ -0,0 +1,44 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma D option quiet + +BEGIN +{ + start = timestamp; +} + +sched:::change-pri +/args[1]->pr_pid == $1 && args[0]->pr_lwpid == $2/ +{ + printf("%d %d\n", timestamp - start, args[2]); +} + +tick-1sec +/++n == 5/ +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/qlen.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/qlen.d new file mode 100644 index 00000000..a34ae4cf --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/qlen.d @@ -0,0 +1,37 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +sched:::enqueue +{ + this->len = qlen[args[2]->cpu_id]++; + @[args[2]->cpu_id] = lquantize(this->len, 0, 100); +} + +sched:::dequeue +/qlen[args[2]->cpu_id]/ +{ + qlen[args[2]->cpu_id]--; +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/qtime.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/qtime.d new file mode 100644 index 00000000..54ebf5f5 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/qtime.d @@ -0,0 +1,38 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +sched:::enqueue +{ + ts[args[0]->pr_lwpid, args[1]->pr_pid, args[2]->cpu_id] = + timestamp; +} + +sched:::dequeue +/ts[args[0]->pr_lwpid, args[1]->pr_pid, args[2]->cpu_id]/ +{ + @[args[2]->cpu_id] = quantize(timestamp - + ts[args[0]->pr_lwpid, args[1]->pr_pid, args[2]->cpu_id]); + ts[args[0]->pr_lwpid, args[1]->pr_pid, args[2]->cpu_id] = 0; +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/tick.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/tick.d new file mode 100644 index 00000000..88427593 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/tick.d @@ -0,0 +1,31 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +sched:::tick, +sched:::enqueue +{ + @[probename] = lquantize((timestamp / 1000000) % 10, 0, 10); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/ticktime.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/ticktime.d new file mode 100644 index 00000000..e24a80ad --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/ticktime.d @@ -0,0 +1,38 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +uint64_t last[int]; + +sched:::tick +/last[cpu]/ +{ + @[cpu] = min(timestamp - last[cpu]); +} + +sched:::tick +{ + last[cpu] = timestamp; +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/whatfor.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/whatfor.d new file mode 100644 index 00000000..d8b6edb0 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/whatfor.d @@ -0,0 +1,64 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +sched:::off-cpu +/curlwpsinfo->pr_state == SSLEEP/ +{ + /* + * We're sleeping. Track our sobj type. + */ + self->sobj = curlwpsinfo->pr_stype; + self->bedtime = timestamp; +} + +sched:::off-cpu +/curlwpsinfo->pr_state == SRUN/ +{ + self->bedtime = timestamp; +} + +sched:::on-cpu +/self->bedtime && !self->sobj/ +{ + @["preempted"] = quantize(timestamp - self->bedtime); + self->bedtime = 0; +} + +sched:::on-cpu +/self->sobj/ +{ + @[self->sobj == SOBJ_MUTEX ? "kernel-level lock" : + self->sobj == SOBJ_RWLOCK ? "rwlock" : + self->sobj == SOBJ_CV ? "condition variable" : + self->sobj == SOBJ_SEMA ? "semaphore" : + self->sobj == SOBJ_USER ? "user-level lock" : + self->sobj == SOBJ_USER_PI ? "user-level prio-inheriting lock" : + self->sobj == SOBJ_SHUTTLE ? "shuttle" : "unknown"] = + quantize(timestamp - self->bedtime); + + self->sobj = 0; + self->bedtime = 0; +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/where.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/where.d new file mode 100644 index 00000000..af026244 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/where.d @@ -0,0 +1,37 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +sched:::on-cpu +{ + self->ts = timestamp; +} + +sched:::off-cpu +/self->ts/ +{ + @[cpu] = quantize(timestamp - self->ts); + self->ts = 0; +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/whererun.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/whererun.d new file mode 100644 index 00000000..ddd13f75 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/whererun.d @@ -0,0 +1,60 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma D option quiet + +dtrace:::BEGIN +{ + start = timestamp; +} + +sched:::on-cpu +/execname == $$1/ +{ + self->ts = timestamp; +} + +sched:::off-cpu +/self->ts/ +{ + @[cpu] = sum(timestamp - self->ts); + self->ts = 0; +} + +profile:::tick-1sec +/++x == 10/ +{ + exit(0); +} + +dtrace:::END +{ + printf("CPU distribution over %d seconds:\n\n", + (timestamp - start) / 1000000000); + printf("CPU microseconds\n--- ------------\n"); + normalize(@, 1000); + printa("%3d %@d\n", @); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/whofor.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/whofor.d new file mode 100644 index 00000000..f0243d60 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/whofor.d @@ -0,0 +1,46 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma D option quiet + +sched:::sleep +/!(curlwpsinfo->pr_flag & PR_ISSYS) && curlwpsinfo->pr_stype == SOBJ_CV/ +{ + bedtime[curlwpsinfo->pr_addr] = timestamp; +} + +sched:::wakeup +/bedtime[args[0]->pr_addr]/ +{ + @[stringof(args[1]->pr_fname), execname] = + quantize(timestamp - bedtime[args[0]->pr_addr]); + bedtime[args[0]->pr_addr] = 0; +} + +END +{ + printa("%s sleeping on %s:\n%@d\n", @); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/whopreempt.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/whopreempt.d new file mode 100644 index 00000000..e8dd8633 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/whopreempt.d @@ -0,0 +1,57 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma D option quiet + +sched:::preempt +{ + self->preempt = 1; +} + +sched:::remain-cpu +/self->preempt/ +{ + self->preempt = 0; +} + +sched:::off-cpu +/self->preempt/ +{ + /* + * If we were told to preempt ourselves, see who we ended up giving + * the CPU to. + */ + @[stringof(args[1]->pr_fname), args[0]->pr_pri, execname, + curlwpsinfo->pr_pri] = count(); + self->preempt = 0; +} + +END +{ + printf("%30s %3s %30s %3s %5s\n", "PREEMPTOR", "PRI", + "PREEMPTED", "PRI", "#"); + printa("%30s %3d %30s %3d %5@d\n", @); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/whoqueue.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/whoqueue.d new file mode 100644 index 00000000..c2ab47a3 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/whoqueue.d @@ -0,0 +1,95 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma D option quiet +#pragma D option nspec=4 +#pragma D option specsize=100k + +int maxlen; +int spec[int]; + +sched:::enqueue +{ + this->len = ++qlen[this->cpu = args[2]->cpu_id]; + in[args[0]->pr_addr] = timestamp; +} + +sched:::enqueue +/this->len > maxlen && spec[this->cpu]/ +{ + /* + * There is already a speculation for this CPU. We just set a new + * record, so we'll discard the old one. + */ + discard(spec[this->cpu]); +} + +sched:::enqueue +/this->len > maxlen/ +{ + /* + * We have a winner. Set the new maximum length and set the timestamp + * of the longest length. + */ + maxlen = this->len; + longtime[this->cpu] = timestamp; + + /* + * Now start a new speculation, and speculatively trace the length. + */ + this->spec = spec[this->cpu] = speculation(); + speculate(this->spec); + printf("Run queue of length %d:\n", this->len); +} + +sched:::dequeue +/(this->in = in[args[0]->pr_addr]) && + this->in <= longtime[this->cpu = args[2]->cpu_id]/ +{ + speculate(spec[this->cpu]); + printf(" %d/%d (%s)\n", + args[1]->pr_pid, args[0]->pr_lwpid, + stringof(args[1]->pr_fname)); +} + +sched:::dequeue +/qlen[args[2]->cpu_id]/ +{ + in[args[0]->pr_addr] = 0; + this->len = --qlen[args[2]->cpu_id]; +} + +sched:::dequeue +/this->len == 0 && spec[this->cpu]/ +{ + /* + * We just processed the last thread that was enqueued at the time + * of longest length; commit the speculation, which by now contains + * each thread that was enqueued when the queue was longest. + */ + commit(spec[this->cpu]); + spec[this->cpu] = 0; +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/whosteal.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/whosteal.d new file mode 100644 index 00000000..c698e4f1 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/whosteal.d @@ -0,0 +1,40 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma D option quiet + +sched:::dequeue +/args[2]->cpu_id != -1 && cpu != args[2]->cpu_id && + (curlwpsinfo->pr_flag & PR_IDLE)/ +{ + @[stringof(args[1]->pr_fname), args[2]->cpu_id] = + lquantize(cpu, 0, 100); +} + +END +{ + printa("%s stolen from CPU %d by:\n%@d\n", @); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/xterm.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/xterm.d new file mode 100644 index 00000000..bb5ed33c --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/xterm.d @@ -0,0 +1,44 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma D option quiet + +dtrace:::BEGIN +{ + start = timestamp; +} + +sched:::wakeup +/stringof(args[1]->pr_fname) == "xterm"/ +{ + @[execname] = lquantize((timestamp - start) / 1000000000, 0, 10); +} + +profile:::tick-1sec +/++x == 10/ +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/xwork.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/xwork.d new file mode 100644 index 00000000..cbaf1057 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sched/xwork.d @@ -0,0 +1,40 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +self int last; + +sched:::wakeup +/self->last && args[0]->pr_stype == SOBJ_CV/ +{ + @[stringof(args[1]->pr_fname)] = sum(vtimestamp - self->last); + self->last = 0; +} + +sched:::wakeup +/execname == "Xsun" && self->last == 0/ +{ + self->last = vtimestamp; +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/script/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/script/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/script/interp.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/script/interp.d new file mode 100644 index 00000000..c3e419ec --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/script/interp.d @@ -0,0 +1,33 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#!/usr/sbin/dtrace -s + +BEGIN +{ + trace("hello"); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/script/syscall.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/script/syscall.d new file mode 100644 index 00000000..c47fb922 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/script/syscall.d @@ -0,0 +1,31 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +syscall:::entry +/pid == $target/ +{ + @[probefunc] = count(); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/script/tracewrite.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/script/tracewrite.d new file mode 100644 index 00000000..c1336cf7 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/script/tracewrite.d @@ -0,0 +1,32 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#!/usr/sbin/dtrace -s + +syscall::write:entry +/pid == $1/ +{ +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sdt/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sdt/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sdt/callout.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sdt/callout.d new file mode 100644 index 00000000..2044536f --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sdt/callout.d @@ -0,0 +1,38 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma D option quiet + +sdt:::callout-start +{ + @callouts[((callout_t *)arg0)->c_func] = count(); +} + +tick-1sec +{ + printa("%40a %10@d\n", @callouts); + clear(@callouts); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sdt/interval.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sdt/interval.d new file mode 100644 index 00000000..d4a6a320 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sdt/interval.d @@ -0,0 +1,54 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma D option quiet + +sdt:::callout-start +{ + self->callout = ((callout_t *)arg0)->c_func; +} + +fbt::timeout:entry +/self->callout && arg2 <= 100/ +{ + /* + * In this case, we are most interested in interval timeout(9F)s that + * are short. We therefore do a linear quantization from 0 ticks to + * 100 ticks. The system clock's frequency ? set by the variable + * "hz" ? defaults to 100, so 100 system clock ticks is one second. + */ + @callout[self->callout] = lquantize(arg2, 0, 100); +} + +sdt:::callout-end +{ + self->callout = NULL; +} + +END +{ + printa("%a\n%@d\n\n", @callout); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sdt/intr.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sdt/intr.d new file mode 100644 index 00000000..5233450f --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sdt/intr.d @@ -0,0 +1,38 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +interrupt-start +{ + self->ts = vtimestamp; +} + +interrupt-complete +/self->ts/ +{ + this->devi = (struct dev_info *)arg0; + @[stringof(`devnamesp[this->devi->devi_major].dn_name), + this->devi->devi_instance] = quantize(vtimestamp - self->ts); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/spec/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/spec/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/spec/spec.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/spec/spec.d new file mode 100644 index 00000000..dc162a1b --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/spec/spec.d @@ -0,0 +1,37 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +syscall::open:entry +{ + self->spec = speculation(); +} + +syscall::: +/self->spec/ +{ + speculate(self->spec); + printf("this is speculative"); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/spec/specopen.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/spec/specopen.d new file mode 100644 index 00000000..f1975ff8 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/spec/specopen.d @@ -0,0 +1,93 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#!/usr/sbin/dtrace -Fs + +syscall::open:entry, +syscall::open64:entry +{ + /* + * The call to speculation() creates a new speculation. If this fails, + * dtrace(1M) will generate an error message indicating the reason for + * the failed speculation(), but subsequent speculative tracing will be + * silently discarded. + */ + self->spec = speculation(); + speculate(self->spec); + + /* + * Because this printf() follows the speculate(), it is being + * speculatively traced; it will only appear in the data buffer if the + * speculation is subsequently commited. + */ + printf("%s", stringof(copyinstr(arg0))); +} + +fbt::: +/self->spec/ +{ + /* + * A speculate() with no other actions speculates the default action: + * tracing the EPID. + */ + speculate(self->spec); +} + +syscall::open:return, +syscall::open64:return +/self->spec/ +{ + /* + * To balance the output with the -F option, we want to be sure that + * every entry has a matching return. Because we speculated the + * open entry above, we want to also speculate the open return. + * This is also a convenient time to trace the errno value. + */ + speculate(self->spec); + trace(errno); +} + +syscall::open:return, +syscall::open64:return +/self->spec && errno != 0/ +{ + /* + * If errno is non-zero, we want to commit the speculation. + */ + commit(self->spec); + self->spec = 0; +} + +syscall::open:return, +syscall::open64:return +/self->spec && errno == 0/ +{ + /* + * If errno is not set, we discard the speculation. + */ + discard(self->spec); + self->spec = 0; +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/struct/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/struct/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/struct/kstat.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/struct/kstat.d new file mode 100644 index 00000000..1b40ddaa --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/struct/kstat.d @@ -0,0 +1,44 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +pid$1:libkstat:kstat_data_lookup:entry +{ + self->ksname = arg1; +} + +pid$1:libkstat:kstat_data_lookup:return +/self->ksname != NULL && arg1 != NULL/ +{ + this->ksp = (kstat_named_t *) copyin(arg1, sizeof (kstat_named_t)); + printf("%s has ui64 value %u\n", + copyinstr(self->ksname), this->ksp->value.ui64); +} + +pid$1:libkstat:kstat_data_lookup:return +/self->ksname != NULL && arg1 == NULL/ +{ + self->ksname = NULL; +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/struct/ksyms.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/struct/ksyms.d new file mode 100644 index 00000000..ab2f1cb5 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/struct/ksyms.d @@ -0,0 +1,55 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +/* + * When our strings(1) invocation starts a read(2), set a watched flag on + * the current thread. When the read(2) finishes, clear the watched flag. + */ +syscall::read:entry +/curpsinfo->pr_psargs == "strings -a /dev/ksyms"/ +{ + printf("read %u bytes to user address %x\n", arg2, arg1); + self->watched = 1; +} + +syscall::read:return +/self->watched/ +{ + self->watched = 0; +} + +/* + * Instrument uiomove(9F). The prototype for this function is as follows: + * int uiomove(caddr_t addr, size_t nbytes, enum uio_rw rwflag, uio_t *uio); + */ +fbt::uiomove:entry +/self->watched/ +{ + this->iov = args[3]->uio_iov; + + printf("uiomove %u bytes to %p in pid %d\n", + this->iov->iov_len, this->iov->iov_base, pid); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/struct/rwinfo.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/struct/rwinfo.d new file mode 100644 index 00000000..866678ef --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/struct/rwinfo.d @@ -0,0 +1,59 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +struct callinfo { + uint64_t ts; /* timestamp of last syscall entry */ + uint64_t elapsed; /* total elapsed time in nanoseconds */ + uint64_t calls; /* number of calls made */ + size_t maxbytes; /* maximum byte count argument */ +}; + +struct callinfo i[string]; /* declare i as an associative array */ + +syscall::read:entry, syscall::write:entry +/pid == $1/ +{ + i[probefunc].ts = timestamp; + i[probefunc].calls++; + i[probefunc].maxbytes = arg2 > i[probefunc].maxbytes ? + arg2 : i[probefunc].maxbytes; +} + +syscall::read:return, syscall::write:return +/i[probefunc].ts != 0 && pid == $1/ +{ + i[probefunc].elapsed += timestamp - i[probefunc].ts; +} + +END +{ + printf(" calls max bytes elapsed nsecs\n"); + printf("------ ----- --------- -------------\n"); + printf(" read %5d %9d %d\n", + i["read"].calls, i["read"].maxbytes, i["read"].elapsed); + printf(" write %5d %9d %d\n", + i["write"].calls, i["write"].maxbytes, i["write"].elapsed); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sysinfo/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sysinfo/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sysinfo/find.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sysinfo/find.d new file mode 100644 index 00000000..d927072c --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/sysinfo/find.d @@ -0,0 +1,45 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +syscall:::entry +/execname == "find"/ +{ + self->syscall = probefunc; + self->insys = 1; +} + +sysinfo:::xcalls +/execname == "find"/ +{ + @[self->insys ? self->syscall : ""] = count(); +} + +syscall:::return +/self->insys/ +{ + self->insys = 0; + self->syscall = NULL; +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/tcp/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/tcp/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/tcp/tcp1stbyte.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/tcp/tcp1stbyte.d new file mode 100755 index 00000000..94001296 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/tcp/tcp1stbyte.d @@ -0,0 +1,37 @@ +#!/usr/sbin/dtrace -s +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + */ + +tcp:::connect-established +{ + start[args[1]->cs_cid] = timestamp; +} + +tcp:::receive +/start[args[1]->cs_cid] && (args[2]->ip_plength - args[4]->tcp_offset) > 0/ +{ + @latency["1st Byte Latency (ns)", args[2]->ip_saddr] = + quantize(timestamp - start[args[1]->cs_cid]); + start[args[1]->cs_cid] = 0; +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/tcp/tcpbytes.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/tcp/tcpbytes.d new file mode 100755 index 00000000..7fb68de9 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/tcp/tcpbytes.d @@ -0,0 +1,36 @@ +#!/usr/sbin/dtrace -s +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + */ + +tcp:::receive +{ + @bytes[args[2]->ip_saddr, args[4]->tcp_dport] = + sum(args[2]->ip_plength - args[4]->tcp_offset); +} + +tcp:::send +{ + @bytes[args[2]->ip_daddr, args[4]->tcp_sport] = + sum(args[2]->ip_plength - args[4]->tcp_offset); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/tcp/tcpbytesstat.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/tcp/tcpbytesstat.d new file mode 100755 index 00000000..ecd9b044 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/tcp/tcpbytesstat.d @@ -0,0 +1,45 @@ +#!/usr/sbin/dtrace -s +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + */ + +#pragma D option quiet + +tcp:::receive +{ + @bytes[args[2]->ip_saddr, args[4]->tcp_dport] = + sum(args[2]->ip_plength - args[4]->tcp_offset); +} + +tcp:::send +{ + @bytes[args[2]->ip_daddr, args[4]->tcp_sport] = + sum(args[2]->ip_plength - args[4]->tcp_offset); +} + +profile:::tick-1sec +{ + printf("\n %-32s %16s\n", "HOST", "BYTES/s"); + printa(" %-32s %@16d\n", @bytes); + trunc(@bytes); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/tcp/tcpconnlat.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/tcp/tcpconnlat.d new file mode 100755 index 00000000..bc395f97 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/tcp/tcpconnlat.d @@ -0,0 +1,37 @@ +#!/usr/sbin/dtrace -s +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + */ + +tcp:::connect-request +{ + start[args[1]->cs_cid] = timestamp; +} + +tcp:::connect-established +/start[args[1]->cs_cid] / +{ + @latency["Connect Latency (ns)", args[3]->tcps_raddr] = + quantize(timestamp - start[args[1]->cs_cid]); + start[args[1]->cs_cid] = 0; +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/tcp/tcpio.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/tcp/tcpio.d new file mode 100755 index 00000000..b3628430 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/tcp/tcpio.d @@ -0,0 +1,32 @@ +#!/usr/sbin/dtrace -s +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + */ + +tcp:::send, +tcp:::receive +{ + printf("%15s:%-5d -> %15s:%-5d", + args[2]->ip_saddr, args[4]->tcp_sport, + args[2]->ip_daddr, args[4]->tcp_dport); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/tcp/tcpioflags.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/tcp/tcpioflags.d new file mode 100755 index 00000000..cdfbd2aa --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/tcp/tcpioflags.d @@ -0,0 +1,64 @@ +#!/usr/sbin/dtrace -s +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + */ + +#pragma D option quiet +#pragma D option switchrate=10hz + +dtrace:::BEGIN +{ + printf(" %15s:%-5s %15s:%-5s %6s %s\n", + "LADDR", "PORT", "RADDR", "PORT", "BYTES", "FLAGS"); +} + +tcp:::send +{ + this->length = args[2]->ip_plength - args[4]->tcp_offset; + printf(" %15s:%-5d -> %15s:%-5d %6d (", + args[2]->ip_saddr, args[4]->tcp_sport, + args[2]->ip_daddr, args[4]->tcp_dport, this->length); +} + +tcp:::receive +{ + this->length = args[2]->ip_plength - args[4]->tcp_offset; + printf(" %15s:%-5d <- %15s:%-5d %6d (", + args[2]->ip_daddr, args[4]->tcp_dport, + args[2]->ip_saddr, args[4]->tcp_sport, this->length); +} + +tcp:::send, +tcp:::receive +{ + printf("%s", args[4]->tcp_flags & TH_FIN ? "FIN|" : ""); + printf("%s", args[4]->tcp_flags & TH_SYN ? "SYN|" : ""); + printf("%s", args[4]->tcp_flags & TH_RST ? "RST|" : ""); + printf("%s", args[4]->tcp_flags & TH_PUSH ? "PUSH|" : ""); + printf("%s", args[4]->tcp_flags & TH_ACK ? "ACK|" : ""); + printf("%s", args[4]->tcp_flags & TH_URG ? "URG|" : ""); + printf("%s", args[4]->tcp_flags & TH_ECE ? "ECE|" : ""); + printf("%s", args[4]->tcp_flags & TH_CWR ? "CWR|" : ""); + printf("%s", args[4]->tcp_flags == 0 ? "null " : ""); + printf("\b)\n"); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/tcp/tcpsnoop.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/tcp/tcpsnoop.d new file mode 100755 index 00000000..9d44519e --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/tcp/tcpsnoop.d @@ -0,0 +1,78 @@ +#!/usr/sbin/dtrace -s +/* + * tcpsnoop - snoop TCP network packets by process. + * Written using DTrace tcp Provider. + * + * This analyses TCP network packets and prints the responsible PID plus + * standard details such as IP address and port. This captures traffic + * from existing and newly created TCP connections. It can help identify + * which processes are causing TCP traffic. + * + * SEE ALSO: snoop -rS + * + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * + * Portions Copyright 2010 Brendan Gregg + */ + +#pragma D option quiet +#pragma D option switchrate=10hz + +dtrace:::BEGIN +{ + printf("%6s %6s %15s:%-5s %15s:%-5s %6s %s\n", + "TIME", "PID", "LADDR", "PORT", "RADDR", "PORT", "BYTES", "FLAGS"); +} + +tcp:::send +{ + this->length = args[2]->ip_plength - args[4]->tcp_offset; + printf("%6d %6d %15s:%-5d -> %15s:%-5d %6d (", + timestamp/1000, args[1]->cs_pid, args[2]->ip_saddr, + args[4]->tcp_sport, args[2]->ip_daddr, args[4]->tcp_dport, + this->length); +} + +tcp:::receive +{ + this->length = args[2]->ip_plength - args[4]->tcp_offset; + printf("%6d %6d %15s:%-5d <- %15s:%-5d %6d (", + timestamp/1000, args[1]->cs_pid, args[2]->ip_daddr, + args[4]->tcp_dport, args[2]->ip_saddr, args[4]->tcp_sport, + this->length); +} + +tcp:::send, +tcp:::receive +{ + printf("%s", args[4]->tcp_flags & TH_FIN ? "FIN|" : ""); + printf("%s", args[4]->tcp_flags & TH_SYN ? "SYN|" : ""); + printf("%s", args[4]->tcp_flags & TH_RST ? "RST|" : ""); + printf("%s", args[4]->tcp_flags & TH_PUSH ? "PUSH|" : ""); + printf("%s", args[4]->tcp_flags & TH_ACK ? "ACK|" : ""); + printf("%s", args[4]->tcp_flags & TH_URG ? "URG|" : ""); + printf("%s", args[4]->tcp_flags & TH_ECE ? "ECE|" : ""); + printf("%s", args[4]->tcp_flags & TH_CWR ? "CWR|" : ""); + printf("%s", args[4]->tcp_flags == 0 ? "null " : ""); + printf("\b)\n"); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/tcp/tcpstate.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/tcp/tcpstate.d new file mode 100755 index 00000000..38f0470a --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/tcp/tcpstate.d @@ -0,0 +1,39 @@ +#!/usr/sbin/dtrace -s +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + */ + +#pragma D option quiet + +dtrace:::BEGIN +{ + printf("%-10s %-10s %-20s %-20s\n", "C", "PID", "PREV", "NEW"); +} + + +tcp:::state-change +{ + printf("%-10d %-10d %-20s -> %-20s\n", cpu, args[1]->cs_pid, + tcp_state_string[args[5]->tcps_state], + tcp_state_string[args[3]->tcps_state]); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/tcp/tcptop.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/tcp/tcptop.d new file mode 100755 index 00000000..450f496e --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/tcp/tcptop.d @@ -0,0 +1,138 @@ +#!/usr/sbin/dtrace -s +/* + * tcptop: display top TCP network packets by process. + * Written using DTrace tcp Provider. + * + * Usage: dtrace -s tcptop.d [count] [interval] + * + * This analyses TCP network packets and prints the responsible PID plus + * standard details such as IP address and port. This captures traffic + * of newly created TCP connections that were established while this program + * was running along with traffic from existing connections. It can help + * identify which processes is causing TCP traffic. + * + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * + * Portions Copyright 2010 Brendan Gregg + */ + +#pragma D option quiet +#pragma D option defaultargs +#pragma D option switchrate=10hz + +/* + * Print header + */ +dtrace:::BEGIN +{ + /* starting values */ + counts = $1 ? $1 : 10; + secs = $2 ? $2 : 5; + TCP_out = 0; + TCP_in = 0; + + printf("Sampling... Please wait.\n"); +} + + +tcp:::send +/ args[1]->cs_pid != -1 / +{ + @out[args[1]->cs_zoneid, args[1]->cs_pid, args[2]->ip_saddr, + args[4]->tcp_sport, args[2]->ip_daddr, args[4]->tcp_dport] = + sum(args[2]->ip_plength - args[4]->tcp_offset); +} + +tcp:::receive +/ args[1]->cs_pid != -1 / +{ + @out[args[1]->cs_zoneid, args[1]->cs_pid, args[2]->ip_daddr, + args[4]->tcp_dport, args[2]->ip_saddr, args[4]->tcp_sport] = + sum(args[2]->ip_plength - args[4]->tcp_offset); +} + +/* + * TCP Systemwide Stats + */ +mib:::tcpOutDataBytes { TCP_out += args[0]; } +mib:::tcpRetransBytes { TCP_out += args[0]; } +mib:::tcpInDataInorderBytes { TCP_in += args[0]; } +mib:::tcpInDataDupBytes { TCP_in += args[0]; } +mib:::tcpInDataUnorderBytes { TCP_in += args[0]; } + +profile:::tick-1sec +/secs != 0/ +{ + secs--; +} + +/* + * Print Report + */ +profile:::tick-1sec +/secs == 0/ +{ + /* fetch 1 min load average */ + this->load1a = `hp_avenrun[0] / 65536; + this->load1b = ((`hp_avenrun[0] % 65536) * 100) / 65536; + + /* convert TCP counters to Kb */ + TCP_out /= 1024; + TCP_in /= 1024; + + /* print status */ + printf("%Y, load: %d.%02d, TCPin: %6d Kb, TCPout: %6d Kb\n\n", + walltimestamp, this->load1a, this->load1b, TCP_in, TCP_out); + + /* print headers */ + printf("%6s %6s %-15s %5s %-15s %5s %9s\n", + "ZONE", "PID", "LADDR", "LPORT", "RADDR", "RPORT", "SIZE"); + + /* print data */ + printa("%6d %6d %-15s %5d %-15s %5d %@9d\n", @out); + printf("\n"); + + /* clear data */ + trunc(@out); + TCP_in = 0; + TCP_out = 0; + secs = 5; + counts--; +} + +/* + * End of program + */ +profile:::tick-1sec +/counts == 0/ +{ + exit(0); +} + +/* + * Cleanup for Ctrl-C + */ +dtrace:::END +{ + trunc(@out); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/udp/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/udp/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/udp/udpbytes.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/udp/udpbytes.d new file mode 100755 index 00000000..29d85fcd --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/udp/udpbytes.d @@ -0,0 +1,36 @@ +#!/usr/sbin/dtrace -s +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + */ + +udp:::receive +{ + @bytes[args[2]->ip_saddr, args[4]->udp_dport] = + sum(args[4]->udp_length); +} + +udp:::send +{ + @bytes[args[2]->ip_daddr, args[4]->udp_sport] = + sum(args[4]->udp_length); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/udp/udpbytesstat.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/udp/udpbytesstat.d new file mode 100755 index 00000000..58fa826a --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/udp/udpbytesstat.d @@ -0,0 +1,45 @@ +#!/usr/sbin/dtrace -s +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + */ + +#pragma D option quiet + +udp:::receive +{ + @bytes[args[2]->ip_saddr, args[4]->udp_dport] = + sum(args[4]->udp_length); +} + +udp:::send +{ + @bytes[args[2]->ip_daddr, args[4]->udp_sport] = + sum(args[4]->udp_length); +} + +profile:::tick-1sec +{ + printf("\n %-32s %16s\n", "HOST", "BYTES/s"); + printa(" %-32s %@16d\n", @bytes); + trunc(@bytes); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/udp/udpio.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/udp/udpio.d new file mode 100755 index 00000000..78b3f482 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/udp/udpio.d @@ -0,0 +1,32 @@ +#!/usr/sbin/dtrace -s +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + */ + +udp:::send, +udp:::receive +{ + printf("%15s:%-5d -> %15s:%-5d", + args[2]->ip_saddr, args[4]->udp_sport, + args[2]->ip_daddr, args[4]->udp_dport); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/udp/udpsnoop.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/udp/udpsnoop.d new file mode 100755 index 00000000..fffc2904 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/udp/udpsnoop.d @@ -0,0 +1,59 @@ +#!/usr/sbin/dtrace -s +/* + * udpsnoop - snoop UDP network packets by process. + * Written using DTrace udp Provider. + * + * This analyses UDP network packets and prints the responsible PID plus + * standard details such as IP address and port. This captures traffic + * from existing and newly created UDP connections. It can help identify + * which processes are causing UDP traffic. + * + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * + * Portions Copyright 2010 Brendan Gregg + */ + +#pragma D option quiet +#pragma D option switchrate=10hz + +dtrace:::BEGIN +{ + printf("%6s %6s %15s:%-5s %15s:%-5s %6s\n", + "TIME", "PID", "LADDR", "PORT", "RADDR", "PORT", "BYTES"); +} + +udp:::send +{ + printf("%6d %6d %15s:%-5d -> %15s:%-5d %6d\n", + timestamp/1000, args[1]->cs_pid, args[2]->ip_saddr, + args[4]->udp_sport, args[2]->ip_daddr, args[4]->udp_dport, + args[4]->udp_length); +} + +udp:::receive +{ + printf("%6d %6d %15s:%-5d <- %15s:%-5d %6d\n", + timestamp/1000, args[1]->cs_pid, args[2]->ip_daddr, + args[4]->udp_dport, args[2]->ip_saddr, args[4]->udp_sport, + args[4]->udp_length); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/udp/udptop.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/udp/udptop.d new file mode 100755 index 00000000..a626e571 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/udp/udptop.d @@ -0,0 +1,133 @@ +#!/usr/sbin/dtrace -s +/* + * udptop: display top UDP network packets by process. + * Written using DTrace udp Provider. + * + * Usage: dtrace -s udptop.d [count] [interval] + * + * This analyses UDP network packets and prints the responsible PID plus + * standard details such as IP address and port. This captures traffic + * of newly created UDP connections that were established while this program + * was running along with traffic from existing connections. It can help + * identify which processes is causing UDP traffic. + * + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + * + */ +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * + * Portions Copyright 2010 Brendan Gregg + */ + +#pragma D option quiet +#pragma D option defaultargs +#pragma D option switchrate=10hz + +/* + * Print header + */ +dtrace:::BEGIN +{ + /* starting values */ + counts = $1 ? $1 : 10; + secs = $2 ? $2 : 5; + UDP_out = 0; + UDP_in = 0; + + printf("Sampling... Please wait.\n"); +} + + +udp:::send +/ args[1]->cs_pid != -1 / +{ + @out[args[1]->cs_zoneid, args[1]->cs_pid, args[2]->ip_saddr, + args[4]->udp_sport, args[2]->ip_daddr, args[4]->udp_dport] = + sum(args[4]->udp_length); +} + +udp:::receive +/ args[1]->cs_pid != -1 / +{ + @out[args[1]->cs_zoneid, args[1]->cs_pid, args[2]->ip_daddr, + args[4]->udp_dport, args[2]->ip_saddr, args[4]->udp_sport] = + sum(args[4]->udp_length); +} + +/* + * UDP Systemwide Stats + */ +mib:::udpHCOutDatagrams { UDP_out += args[0]; } +mib:::udpHCInDatagrams { UDP_in += args[0]; } + +profile:::tick-1sec +/secs != 0/ +{ + secs--; +} + +/* + * Print Report + */ +profile:::tick-1sec +/secs == 0/ +{ + /* fetch 1 min load average */ + this->load1a = `hp_avenrun[0] / 65536; + this->load1b = ((`hp_avenrun[0] % 65536) * 100) / 65536; + + /* print status */ + printf(%Y, load: %d.%02d, UDP datagrams in: %6d, ", + walltimestamp, this->load1a, this->load1b, UDP_in); + printf("UDP datagrams out: %6d\n\n", UDP_out); + + /* print headers */ + printf("%6s %6s %-15s %5s %-15s %5s %9s\n", + "ZONE", "PID", "LADDR", "LPORT", "RADDR", "RPORT", "SIZE"); + + /* print data */ + printa("%6d %6d %-15s %5d %-15s %5d %@9d\n", @out); + printf("\n"); + + /* clear data */ + trunc(@out); + UDP_in = 0; + UDP_out = 0; + secs = 5; + counts--; +} + +/* + * End of program + */ +profile:::tick-1sec +/counts == 0/ +{ + exit(0); +} + +/* + * Cleanup for Ctrl-C + */ +dtrace:::END +{ + trunc(@out); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/user/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/user/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/user/badopen.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/user/badopen.d new file mode 100644 index 00000000..7e6d22b7 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/user/badopen.d @@ -0,0 +1,38 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +syscall::open:entry +/pid == $1/ +{ + self->path = copyinstr(arg0); +} + +syscall::open:return +/self->path != NULL && arg1 == -1/ +{ + printf("open for '%s' failed", self->path); + ustack(); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/user/errorpath.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/user/errorpath.d new file mode 100644 index 00000000..95c82e51 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/user/errorpath.d @@ -0,0 +1,52 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +pid$1::$2:entry +{ + self->spec = speculation(); + speculate(self->spec); + printf("%x %x %x %x %x", arg0, arg1, arg2, arg3, arg4); +} + +pid$1::$2: +/self->spec/ +{ + speculate(self->spec); +} + +pid$1::$2:return +/self->spec && arg1 == 0/ +{ + discard(self->spec); + self->spec = 0; +} + +pid$1::$2:return +/self->spec && arg1 != 0/ +{ + commit(self->spec); + self->spec = 0; +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/user/libc.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/user/libc.d new file mode 100644 index 00000000..92b20cfe --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/user/libc.d @@ -0,0 +1,30 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +pid$target:libc.so::entry +{ + @[probefunc] = count(); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/user/userfunc.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/user/userfunc.d new file mode 100644 index 00000000..0c98d675 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/user/userfunc.d @@ -0,0 +1,42 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +pid$1::$2:entry +{ + self->trace = 1; +} + +pid$1::$2:return +/self->trace/ +{ + self->trace = 0; +} + +pid$1:::entry, +pid$1:::return +/self->trace/ +{ +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/vars/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/vars/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/vars/clause.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/vars/clause.d new file mode 100644 index 00000000..056329fe --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/vars/clause.d @@ -0,0 +1,55 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +int me; /* an integer global variable */ +this int foo; /* an integer clause-local variable */ + +tick-1sec +{ + /* + * Set foo to be 10 if and only if this is the first clause executed. + */ + this->foo = (me % 3 == 0) ? 10 : this->foo; + printf("Clause 1 is number %d; foo is %d\n", me++ % 3, this->foo++); +} + +tick-1sec +{ + /* + * Set foo to be 20 if and only if this is the first clause executed. + */ + this->foo = (me % 3 == 0) ? 20 : this->foo; + printf("Clause 2 is number %d; foo is %d\n", me++ % 3, this->foo++); +} + +tick-1sec +{ + /* + * Set foo to be 30 if and only if this is the first clause executed. + */ + this->foo = (me % 3 == 0) ? 30 : this->foo; + printf("Clause 3 is number %d; foo is %d\n", me++ % 3, this->foo++); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/vars/rtime.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/vars/rtime.d new file mode 100644 index 00000000..e2db52f3 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/vars/rtime.d @@ -0,0 +1,43 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +syscall::read:entry +{ + self->t = timestamp; +} + +syscall::read:return +/self->t != 0/ +{ + printf("%d/%d spent %d nsecs in read(2)\n", + pid, tid, timestamp - self->t); + + /* + * We're done with this thread-local variable; assign zero to it to + * allow the DTrace runtime to reclaim the underlying storage. + */ + self->t = 0; +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/vminfo/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/vminfo/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/vminfo/soffice.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/vminfo/soffice.d new file mode 100644 index 00000000..fa6435cf --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/demo/vminfo/soffice.d @@ -0,0 +1,52 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +vminfo:::maj_fault, +vminfo:::zfod, +vminfo:::as_fault +/execname == "soffice.bin" && start == 0/ +{ + /* + * This is the first time that a vminfo probe has been hit; record + * our initial timestamp. + */ + start = timestamp; +} + +vminfo:::maj_fault, +vminfo:::zfod, +vminfo:::as_fault +/execname == "soffice.bin"/ +{ + /* + * Aggregate on the probename, and lquantize() the number of seconds + * since our initial timestamp. (There are 1,000,000,000 nanoseconds + * in a second.) We assume that the script will be terminated before + * 60 seconds elapses. + */ + @[probename] = + lquantize((timestamp - start) / 1000000000, 0, 60); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/dtrace.c b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/dtrace.c new file mode 100644 index 00000000..624ca872 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/dtrace.c @@ -0,0 +1,2085 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#ifndef VBOX +#pragma ident "%Z%%M% %I% %E% SMI" +#endif + +#include +#include +#ifndef _MSC_VER +# include +#endif + +#include +#include +#include +#include +#ifndef VBOX +# include +#endif +#ifndef _MSC_VER +# include +#else +# include +# include +#endif +#include +#include +#include +#include +#ifndef VBOX +#include +#include +#include +#endif + +#ifdef VBOX +# include + +# include +# include +# include +# include +# include +# include +# include +# include + +# include "VBoxDTraceLibCWrappers.h" + +# ifdef _MSC_VER +# pragma warning(disable:4267) /* size_t conversion warnings */ +# pragma warning(disable:4018) /* signed/unsigned mismatch */ +# endif +#endif + +typedef struct dtrace_cmd { + void (*dc_func)(struct dtrace_cmd *); /* function to compile arg */ + dtrace_probespec_t dc_spec; /* probe specifier context */ + char *dc_arg; /* argument from main argv */ + const char *dc_name; /* name for error messages */ + const char *dc_desc; /* desc for error messages */ + dtrace_prog_t *dc_prog; /* program compiled from arg */ + char dc_ofile[PATH_MAX]; /* derived output file name */ +} dtrace_cmd_t; + +#define DMODE_VERS 0 /* display version information and exit (-V) */ +#define DMODE_EXEC 1 /* compile program for enabling (-a/e/E) */ +#define DMODE_ANON 2 /* compile program for anonymous tracing (-A) */ +#define DMODE_LINK 3 /* compile program for linking with ELF (-G) */ +#define DMODE_LIST 4 /* compile program and list probes (-l) */ +#define DMODE_HEADER 5 /* compile program for headergen (-h) */ + +#define E_SUCCESS 0 +#define E_ERROR 1 +#define E_USAGE 2 + +#ifndef VBOX +static const char DTRACE_OPTSTR[] = + "3:6:aAb:Bc:CD:ef:FGhHi:I:lL:m:n:o:p:P:qs:SU:vVwx:X:Z"; +#else +static const RTGETOPTDEF g_aOptions[] = +{ + { "-32", 10064, RTGETOPT_REQ_NOTHING }, + { "-64", 10032, RTGETOPT_REQ_NOTHING }, + { NULL, 'a', RTGETOPT_REQ_NOTHING }, + { NULL, 'A', RTGETOPT_REQ_NOTHING }, + { NULL, 'b', RTGETOPT_REQ_STRING }, + { NULL, 'B', RTGETOPT_REQ_NOTHING }, + { NULL, 'c', RTGETOPT_REQ_STRING }, + { NULL, 'C', RTGETOPT_REQ_NOTHING }, + { NULL, 'D', RTGETOPT_REQ_STRING }, + { NULL, 'e', RTGETOPT_REQ_NOTHING }, + { NULL, 'f', RTGETOPT_REQ_STRING }, + { NULL, 'F', RTGETOPT_REQ_NOTHING }, + { NULL, 'G', RTGETOPT_REQ_NOTHING }, + { NULL, 'h', RTGETOPT_REQ_NOTHING }, + { NULL, 'H', RTGETOPT_REQ_NOTHING }, + { NULL, 'i', RTGETOPT_REQ_STRING }, + { NULL, 'I', RTGETOPT_REQ_STRING }, + { NULL, 'l', RTGETOPT_REQ_NOTHING }, + { NULL, 'L', RTGETOPT_REQ_STRING }, + { NULL, 'M', RTGETOPT_REQ_STRING }, + { NULL, 'n', RTGETOPT_REQ_STRING }, + { NULL, 'o', RTGETOPT_REQ_STRING }, + { NULL, 'p', RTGETOPT_REQ_STRING }, + { NULL, 'P', RTGETOPT_REQ_STRING }, + { NULL, 'q', RTGETOPT_REQ_NOTHING }, + { NULL, 's', RTGETOPT_REQ_STRING }, + { NULL, 'S', RTGETOPT_REQ_NOTHING }, + { NULL, 'U', RTGETOPT_REQ_STRING }, + { NULL, 'v', RTGETOPT_REQ_NOTHING }, + { NULL, 'V', RTGETOPT_REQ_NOTHING }, + { NULL, 'w', RTGETOPT_REQ_NOTHING }, + { NULL, 'x', RTGETOPT_REQ_STRING }, + { NULL, 'X', RTGETOPT_REQ_STRING }, + { NULL, 'Z', RTGETOPT_REQ_NOTHING }, +}; +#endif /* VBOX */ + + +static char **g_argv; +static int g_argc; +#ifndef VBOX /* No linking. */ +static char **g_objv; +static int g_objc; +#endif +static dtrace_cmd_t *g_cmdv; +static int g_cmdc; +static struct ps_prochandle **g_psv; +static int g_psc; +static int g_pslive; +static char *g_pname; +static int g_quiet; +static int g_flowindent; +#ifdef VBOX /* Added volatile to signal handler variables. */ +static int volatile g_intr; +static int volatile g_impatient; +static int volatile g_newline; +#else +static int g_intr; +static int g_impatient; +static int g_newline; +#endif +static int g_total; +static int g_cflags; +static int g_oflags; +static int g_verbose; +static int g_exec = 1; +static int g_mode = DMODE_EXEC; +static int g_status = E_SUCCESS; +static int g_grabanon = 0; +static const char *g_ofile = NULL; +#ifndef VBOX /* stdout isn't a necessarily constant usable like this in C code. */ +static FILE *g_ofp = stdout; +#else +static FILE *g_ofp = NULL; +#endif +static dtrace_hdl_t *g_dtp; +static char *g_etcfile = "/etc/system"; +static const char *g_etcbegin = "* vvvv Added by DTrace"; +static const char *g_etcend = "* ^^^^ Added by DTrace"; + +static const char *g_etc[] = { +"*", +"* The following forceload directives were added by dtrace(1M) to allow for", +"* tracing during boot. If these directives are removed, the system will", +"* continue to function, but tracing will not occur during boot as desired.", +"* To remove these directives (and this block comment) automatically, run", +"* \"dtrace -A\" without additional arguments. See the \"Anonymous Tracing\"", +"* chapter of the Solaris Dynamic Tracing Guide for details.", +"*", +NULL }; + +static int +usage(FILE *fp) +{ + static const char predact[] = "[[ predicate ] action ]"; + + (void) fprintf(fp, "Usage: %s [-32|-64] [-aACeFGhHlqSvVwZ] " + "[-b bufsz] [-c cmd] [-D name[=def]]\n\t[-I path] [-L path] " + "[-o output] [-p pid] [-s script] [-U name]\n\t" + "[-x opt[=val]] [-X a|c|s|t]\n\n" + "\t[-P provider %s]\n" + "\t[-m [ provider: ] module %s]\n" + "\t[-f [[ provider: ] module: ] func %s]\n" + "\t[-n [[[ provider: ] module: ] func: ] name %s]\n" + "\t[-i probe-id %s] [ args ... ]\n\n", g_pname, + predact, predact, predact, predact, predact); + + (void) fputs( + "\tpredicate -> '/' D-expression '/'\n" + "\t action -> '{' D-statements '}'\n", fp); + + (void) fputs( + "\n" + "\t-32 generate 32-bit D programs and ELF files\n" + "\t-64 generate 64-bit D programs and ELF files\n\n" + "\t-a claim anonymous tracing state\n" + "\t-A generate driver.conf(4) directives for anonymous tracing\n" + "\t-b set trace buffer size\n" + "\t-c run specified command and exit upon its completion\n", fp); + (void) fputs( + "\t-C run cpp(1) preprocessor on script files\n" + "\t-D define symbol when invoking preprocessor\n" + "\t-e exit after compiling request but prior to enabling probes\n" + "\t-f enable or list probes matching the specified function name\n" + "\t-F coalesce trace output by function\n", fp); + (void) fputs( + "\t-G generate an ELF file containing embedded dtrace program\n" + "\t-h generate a header file with definitions for static probes\n" + "\t-H print included files when invoking preprocessor\n" + "\t-i enable or list probes matching the specified probe id\n" + "\t-I add include directory to preprocessor search path\n" + "\t-l list probes matching specified criteria\n", fp); + (void) fputs( + "\t-L add library directory to library search path\n" + "\t-m enable or list probes matching the specified module name\n" + "\t-n enable or list probes matching the specified probe name\n" + "\t-o set output file\n" + "\t-p grab specified process-ID and cache its symbol tables\n" + "\t-P enable or list probes matching the specified provider name\n", fp); + (void) fputs( + "\t-q set quiet mode (only output explicitly traced data)\n" + "\t-s enable or list probes according to the specified D script\n" + "\t-S print D compiler intermediate code\n" + "\t-U undefine symbol when invoking preprocessor\n" + "\t-v set verbose mode (report stability attributes, arguments)\n", fp); + (void) fputs( + "\t-V report DTrace API version\n" + "\t-w permit destructive actions\n" + "\t-x enable or modify compiler and tracing options\n" + "\t-X specify ISO C conformance settings for preprocessor\n" + "\t-Z permit probe descriptions that match zero probes\n", fp); + + return (E_USAGE); +} + +static void +verror(const char *fmt, va_list ap) +{ + int error = errno; + + (void) fprintf(stderr, "%s: ", g_pname); + (void) vfprintf(stderr, fmt, ap); + + if (fmt[strlen(fmt) - 1] != '\n') + (void) fprintf(stderr, ": %s\n", strerror(error)); +} + +/*PRINTFLIKE1*/ +static void +fatal(const char *fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + verror(fmt, ap); + va_end(ap); + + exit(E_ERROR); +} + +/*PRINTFLIKE1*/ +static void +dfatal(const char *fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + + (void) fprintf(stderr, "%s: ", g_pname); + if (fmt != NULL) + (void) vfprintf(stderr, fmt, ap); + + va_end(ap); + + if (fmt != NULL && fmt[strlen(fmt) - 1] != '\n') { + (void) fprintf(stderr, ": %s\n", + dtrace_errmsg(g_dtp, dtrace_errno(g_dtp))); + } else if (fmt == NULL) { + (void) fprintf(stderr, "%s\n", + dtrace_errmsg(g_dtp, dtrace_errno(g_dtp))); + } + + /* + * Close the DTrace handle to ensure that any controlled processes are + * correctly restored and continued. + */ + dtrace_close(g_dtp); + + exit(E_ERROR); +} + +/*PRINTFLIKE1*/ +static void +error(const char *fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + verror(fmt, ap); + va_end(ap); +} + +/*PRINTFLIKE1*/ +static void +notice(const char *fmt, ...) +{ + va_list ap; + + if (g_quiet) + return; /* -q or quiet pragma suppresses notice()s */ + + va_start(ap, fmt); + verror(fmt, ap); + va_end(ap); +} + +/*PRINTFLIKE1*/ +static void +oprintf(const char *fmt, ...) +{ + va_list ap; + int n; + + if (g_ofp == NULL) + return; + + va_start(ap, fmt); + n = vfprintf(g_ofp, fmt, ap); + va_end(ap); + + if (n < 0) { + if (errno != EINTR) { + fatal("failed to write to %s", + g_ofile ? g_ofile : ""); + } + clearerr(g_ofp); + } +} + +#ifndef VBOX +static char ** +make_argv(char *s) +{ + const char *ws = "\f\n\r\t\v "; + char **argv = malloc(sizeof (char *) * (strlen(s) / 2 + 1)); + int argc = 0; + char *p = s; + + if (argv == NULL) + return (NULL); + + for (p = strtok(s, ws); p != NULL; p = strtok(NULL, ws)) + argv[argc++] = p; + + if (argc == 0) + argv[argc++] = s; + + argv[argc] = NULL; + return (argv); +} +#endif /* !VBOX */ + +static void +dof_prune(const char *fname) +{ + struct stat sbuf; + size_t sz, i, j, mark, len; + char *buf; + int msg = 0, fd; + + if ((fd = open(fname, O_RDONLY)) == -1) { + /* + * This is okay only if the file doesn't exist at all. + */ + if (errno != ENOENT) + fatal("failed to open %s", fname); + return; + } + + if (fstat(fd, &sbuf) == -1) + fatal("failed to fstat %s", fname); + + if ((buf = malloc((sz = sbuf.st_size) + 1)) == NULL) + fatal("failed to allocate memory for %s", fname); + + if ((size_t/*vbox*/)read(fd, buf, sz) != sz) + fatal("failed to read %s", fname); + + buf[sz] = '\0'; + (void) close(fd); + + if ((fd = open(fname, O_WRONLY | O_TRUNC)) == -1) + fatal("failed to open %s for writing", fname); + + len = strlen("dof-data-"); + + for (mark = 0, i = 0; i < sz; i++) { + if (strncmp(&buf[i], "dof-data-", len) != 0) + continue; + + /* + * This is only a match if it's in the 0th column. + */ + if (i != 0 && buf[i - 1] != '\n') + continue; + + if (msg++ == 0) { + error("cleaned up old anonymous " + "enabling in %s\n", fname); + } + + /* + * We have a match. First write out our data up until now. + */ + if (i != mark) { + if ((size_t/*vbox*/)write(fd, &buf[mark], i - mark) != i - mark) + fatal("failed to write to %s", fname); + } + + /* + * Now scan forward until we scan past a newline. + */ + for (j = i; j < sz && buf[j] != '\n'; j++) + continue; + + /* + * Reset our mark. + */ + if ((mark = j + 1) >= sz) + break; + + i = j; + } + + if (mark < sz) { + if ((size_t/*vbox*/)write(fd, &buf[mark], sz - mark) != sz - mark) + fatal("failed to write to %s", fname); + } + + (void) close(fd); + free(buf); +} + +static void +etcsystem_prune(void) +{ + struct stat sbuf; + size_t sz; + char *buf, *start, *end; + int fd; + char *fname = g_etcfile, *tmpname; + + if ((fd = open(fname, O_RDONLY)) == -1) + fatal("failed to open %s", fname); + + if (fstat(fd, &sbuf) == -1) + fatal("failed to fstat %s", fname); + + if ((buf = malloc((sz = sbuf.st_size) + 1)) == NULL) + fatal("failed to allocate memory for %s", fname); + + if ((size_t/*vbox*/)read(fd, buf, sz) != sz) + fatal("failed to read %s", fname); + + buf[sz] = '\0'; + (void) close(fd); + + if ((start = strstr(buf, g_etcbegin)) == NULL) + goto out; + + if (strlen(buf) != sz) { + fatal("embedded nul byte in %s; manual repair of %s " + "required\n", fname, fname); + } + + if (strstr(start + 1, g_etcbegin) != NULL) { + fatal("multiple start sentinels in %s; manual repair of %s " + "required\n", fname, fname); + } + + if ((end = strstr(buf, g_etcend)) == NULL) { + fatal("missing end sentinel in %s; manual repair of %s " + "required\n", fname, fname); + } + + if (start > end) { + fatal("end sentinel preceeds start sentinel in %s; manual " + "repair of %s required\n", fname, fname); + } + + end += strlen(g_etcend) + 1; + bcopy(end, start, strlen(end) + 1); + + tmpname = alloca(sz = strlen(fname) + 80); + (void) snprintf(tmpname, sz, "%s.dtrace.%d", fname, getpid()); + + if ((fd = open(tmpname, + O_WRONLY | O_CREAT | O_EXCL, sbuf.st_mode)) == -1) + fatal("failed to create %s", tmpname); + + if (write(fd, buf, strlen(buf)) < (ssize_t/*vbox*/)strlen(buf)) { + (void) unlink(tmpname); + fatal("failed to write to %s", tmpname); + } + + (void) close(fd); + +#ifndef _MSC_VER + if (chown(tmpname, sbuf.st_uid, sbuf.st_gid) != 0) { + (void) unlink(tmpname); + fatal("failed to chown(2) %s to uid %d, gid %d", tmpname, + (int)sbuf.st_uid, (int)sbuf.st_gid); + } +#endif + + if (rename(tmpname, fname) == -1) + fatal("rename of %s to %s failed", tmpname, fname); + + error("cleaned up forceload directives in %s\n", fname); +out: + free(buf); +} + +static void +etcsystem_add(void) +{ + const char *mods[20]; + int nmods, line; + + if ((g_ofp = fopen(g_ofile = g_etcfile, "a")) == NULL) + fatal("failed to open output file '%s'", g_ofile); + + oprintf("%s\n", g_etcbegin); + + for (line = 0; g_etc[line] != NULL; line++) + oprintf("%s\n", g_etc[line]); + + nmods = dtrace_provider_modules(g_dtp, mods, + sizeof (mods) / sizeof (char *) - 1); + + if (nmods >= sizeof (mods) / sizeof (char *)) + fatal("unexpectedly large number of modules!"); + + mods[nmods++] = "dtrace"; + + for (line = 0; line < nmods; line++) + oprintf("forceload: drv/%s\n", mods[line]); + + oprintf("%s\n", g_etcend); + + if (fclose(g_ofp) == EOF) + fatal("failed to close output file '%s'", g_ofile); + + error("added forceload directives to %s\n", g_ofile); +} + +static void +print_probe_info(const dtrace_probeinfo_t *p) +{ + char buf[BUFSIZ]; + int i; + + oprintf("\n\tProbe Description Attributes\n"); + + oprintf("\t\tIdentifier Names: %s\n", + dtrace_stability_name(p->dtp_attr.dtat_name)); + oprintf("\t\tData Semantics: %s\n", + dtrace_stability_name(p->dtp_attr.dtat_data)); + oprintf("\t\tDependency Class: %s\n", + dtrace_class_name(p->dtp_attr.dtat_class)); + + oprintf("\n\tArgument Attributes\n"); + + oprintf("\t\tIdentifier Names: %s\n", + dtrace_stability_name(p->dtp_arga.dtat_name)); + oprintf("\t\tData Semantics: %s\n", + dtrace_stability_name(p->dtp_arga.dtat_data)); + oprintf("\t\tDependency Class: %s\n", + dtrace_class_name(p->dtp_arga.dtat_class)); + + oprintf("\n\tArgument Types\n"); + + for (i = 0; i < p->dtp_argc; i++) { + if (ctf_type_name(p->dtp_argv[i].dtt_ctfp, + p->dtp_argv[i].dtt_type, buf, sizeof (buf)) == NULL) + (void) strlcpy(buf, "(unknown)", sizeof (buf)); + oprintf("\t\targs[%d]: %s\n", i, buf); + } + + if (p->dtp_argc == 0) + oprintf("\t\tNone\n"); + + oprintf("\n"); +} + +/*ARGSUSED*/ +static int +info_stmt(dtrace_hdl_t *dtp, dtrace_prog_t *pgp, + dtrace_stmtdesc_t *stp, dtrace_ecbdesc_t **last) +{ + dtrace_ecbdesc_t *edp = stp->dtsd_ecbdesc; + dtrace_probedesc_t *pdp = &edp->dted_probe; + dtrace_probeinfo_t p; + RT_NOREF1(pgp); + + if (edp == *last) + return (0); + + oprintf("\n%s:%s:%s:%s\n", + pdp->dtpd_provider, pdp->dtpd_mod, pdp->dtpd_func, pdp->dtpd_name); + + if (dtrace_probe_info(dtp, pdp, &p) == 0) + print_probe_info(&p); + + *last = edp; + return (0); +} + +/* + * Execute the specified program by enabling the corresponding instrumentation. + * If -e has been specified, we get the program info but do not enable it. If + * -v has been specified, we print a stability report for the program. + */ +static void +exec_prog(const dtrace_cmd_t *dcp) +{ + dtrace_ecbdesc_t *last = NULL; + dtrace_proginfo_t dpi; + + if (!g_exec) { + dtrace_program_info(g_dtp, dcp->dc_prog, &dpi); + } else if (dtrace_program_exec(g_dtp, dcp->dc_prog, &dpi) == -1) { + dfatal("failed to enable '%s'", dcp->dc_name); + } else { + notice("%s '%s' matched %u probe%s\n", + dcp->dc_desc, dcp->dc_name, + dpi.dpi_matches, dpi.dpi_matches == 1 ? "" : "s"); + } + + if (g_verbose) { + oprintf("\nStability attributes for %s %s:\n", + dcp->dc_desc, dcp->dc_name); + + oprintf("\n\tMinimum Probe Description Attributes\n"); + oprintf("\t\tIdentifier Names: %s\n", + dtrace_stability_name(dpi.dpi_descattr.dtat_name)); + oprintf("\t\tData Semantics: %s\n", + dtrace_stability_name(dpi.dpi_descattr.dtat_data)); + oprintf("\t\tDependency Class: %s\n", + dtrace_class_name(dpi.dpi_descattr.dtat_class)); + + oprintf("\n\tMinimum Statement Attributes\n"); + + oprintf("\t\tIdentifier Names: %s\n", + dtrace_stability_name(dpi.dpi_stmtattr.dtat_name)); + oprintf("\t\tData Semantics: %s\n", + dtrace_stability_name(dpi.dpi_stmtattr.dtat_data)); + oprintf("\t\tDependency Class: %s\n", + dtrace_class_name(dpi.dpi_stmtattr.dtat_class)); + + if (!g_exec) { + (void) dtrace_stmt_iter(g_dtp, dcp->dc_prog, + (dtrace_stmt_f *)info_stmt, &last); + } else + oprintf("\n"); + } + + g_total += dpi.dpi_matches; +} + +/* + * Print out the specified DOF buffer as a set of ASCII bytes appropriate for + * storing in a driver.conf(4) file associated with the dtrace driver. + */ +static void +anon_prog(const dtrace_cmd_t *dcp, dof_hdr_t *dof, int n) +{ + const uchar_t *p, *q; + + if (dof == NULL) + dfatal("failed to create DOF image for '%s'", dcp->dc_name); + + p = (uchar_t *)dof; + q = p + dof->dofh_loadsz; + + oprintf("dof-data-%d=0x%x", n, *p++); + + while (p < q) + oprintf(",0x%x", *p++); + + oprintf(";\n"); + dtrace_dof_destroy(g_dtp, dof); +} + +#ifndef VBOX +/* + * Link the specified D program in DOF form into an ELF file for use in either + * helpers, userland provider definitions, or both. If -o was specified, that + * path is used as the output file name. If -o wasn't specified and the input + * program is from a script whose name is %.d, use basename(%.o) as the output + * file name. Otherwise we use "d.out" as the default output file name. + */ +static void +link_prog(dtrace_cmd_t *dcp) +{ + char *p; + + if (g_cmdc == 1 && g_ofile != NULL) { + (void) strlcpy(dcp->dc_ofile, g_ofile, sizeof (dcp->dc_ofile)); + } else if ((p = strrchr(dcp->dc_arg, '.')) != NULL && + strcmp(p, ".d") == 0) { + p[0] = '\0'; /* strip .d suffix */ + (void) snprintf(dcp->dc_ofile, sizeof (dcp->dc_ofile), + "%s.o", basename(dcp->dc_arg)); + } else { + (void) snprintf(dcp->dc_ofile, sizeof (dcp->dc_ofile), + g_cmdc > 1 ? "%s.%d" : "%s", "d.out", (int)(dcp - g_cmdv)); + } + + if (dtrace_program_link(g_dtp, dcp->dc_prog, DTRACE_D_PROBES, + dcp->dc_ofile, g_objc, g_objv) != 0) + dfatal("failed to link %s %s", dcp->dc_desc, dcp->dc_name); +} +#endif /* !VBOX */ + +/*ARGSUSED*/ +static int +list_probe(dtrace_hdl_t *dtp, const dtrace_probedesc_t *pdp, void *arg) +{ + dtrace_probeinfo_t p; + RT_NOREF1(arg); + + oprintf("%5d %10s %17s %33s %s\n", pdp->dtpd_id, + pdp->dtpd_provider, pdp->dtpd_mod, pdp->dtpd_func, pdp->dtpd_name); + + if (g_verbose && dtrace_probe_info(dtp, pdp, &p) == 0) + print_probe_info(&p); + + return (0); +} + +/*ARGSUSED*/ +static int +list_stmt(dtrace_hdl_t *dtp, dtrace_prog_t *pgp, + dtrace_stmtdesc_t *stp, dtrace_ecbdesc_t **last) +{ + dtrace_ecbdesc_t *edp = stp->dtsd_ecbdesc; + RT_NOREF1(pgp); + + if (edp == *last) + return (0); + + if (dtrace_probe_iter(g_dtp, &edp->dted_probe, list_probe, NULL) != 0) { + error("failed to match %s:%s:%s:%s: %s\n", + edp->dted_probe.dtpd_provider, edp->dted_probe.dtpd_mod, + edp->dted_probe.dtpd_func, edp->dted_probe.dtpd_name, + dtrace_errmsg(dtp, dtrace_errno(dtp))); + } + + *last = edp; + return (0); +} + +/* + * List the probes corresponding to the specified program by iterating over + * each statement and then matching probes to the statement probe descriptions. + */ +static void +list_prog(const dtrace_cmd_t *dcp) +{ + dtrace_ecbdesc_t *last = NULL; + + (void) dtrace_stmt_iter(g_dtp, dcp->dc_prog, + (dtrace_stmt_f *)list_stmt, &last); +} + +static void +compile_file(dtrace_cmd_t *dcp) +{ + char *arg0; + FILE *fp; + + if ((fp = fopen(dcp->dc_arg, "r")) == NULL) + fatal("failed to open %s", dcp->dc_arg); + + arg0 = g_argv[0]; + g_argv[0] = dcp->dc_arg; + + if ((dcp->dc_prog = dtrace_program_fcompile(g_dtp, fp, + g_cflags, g_argc, g_argv)) == NULL) + dfatal("failed to compile script %s", dcp->dc_arg); + + g_argv[0] = arg0; + (void) fclose(fp); + + dcp->dc_desc = "script"; + dcp->dc_name = dcp->dc_arg; +} + +static void +compile_str(dtrace_cmd_t *dcp) +{ + char *p; + + if ((dcp->dc_prog = dtrace_program_strcompile(g_dtp, dcp->dc_arg, + dcp->dc_spec, g_cflags | DTRACE_C_PSPEC, g_argc, g_argv)) == NULL) + dfatal("invalid probe specifier %s", dcp->dc_arg); + + if ((p = strpbrk(dcp->dc_arg, "{/;")) != NULL) + *p = '\0'; /* crop name for reporting */ + + dcp->dc_desc = "description"; + dcp->dc_name = dcp->dc_arg; +} + +/*ARGSUSED*/ +static void +prochandler(struct ps_prochandle *P, const char *msg, void *arg) +{ +#ifndef VBOX + const psinfo_t *prp = Ppsinfo(P); + int pid = Pstatus(P)->pr_pid; + char name[SIG2STR_MAX]; + + if (msg != NULL) { + notice("pid %d: %s\n", pid, msg); + return; + } + + switch (Pstate(P)) { + case PS_UNDEAD: + /* + * Ideally we would like to always report pr_wstat here, but it + * isn't possible given current /proc semantics. If we grabbed + * the process, Ppsinfo() will either fail or return a zeroed + * psinfo_t depending on how far the parent is in reaping it. + * When /proc provides a stable pr_wstat in the status file, + * this code can be improved by examining this new pr_wstat. + */ + if (prp != NULL && WIFSIGNALED(prp->pr_wstat)) { + notice("pid %d terminated by %s\n", pid, + proc_signame(WTERMSIG(prp->pr_wstat), + name, sizeof (name))); + } else if (prp != NULL && WEXITSTATUS(prp->pr_wstat) != 0) { + notice("pid %d exited with status %d\n", + pid, WEXITSTATUS(prp->pr_wstat)); + } else { + notice("pid %d has exited\n", pid); + } + g_pslive--; + break; + + case PS_LOST: + notice("pid %d exec'd a set-id or unobservable program\n", pid); + g_pslive--; + break; + } +#else + RT_NOREF3(P, msg, arg); +#endif /* VBOX */ +} + +/*ARGSUSED*/ +static int +errhandler(const dtrace_errdata_t *data, void *arg) +{ + RT_NOREF1(arg); + error(data->dteda_msg); + return (DTRACE_HANDLE_OK); +} + +/*ARGSUSED*/ +static int +drophandler(const dtrace_dropdata_t *data, void *arg) +{ + RT_NOREF1(arg); + error(data->dtdda_msg); + return (DTRACE_HANDLE_OK); +} + +/*ARGSUSED*/ +static int +setopthandler(const dtrace_setoptdata_t *data, void *arg) +{ + RT_NOREF1(arg); + if (strcmp(data->dtsda_option, "quiet") == 0) + g_quiet = data->dtsda_newval != DTRACEOPT_UNSET; + + if (strcmp(data->dtsda_option, "flowindent") == 0) + g_flowindent = data->dtsda_newval != DTRACEOPT_UNSET; + + return (DTRACE_HANDLE_OK); +} + +#define BUFDUMPHDR(hdr) \ + (void) printf("%s: %s%s\n", g_pname, hdr, strlen(hdr) > 0 ? ":" : ""); + +#ifdef VBOX /* The orignal upsets VC++ 14.1 with variable 'c' shadowing variable in the function. + * This version is faster and does not try to print '\0' as that doesn't look like it's intentional */ +#define BUFDUMPSTR(ptr, field) do { \ + const char *pszField = (ptr)->field; \ + if (pszField) { \ + const char *pszStart = pszField; \ + char ch; \ + printf("%s: %20s => \"", g_pname, #field); \ + while ((ch = *pszField) != '\0') { \ + if (ch != '\n') \ + pszField++; \ + else { \ + printf("%*.*s\\n", (int)(pszField - pszStart), \ + (int)(pszField - pszStart), pszStart); \ + pszStart = ++pszField; \ + } \ + } \ + printf("%*.*s\"", (int)(pszField - pszStart), \ + (int)(pszField - pszStart), pszStart); \ + } else { \ + printf("%s: %20s => \n", g_pname, #field); \ + } \ +} while (0) +#else +#define BUFDUMPSTR(ptr, field) \ + (void) printf("%s: %20s => ", g_pname, #field); \ + if ((ptr)->field != NULL) { \ + const char *c = (ptr)->field; \ + (void) printf("\""); \ + do { \ + if (*c == '\n') { \ + (void) printf("\\n"); \ + continue; \ + } \ + \ + (void) printf("%c", *c); \ + } while (*c++ != '\0'); \ + (void) printf("\"\n"); \ + } else { \ + (void) printf("\n"); \ + } +#endif + +#define BUFDUMPASSTR(ptr, field, str) \ + (void) printf("%s: %20s => %s\n", g_pname, #field, str); + +#define BUFDUMP(ptr, field) \ + (void) printf("%s: %20s => %lld\n", g_pname, #field, \ + (long long)(ptr)->field); + +#define BUFDUMPPTR(ptr, field) \ + (void) printf("%s: %20s => %s\n", g_pname, #field, \ + (ptr)->field != NULL ? "" : ""); + +/*ARGSUSED*/ +static int +bufhandler(const dtrace_bufdata_t *bufdata, void *arg) +{ + const dtrace_aggdata_t *agg = bufdata->dtbda_aggdata; + const dtrace_recdesc_t *rec = bufdata->dtbda_recdesc; + const dtrace_probedesc_t *pd; + uint32_t flags = bufdata->dtbda_flags; + char buf[512], *c = buf, *end = c + sizeof (buf); + int i, printed; + + struct { + const char *name; + uint32_t value; + } flagnames[] = { + { "AGGVAL", DTRACE_BUFDATA_AGGVAL }, + { "AGGKEY", DTRACE_BUFDATA_AGGKEY }, + { "AGGFORMAT", DTRACE_BUFDATA_AGGFORMAT }, + { "AGGLAST", DTRACE_BUFDATA_AGGLAST }, + { "???", UINT32_MAX }, + { NULL } + }; + RT_NOREF1(arg); + + if (bufdata->dtbda_probe != NULL) { + pd = bufdata->dtbda_probe->dtpda_pdesc; + } else if (agg != NULL) { + pd = agg->dtada_pdesc; + } else { + pd = NULL; + } + + BUFDUMPHDR(">>> Called buffer handler"); + BUFDUMPHDR(""); + + BUFDUMPHDR(" dtrace_bufdata"); + BUFDUMPSTR(bufdata, dtbda_buffered); + BUFDUMPPTR(bufdata, dtbda_probe); + BUFDUMPPTR(bufdata, dtbda_aggdata); + BUFDUMPPTR(bufdata, dtbda_recdesc); + + (void) snprintf(c, end - c, "0x%x ", bufdata->dtbda_flags); + c += strlen(c); + + for (i = 0, printed = 0; flagnames[i].name != NULL; i++) { + if (!(flags & flagnames[i].value)) + continue; + + (void) snprintf(c, end - c, + "%s%s", printed++ ? " | " : "(", flagnames[i].name); + c += strlen(c); + flags &= ~flagnames[i].value; + } + + if (printed) + (void) snprintf(c, end - c, ")"); + + BUFDUMPASSTR(bufdata, dtbda_flags, buf); + BUFDUMPHDR(""); + + if (pd != NULL) { + BUFDUMPHDR(" dtrace_probedesc"); + BUFDUMPSTR(pd, dtpd_provider); + BUFDUMPSTR(pd, dtpd_mod); + BUFDUMPSTR(pd, dtpd_func); + BUFDUMPSTR(pd, dtpd_name); + BUFDUMPHDR(""); + } + + if (rec != NULL) { + BUFDUMPHDR(" dtrace_recdesc"); + BUFDUMP(rec, dtrd_action); + BUFDUMP(rec, dtrd_size); + + if (agg != NULL) { + uint8_t *data; + int lim = rec->dtrd_size; + + (void) sprintf(buf, "%d (data: ", rec->dtrd_offset); + c = buf + strlen(buf); + + if (lim > sizeof (uint64_t)) + lim = sizeof (uint64_t); + + data = (uint8_t *)agg->dtada_data + rec->dtrd_offset; + + for (i = 0; i < lim; i++) { + (void) snprintf(c, end - c, "%s%02x", + i == 0 ? "" : " ", *data++); + c += strlen(c); + } + + (void) snprintf(c, end - c, + "%s)", lim < rec->dtrd_size ? " ..." : ""); + BUFDUMPASSTR(rec, dtrd_offset, buf); + } else { + BUFDUMP(rec, dtrd_offset); + } + + BUFDUMPHDR(""); + } + + if (agg != NULL) { + dtrace_aggdesc_t *desc = agg->dtada_desc; + + BUFDUMPHDR(" dtrace_aggdesc"); + BUFDUMPSTR(desc, dtagd_name); + BUFDUMP(desc, dtagd_varid); + BUFDUMP(desc, dtagd_id); + BUFDUMP(desc, dtagd_nrecs); + BUFDUMPHDR(""); + } + + return (DTRACE_HANDLE_OK); +} + +/*ARGSUSED*/ +static int +chewrec(const dtrace_probedata_t *data, const dtrace_recdesc_t *rec, void *arg) +{ + dtrace_actkind_t act; + uintptr_t addr; + RT_NOREF1(arg); + + if (rec == NULL) { + /* + * We have processed the final record; output the newline if + * we're not in quiet mode. + */ + if (!g_quiet) + oprintf("\n"); + + return (DTRACE_CONSUME_NEXT); + } + + act = rec->dtrd_action; + addr = (uintptr_t)data->dtpda_data; + + if (act == DTRACEACT_EXIT) { + g_status = *((uint32_t *)addr); + return (DTRACE_CONSUME_NEXT); + } + + return (DTRACE_CONSUME_THIS); +} + +/*ARGSUSED*/ +static int +chew(const dtrace_probedata_t *data, void *arg) +{ + dtrace_probedesc_t *pd = data->dtpda_pdesc; + processorid_t cpu = data->dtpda_cpu; + static int heading; + RT_NOREF1(arg); + + if (g_impatient) { + g_newline = 0; + return (DTRACE_CONSUME_ABORT); + } + + if (heading == 0) { + if (!g_flowindent) { + if (!g_quiet) { + oprintf("%3s %6s %32s\n", + "CPU", "ID", "FUNCTION:NAME"); + } + } else { + oprintf("%3s %-41s\n", "CPU", "FUNCTION"); + } + heading = 1; + } + + if (!g_flowindent) { + if (!g_quiet) { + char name[DTRACE_FUNCNAMELEN + DTRACE_NAMELEN + 2]; + + (void) snprintf(name, sizeof (name), "%s:%s", + pd->dtpd_func, pd->dtpd_name); + + oprintf("%3d %6d %32s ", cpu, pd->dtpd_id, name); + } + } else { + int indent = data->dtpda_indent; + char *name; + size_t len; + + if (data->dtpda_flow == DTRACEFLOW_NONE) { + len = indent + DTRACE_FUNCNAMELEN + DTRACE_NAMELEN + 5; + name = alloca(len); + (void) snprintf(name, len, "%*s%s%s:%s", indent, "", + data->dtpda_prefix, pd->dtpd_func, + pd->dtpd_name); + } else { + len = indent + DTRACE_FUNCNAMELEN + 5; + name = alloca(len); + (void) snprintf(name, len, "%*s%s%s", indent, "", + data->dtpda_prefix, pd->dtpd_func); + } + + oprintf("%3d %-41s ", cpu, name); + } + + return (DTRACE_CONSUME_THIS); +} + +static void +go(void) +{ + int i; + + struct { + char *name; + char *optname; + dtrace_optval_t val; + } bufs[] = { + { "buffer size", "bufsize" }, + { "aggregation size", "aggsize" }, + { "speculation size", "specsize" }, + { "dynamic variable size", "dynvarsize" }, + { NULL } + }, rates[] = { + { "cleaning rate", "cleanrate" }, + { "status rate", "statusrate" }, + { NULL } + }; + + for (i = 0; bufs[i].name != NULL; i++) { + if (dtrace_getopt(g_dtp, bufs[i].optname, &bufs[i].val) == -1) + fatal("couldn't get option %s", bufs[i].optname); + } + + for (i = 0; rates[i].name != NULL; i++) { + if (dtrace_getopt(g_dtp, rates[i].optname, &rates[i].val) == -1) + fatal("couldn't get option %s", rates[i].optname); + } + + if (dtrace_go(g_dtp) == -1) + dfatal("could not enable tracing"); + + for (i = 0; bufs[i].name != NULL; i++) { + dtrace_optval_t j = 0, mul = 10; + dtrace_optval_t nsize; + + if (bufs[i].val == DTRACEOPT_UNSET) + continue; + + (void) dtrace_getopt(g_dtp, bufs[i].optname, &nsize); + + if (nsize == DTRACEOPT_UNSET || nsize == 0) + continue; + + if (nsize >= bufs[i].val - sizeof (uint64_t)) + continue; + + for (; (INT64_C(1) << mul) <= nsize; j++, mul += 10) + continue; + + if (!(nsize & ((INT64_C(1) << (mul - 10)) - 1))) { + error("%s lowered to %lld%c\n", bufs[i].name, + (long long)nsize >> (mul - 10), " kmgtpe"[j]); + } else { + error("%s lowered to %lld bytes\n", bufs[i].name, + (long long)nsize); + } + } + + for (i = 0; rates[i].name != NULL; i++) { + dtrace_optval_t nval; + char *dir; + + if (rates[i].val == DTRACEOPT_UNSET) + continue; + + (void) dtrace_getopt(g_dtp, rates[i].optname, &nval); + + if (nval == DTRACEOPT_UNSET || nval == 0) + continue; + + if (rates[i].val == nval) + continue; + + dir = nval > rates[i].val ? "reduced" : "increased"; + + if (nval <= NANOSEC && (NANOSEC % nval) == 0) { + error("%s %s to %lld hz\n", rates[i].name, dir, + (long long)NANOSEC / (long long)nval); + continue; + } + + if ((nval % NANOSEC) == 0) { + error("%s %s to once every %lld seconds\n", + rates[i].name, dir, + (long long)nval / (long long)NANOSEC); + continue; + } + + error("%s %s to once every %lld nanoseconds\n", + rates[i].name, dir, (long long)nval); + } +} + +/*ARGSUSED*/ +static void +intr(int signo) +{ + if (!g_intr) + g_newline = 1; + + if (g_intr++) + g_impatient = 1; +#ifdef _MSC_VER + /* Reinstall signal handler. Seems MSVCRT is System V style. */ + signal(signo, intr); +#else + RT_NOREF(signo); +#endif +} + +#ifdef VBOX +DECLEXPORT(int) RTCALL VBoxDTraceMain(int argc, char **argv) +#else +int +main(int argc, char *argv[]) +#endif +{ + dtrace_bufdesc_t buf; +#ifndef _MSC_VER + struct sigaction act, oact; +#endif + dtrace_status_t status[2]; + dtrace_optval_t opt; + dtrace_cmd_t *dcp; + + int done = 0, mode = 0; + int err, i; +#ifndef VBOX + char c, *p, **v; + struct ps_prochandle *P; + pid_t pid; + + g_pname = basename(argv[0]); +#else + int c; + char *p; + RTGETOPTUNION ValueUnion; + RTGETOPTSTATE GetState; + + err = RTR3InitDll(0); + if (RT_FAILURE(err)) + return RTMsgInitFailure(err); + dtrace_init(); + + g_ofp = stdout; + g_pname = (char *)RTProcShortName(); +#endif + + if (argc == 1) + return (usage(stderr)); + + if ((g_argv = malloc(sizeof (char *) * argc)) == NULL || + (g_cmdv = malloc(sizeof (dtrace_cmd_t) * argc)) == NULL || + (g_psv = malloc(sizeof (struct ps_prochandle *) * argc)) == NULL) + fatal("failed to allocate memory for arguments"); + + g_argv[g_argc++] = argv[0]; /* propagate argv[0] to D as $0/$$0 */ + argv[0] = g_pname; /* rewrite argv[0] for getopt errors */ + + bzero(status, sizeof (status)); + bzero(&buf, sizeof (buf)); + + /* + * Make an initial pass through argv[] processing any arguments that + * affect our behavior mode (g_mode) and flags used for dtrace_open(). + * We also accumulate arguments that are not affiliated with getopt + * options into g_argv[], and abort if any invalid options are found. + */ +#ifndef VBOX + for (optind = 1; optind < argc; optind++) { + while ((c = getopt(argc, argv, DTRACE_OPTSTR)) != EOF) { +#else + RTGetOptInit(&GetState, argc, argv, g_aOptions, RT_ELEMENTS(g_aOptions), 1, 0); + while ((c = RTGetOpt(&GetState, &ValueUnion))) { + { + /* const char *optarg = ValueUnion.psz; - unused */ +#endif + switch (c) { +#ifndef VBOX + case '3': + if (strcmp(optarg, "2") != 0) { + (void) fprintf(stderr, + "%s: illegal option -- 3%s\n", + argv[0], optarg); + return (usage(stderr)); + } +#else + case 10032: +#endif + g_oflags &= ~DTRACE_O_LP64; + g_oflags |= DTRACE_O_ILP32; + break; + +#ifndef VBOX + case '6': + if (strcmp(optarg, "4") != 0) { + (void) fprintf(stderr, + "%s: illegal option -- 6%s\n", + argv[0], optarg); + return (usage(stderr)); + } +#else + case 10064: +#endif + g_oflags &= ~DTRACE_O_ILP32; + g_oflags |= DTRACE_O_LP64; + break; + + case 'a': + g_grabanon++; /* also checked in pass 2 below */ + break; + + case 'A': + g_mode = DMODE_ANON; + g_exec = 0; + mode++; + break; + + case 'e': + g_exec = 0; + done = 1; + break; + + case 'h': + g_mode = DMODE_HEADER; + g_oflags |= DTRACE_O_NODEV; + g_cflags |= DTRACE_C_ZDEFS; /* -h implies -Z */ + g_exec = 0; + mode++; + break; + +#ifndef VBOX + case 'G': + g_mode = DMODE_LINK; + g_oflags |= DTRACE_O_NODEV; + g_cflags |= DTRACE_C_ZDEFS; /* -G implies -Z */ + g_exec = 0; + mode++; + break; +#endif + + case 'l': + g_mode = DMODE_LIST; + g_cflags |= DTRACE_C_ZDEFS; /* -l implies -Z */ + mode++; + break; + + case 'V': + g_mode = DMODE_VERS; + mode++; + break; + +#ifndef VBOX + default: + if (strchr(DTRACE_OPTSTR, c) == NULL) + return (usage(stderr)); +#else + case 'c': + case 'p': + case 'G': + fprintf(stderr, "%s: -%c is not supported\n", g_pname, c); + return (E_USAGE); + + case VINF_GETOPT_NOT_OPTION: + g_argv[g_argc++] = (char *)ValueUnion.psz; + break; + + default: + if (c < 0) { /* Note: Not all options are handled. */ + RTGetOptPrintError(c, &ValueUnion); + return (usage(stderr)); + } +#endif + } + } + +#ifndef VBOX + if (optind < argc) + g_argv[g_argc++] = argv[optind]; +#endif + } + + if (mode > 1) { + (void) fprintf(stderr, "%s: only one of the [-AGhlV] options " + "can be specified at a time\n", g_pname); + return (E_USAGE); + } + + if (g_mode == DMODE_VERS) + return (printf("%s: %s\n", g_pname, _dtrace_version) <= 0); + +#ifndef VBOX + /* + * If we're in linker mode and the data model hasn't been specified, + * we try to guess the appropriate setting by examining the object + * files. We ignore certain errors since we'll catch them later when + * we actually process the object files. + */ + if (g_mode == DMODE_LINK && + (g_oflags & (DTRACE_O_ILP32 | DTRACE_O_LP64)) == 0 && + elf_version(EV_CURRENT) != EV_NONE) { + int fd; + Elf *elf; + GElf_Ehdr ehdr; + + for (i = 1; i < g_argc; i++) { + if ((fd = open64(g_argv[i], O_RDONLY)) == -1) + break; + + if ((elf = elf_begin(fd, ELF_C_READ, NULL)) == NULL) { + (void) close(fd); + break; + } + + if (elf_kind(elf) != ELF_K_ELF || + gelf_getehdr(elf, &ehdr) == NULL) { + (void) close(fd); + (void) elf_end(elf); + break; + } + + (void) close(fd); + (void) elf_end(elf); + + if (ehdr.e_ident[EI_CLASS] == ELFCLASS64) { + if (g_oflags & DTRACE_O_ILP32) { + fatal("can't mix 32-bit and 64-bit " + "object files\n"); + } + g_oflags |= DTRACE_O_LP64; + } else if (ehdr.e_ident[EI_CLASS] == ELFCLASS32) { + if (g_oflags & DTRACE_O_LP64) { + fatal("can't mix 32-bit and 64-bit " + "object files\n"); + } + g_oflags |= DTRACE_O_ILP32; + } else { + break; + } + } + } +#endif /* !VBOX */ + + /* + * Open libdtrace. If we are not actually going to be enabling any + * instrumentation attempt to reopen libdtrace using DTRACE_O_NODEV. + */ + while ((g_dtp = dtrace_open(DTRACE_VERSION, g_oflags, &err)) == NULL) { + if (!(g_oflags & DTRACE_O_NODEV) && !g_exec && !g_grabanon) { + g_oflags |= DTRACE_O_NODEV; + continue; + } + + fatal("failed to initialize dtrace: %s\n", + dtrace_errmsg(NULL, err)); + } + + (void) dtrace_setopt(g_dtp, "bufsize", "4m"); + (void) dtrace_setopt(g_dtp, "aggsize", "4m"); + + /* + * If -G is specified, enable -xlink=dynamic and -xunodefs to permit + * references to undefined symbols to remain as unresolved relocations. + * If -A is specified, enable -xlink=primary to permit static linking + * only to kernel symbols that are defined in a primary kernel module. + */ + if (g_mode == DMODE_LINK) { +#ifndef VBOX /* No link mode. */ + (void) dtrace_setopt(g_dtp, "linkmode", "dynamic"); + (void) dtrace_setopt(g_dtp, "unodefs", NULL); + + /* + * Use the remaining arguments as the list of object files + * when in linker mode. + */ + g_objc = g_argc - 1; + g_objv = g_argv + 1; + + /* + * We still use g_argv[0], the name of the executable. + */ + g_argc = 1; +#else /* VBOX */ + AssertFailed(); +#endif /* VBOX */ + } else if (g_mode == DMODE_ANON) + (void) dtrace_setopt(g_dtp, "linkmode", "primary"); + + /* + * Now that we have libdtrace open, make a second pass through argv[] + * to perform any dtrace_setopt() calls and change any compiler flags. + * We also accumulate any program specifications into our g_cmdv[] at + * this time; these will compiled as part of the fourth processing pass. + */ +#ifndef VBOX + for (optind = 1; optind < argc; optind++) { + while ((c = getopt(argc, argv, DTRACE_OPTSTR)) != EOF) { +#else + RTGetOptInit(&GetState, argc, argv, g_aOptions, RT_ELEMENTS(g_aOptions), 1, 0); + while ((c = RTGetOpt(&GetState, &ValueUnion))) { + { + char *optarg = (char *)ValueUnion.psz; +#endif + + switch (c) { + case 'a': + if (dtrace_setopt(g_dtp, "grabanon", 0) != 0) + dfatal("failed to set -a"); + break; + + case 'b': + if (dtrace_setopt(g_dtp, + "bufsize", optarg) != 0) + dfatal("failed to set -b %s", optarg); + break; + + case 'B': + g_ofp = NULL; + break; + + case 'C': + g_cflags |= DTRACE_C_CPP; + break; + + case 'D': + if (dtrace_setopt(g_dtp, "define", optarg) != 0) + dfatal("failed to set -D %s", optarg); + break; + + case 'f': + dcp = &g_cmdv[g_cmdc++]; + dcp->dc_func = compile_str; + dcp->dc_spec = DTRACE_PROBESPEC_FUNC; + dcp->dc_arg = optarg; + break; + + case 'F': + if (dtrace_setopt(g_dtp, "flowindent", 0) != 0) + dfatal("failed to set -F"); + break; + + case 'H': + if (dtrace_setopt(g_dtp, "cpphdrs", 0) != 0) + dfatal("failed to set -H"); + break; + + case 'i': + dcp = &g_cmdv[g_cmdc++]; + dcp->dc_func = compile_str; + dcp->dc_spec = DTRACE_PROBESPEC_NAME; + dcp->dc_arg = optarg; + break; + + case 'I': + if (dtrace_setopt(g_dtp, "incdir", optarg) != 0) + dfatal("failed to set -I %s", optarg); + break; + + case 'L': + if (dtrace_setopt(g_dtp, "libdir", optarg) != 0) + dfatal("failed to set -L %s", optarg); + break; + + case 'm': + dcp = &g_cmdv[g_cmdc++]; + dcp->dc_func = compile_str; + dcp->dc_spec = DTRACE_PROBESPEC_MOD; + dcp->dc_arg = optarg; + break; + + case 'n': + dcp = &g_cmdv[g_cmdc++]; + dcp->dc_func = compile_str; + dcp->dc_spec = DTRACE_PROBESPEC_NAME; + dcp->dc_arg = optarg; + break; + + case 'P': + dcp = &g_cmdv[g_cmdc++]; + dcp->dc_func = compile_str; + dcp->dc_spec = DTRACE_PROBESPEC_PROVIDER; + dcp->dc_arg = optarg; + break; + + case 'q': + if (dtrace_setopt(g_dtp, "quiet", 0) != 0) + dfatal("failed to set -q"); + break; + + case 'o': + g_ofile = optarg; + break; + + case 's': + dcp = &g_cmdv[g_cmdc++]; + dcp->dc_func = compile_file; + dcp->dc_spec = DTRACE_PROBESPEC_NONE; + dcp->dc_arg = optarg; + break; + + case 'S': + g_cflags |= DTRACE_C_DIFV; + break; + + case 'U': + if (dtrace_setopt(g_dtp, "undef", optarg) != 0) + dfatal("failed to set -U %s", optarg); + break; + + case 'v': + g_verbose++; + break; + + case 'w': + if (dtrace_setopt(g_dtp, "destructive", 0) != 0) + dfatal("failed to set -w"); + break; + + case 'x': + if ((p = strchr(optarg, '=')) != NULL) + *p++ = '\0'; + + if (dtrace_setopt(g_dtp, optarg, p) != 0) + dfatal("failed to set -x %s", optarg); + break; + + case 'X': + if (dtrace_setopt(g_dtp, "stdc", optarg) != 0) + dfatal("failed to set -X %s", optarg); + break; + + case 'Z': + g_cflags |= DTRACE_C_ZDEFS; + break; + +#ifndef VBOX + default: + if (strchr(DTRACE_OPTSTR, c) == NULL) + return (usage(stderr)); +#else + default: + if (c < 0) { /* Note: Not all options are handled. */ + RTGetOptPrintError(c, &ValueUnion); + return (usage(stderr)); + } +#endif + } + } + } + + if (g_ofp == NULL && g_mode != DMODE_EXEC) { + (void) fprintf(stderr, "%s: -B not valid in combination" + " with [-AGl] options\n", g_pname); + return (E_USAGE); + } + + if (g_ofp == NULL && g_ofile != NULL) { + (void) fprintf(stderr, "%s: -B not valid in combination" + " with -o option\n", g_pname); + return (E_USAGE); + } + +#ifndef VBOX + /* + * In our third pass we handle any command-line options related to + * grabbing or creating victim processes. The behavior of these calls + * may been affected by any library options set by the second pass. + */ +# ifndef VBOX + for (optind = 1; optind < argc; optind++) { + while ((c = getopt(argc, argv, DTRACE_OPTSTR)) != EOF) { +# else + RTGetOptInit(&GetState, argc, argv, g_aOptions, RT_ELEMENTS(g_aOptions), 1, 0); + while ((c = RTGetOpt(&GetState, &ValueUnion))) { + { + char *optarg = (char *)ValueUnion.psz; +# endif + switch (c) { + case 'c': + if ((v = make_argv(optarg)) == NULL) + fatal("failed to allocate memory"); + + P = dtrace_proc_create(g_dtp, v[0], v); + if (P == NULL) + dfatal(NULL); /* dtrace_errmsg() only */ + + g_psv[g_psc++] = P; + free(v); + break; + + case 'p': + errno = 0; + pid = strtol(optarg, &p, 10); + + if (errno != 0 || p == optarg || p[0] != '\0') + fatal("invalid pid: %s\n", optarg); + + P = dtrace_proc_grab(g_dtp, pid, 0); + if (P == NULL) + dfatal(NULL); /* dtrace_errmsg() only */ + + g_psv[g_psc++] = P; + break; + } + } + } +#endif /* !VBOX */ + + /* + * In our fourth pass we finish g_cmdv[] by calling dc_func to convert + * each string or file specification into a compiled program structure. + */ + for (i = 0; i < g_cmdc; i++) + g_cmdv[i].dc_func(&g_cmdv[i]); + + if (g_mode != DMODE_LIST) { + if (dtrace_handle_err(g_dtp, &errhandler, NULL) == -1) + dfatal("failed to establish error handler"); + + if (dtrace_handle_drop(g_dtp, &drophandler, NULL) == -1) + dfatal("failed to establish drop handler"); + + if (dtrace_handle_proc(g_dtp, &prochandler, NULL) == -1) + dfatal("failed to establish proc handler"); + + if (dtrace_handle_setopt(g_dtp, &setopthandler, NULL) == -1) + dfatal("failed to establish setopt handler"); + + if (g_ofp == NULL && + dtrace_handle_buffered(g_dtp, &bufhandler, NULL) == -1) + dfatal("failed to establish buffered handler"); + } + + (void) dtrace_getopt(g_dtp, "flowindent", &opt); + g_flowindent = opt != DTRACEOPT_UNSET; + + (void) dtrace_getopt(g_dtp, "grabanon", &opt); + g_grabanon = opt != DTRACEOPT_UNSET; + + (void) dtrace_getopt(g_dtp, "quiet", &opt); + g_quiet = opt != DTRACEOPT_UNSET; + + /* + * Now make a fifth and final pass over the options that have been + * turned into programs and saved in g_cmdv[], performing any mode- + * specific processing. If g_mode is DMODE_EXEC, we will break out + * of the switch() and continue on to the data processing loop. For + * other modes, we will exit dtrace once mode-specific work is done. + */ + switch (g_mode) { + case DMODE_EXEC: + if (g_ofile != NULL && (g_ofp = fopen(g_ofile, "a")) == NULL) + fatal("failed to open output file '%s'", g_ofile); + + for (i = 0; i < g_cmdc; i++) + exec_prog(&g_cmdv[i]); + + if (done && !g_grabanon) { + dtrace_close(g_dtp); + return (g_status); + } + break; + + case DMODE_ANON: + if (g_ofile == NULL) + g_ofile = "/kernel/drv/dtrace.conf"; + + dof_prune(g_ofile); /* strip out any old DOF directives */ + etcsystem_prune(); /* string out any forceload directives */ + + if (g_cmdc == 0) { + dtrace_close(g_dtp); + return (g_status); + } + + if ((g_ofp = fopen(g_ofile, "a")) == NULL) + fatal("failed to open output file '%s'", g_ofile); + + for (i = 0; i < g_cmdc; i++) { + anon_prog(&g_cmdv[i], + dtrace_dof_create(g_dtp, g_cmdv[i].dc_prog, 0), i); + } + + /* + * Dump out the DOF corresponding to the error handler and the + * current options as the final DOF property in the .conf file. + */ + anon_prog(NULL, dtrace_geterr_dof(g_dtp), i++); + anon_prog(NULL, dtrace_getopt_dof(g_dtp), i++); + + if (fclose(g_ofp) == EOF) + fatal("failed to close output file '%s'", g_ofile); + + /* + * These messages would use notice() rather than error(), but + * we don't want them suppressed when -A is run on a D program + * that itself contains a #pragma D option quiet. + */ + error("saved anonymous enabling in %s\n", g_ofile); + etcsystem_add(); + error("run update_drv(1M) or reboot to enable changes\n"); + + dtrace_close(g_dtp); + return (g_status); + + case DMODE_LINK: +#ifndef VBOX /* No link mode. */ + if (g_cmdc == 0) { + (void) fprintf(stderr, "%s: -G requires one or more " + "scripts or enabling options\n", g_pname); + dtrace_close(g_dtp); + return (E_USAGE); + } + + for (i = 0; i < g_cmdc; i++) + link_prog(&g_cmdv[i]); + + if (g_cmdc > 1 && g_ofile != NULL) { + char **objv = alloca(g_cmdc * sizeof (char *)); + + for (i = 0; i < g_cmdc; i++) + objv[i] = g_cmdv[i].dc_ofile; + + if (dtrace_program_link(g_dtp, NULL, DTRACE_D_PROBES, + g_ofile, g_cmdc, objv) != 0) + dfatal(NULL); /* dtrace_errmsg() only */ + } + + dtrace_close(g_dtp); + return (g_status); +#else /* VBOX */ + AssertFailed(); + dtrace_close(g_dtp); + return (E_USAGE); +#endif /* VBOX */ + + case DMODE_LIST: + if (g_ofile != NULL && (g_ofp = fopen(g_ofile, "a")) == NULL) + fatal("failed to open output file '%s'", g_ofile); + + oprintf("%5s %10s %17s %33s %s\n", + "ID", "PROVIDER", "MODULE", "FUNCTION", "NAME"); + + for (i = 0; i < g_cmdc; i++) + list_prog(&g_cmdv[i]); + + if (g_cmdc == 0) + (void) dtrace_probe_iter(g_dtp, NULL, list_probe, NULL); + + dtrace_close(g_dtp); + return (g_status); + + case DMODE_HEADER: + if (g_cmdc == 0) { + (void) fprintf(stderr, "%s: -h requires one or more " + "scripts or enabling options\n", g_pname); + dtrace_close(g_dtp); + return (E_USAGE); + } + + if (g_ofile == NULL) { +#ifndef VBOX + char *p; +#endif + + if (g_cmdc > 1) { + (void) fprintf(stderr, "%s: -h requires an " + "output file if multiple scripts are " + "specified\n", g_pname); + dtrace_close(g_dtp); + return (E_USAGE); + } + + if ((p = strrchr(g_cmdv[0].dc_arg, '.')) == NULL || + strcmp(p, ".d") != 0) { + (void) fprintf(stderr, "%s: -h requires an " + "output file if no scripts are " + "specified\n", g_pname); + dtrace_close(g_dtp); + return (E_USAGE); + } + + p[0] = '\0'; /* strip .d suffix */ + g_ofile = p = g_cmdv[0].dc_ofile; + (void) snprintf(p, sizeof (g_cmdv[0].dc_ofile), + "%s.h", basename(g_cmdv[0].dc_arg)); + } + + if ((g_ofp = fopen(g_ofile, "w")) == NULL) + fatal("failed to open header file '%s'", g_ofile); + + oprintf("/*\n * Generated by dtrace(1M).\n */\n\n"); + + if (dtrace_program_header(g_dtp, g_ofp, g_ofile) != 0 || + fclose(g_ofp) == EOF) + dfatal("failed to create header file %s", g_ofile); + + dtrace_close(g_dtp); + return (g_status); + } + + /* + * If -a and -Z were not specified and no probes have been matched, no + * probe criteria was specified on the command line and we abort. + */ + if (g_total == 0 && !g_grabanon && !(g_cflags & DTRACE_C_ZDEFS)) + dfatal("no probes %s\n", g_cmdc ? "matched" : "specified"); + + /* + * Start tracing. Once we dtrace_go(), reload any options that affect + * our globals in case consuming anonymous state has changed them. + */ + go(); + + (void) dtrace_getopt(g_dtp, "flowindent", &opt); + g_flowindent = opt != DTRACEOPT_UNSET; + + (void) dtrace_getopt(g_dtp, "grabanon", &opt); + g_grabanon = opt != DTRACEOPT_UNSET; + + (void) dtrace_getopt(g_dtp, "quiet", &opt); + g_quiet = opt != DTRACEOPT_UNSET; + + (void) dtrace_getopt(g_dtp, "destructive", &opt); + if (opt != DTRACEOPT_UNSET) + notice("allowing destructive actions\n"); + +#ifndef _MSC_VER + (void) sigemptyset(&act.sa_mask); + act.sa_flags = 0; + act.sa_handler = intr; + + if (sigaction(SIGINT, NULL, &oact) == 0 && oact.sa_handler != SIG_IGN) + (void) sigaction(SIGINT, &act, NULL); + + if (sigaction(SIGTERM, NULL, &oact) == 0 && oact.sa_handler != SIG_IGN) + (void) sigaction(SIGTERM, &act, NULL); +#else + signal(SIGINT, intr); + signal(SIGTERM, intr); +#endif + + /* + * Now that tracing is active and we are ready to consume trace data, + * continue any grabbed or created processes, setting them running + * using the /proc control mechanism inside of libdtrace. + */ +#ifndef VBOX + for (i = 0; i < g_psc; i++) + dtrace_proc_continue(g_dtp, g_psv[i]); +#endif + + g_pslive = g_psc; /* count for prochandler() */ + + do { + if (!g_intr && !done) + dtrace_sleep(g_dtp); + + if (g_newline) { + /* + * Output a newline just to make the output look + * slightly cleaner. Note that we do this even in + * "quiet" mode... + */ + oprintf("\n"); + g_newline = 0; + } + + if (done || g_intr || (g_psc != 0 && g_pslive == 0)) { + done = 1; + if (dtrace_stop(g_dtp) == -1) + dfatal("couldn't stop tracing"); + } + + switch (dtrace_work(g_dtp, g_ofp, chew, chewrec, NULL)) { + case DTRACE_WORKSTATUS_DONE: + done = 1; + break; + case DTRACE_WORKSTATUS_OKAY: + break; + default: + if (!g_impatient && dtrace_errno(g_dtp) != EINTR) + dfatal("processing aborted"); + } + + if (g_ofp != NULL && fflush(g_ofp) == EOF) + clearerr(g_ofp); + } while (!done); + + oprintf("\n"); + + if (!g_impatient) { + if (dtrace_aggregate_print(g_dtp, g_ofp, NULL) == -1 && + dtrace_errno(g_dtp) != EINTR) + dfatal("failed to print aggregations"); + } + + dtrace_close(g_dtp); + return (g_status); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/i386/Makefile b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/i386/Makefile new file mode 100644 index 00000000..42abe337 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/i386/Makefile @@ -0,0 +1,30 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright 2003 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +#ident "%Z%%M% %I% %E% SMI" + +include ../Makefile.com + +install: all $(ROOTUSRSBINPROG32) diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/i386/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/i386/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/sparc/Makefile b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/sparc/Makefile new file mode 100644 index 00000000..42abe337 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/sparc/Makefile @@ -0,0 +1,30 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright 2003 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +#ident "%Z%%M% %I% %E% SMI" + +include ../Makefile.com + +install: all $(ROOTUSRSBINPROG32) diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/sparc/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/sparc/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/sparcv9/Makefile b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/sparcv9/Makefile new file mode 100644 index 00000000..45508077 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/sparcv9/Makefile @@ -0,0 +1,31 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright 2003 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +#ident "%Z%%M% %I% %E% SMI" + +include ../Makefile.com +include ../../Makefile.cmd.64 + +install: all $(ROOTUSRSBINPROG64) diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/sparcv9/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/sparcv9/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/Makefile b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/Makefile new file mode 100644 index 00000000..b6af1e53 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/Makefile @@ -0,0 +1,46 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2009 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +include $(SRC)/Makefile.master + +SUBDIRS = cmd tst + +ROOTOPTPKG = $(ROOT)/opt/SUNWdtrt + +include Makefile.subdirs + +install: $(ROOTOPTPKG)/README $(SUBDIRS) + +pkg: install + @cd $(SRC)/pkg; pwd; $(MAKE) SUNWdtrt.pub + +$(ROOTOPTPKG)/% := FILEMODE = 0444 + +$(ROOTOPTPKG): + $(INS.dir) + +$(ROOTOPTPKG)/%: ./% $(ROOTOPTPKG) + $(INS.file) diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/Makefile.subdirs b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/Makefile.subdirs new file mode 100644 index 00000000..2ff551ca --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/Makefile.subdirs @@ -0,0 +1,41 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +#ident "%Z%%M% %I% %E% SMI" + +.KEEP_STATE: + +all := TARGET += all +clean := TARGET += clean +clobber := TARGET += clobber +install := TARGET += install +lint := TARGET += lint + +all clean clobber install lint: $(SUBDIRS) + +$(SUBDIRS): FRC + @cd $@; pwd; $(MAKE) $(TARGET) + +FRC: diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/README b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/README new file mode 100644 index 00000000..51ab650f --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/README @@ -0,0 +1,32 @@ + +CDDL HEADER START + +The contents of this file are subject to the terms of the +Common Development and Distribution License (the "License"). +You may not use this file except in compliance with the License. + +You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +or http://www.opensolaris.org/os/licensing. +See the License for the specific language governing permissions +and limitations under the License. + +When distributing Covered Code, include this CDDL HEADER in each +file and include the License file at usr/src/OPENSOLARIS.LICENSE. +If applicable, add the following below this CDDL HEADER, with the +fields enclosed by brackets "[]" replaced with your own identifying +information: Portions Copyright [yyyy] [name of copyright owner] + +CDDL HEADER END + +Copyright 2006 Sun Microsystems, Inc. All rights reserved. +Use is subject to license terms. + +ident "%Z%%M% %I% %E% SMI" + +DTrace Testing Suite + +The SUNWdtrt package delivers a set of test programs and D source +files into the directory /opt/SUNWdtrt. For more information see +the following web site: + + http://www.opensolaris.org/os/community/dtrace/dtest diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/Makefile b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/Makefile new file mode 100644 index 00000000..28af4ee6 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/Makefile @@ -0,0 +1,31 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +#ident "%Z%%M% %I% %E% SMI" + +include $(SRC)/Makefile.master + +SUBDIRS = scripts baddof badioctl chkargs jdtrace +include ../Makefile.subdirs diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/baddof/Makefile b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/baddof/Makefile new file mode 100644 index 00000000..bb7a746d --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/baddof/Makefile @@ -0,0 +1,59 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" + +include $(SRC)/cmd/Makefile.cmd + +.KEEP_STATE: + +ROOTOPTPKG = $(ROOT)/opt/SUNWdtrt +ROOTBIN = $(ROOTOPTPKG)/bin + +LDFLAGS += $(ZNODEFS) $(ZTEXTOFF) +LDLIBS = $(LDLIBS.cmd) +LDLIBS += -ldtrace + +SRCS = baddof +CMDS = $(SRCS:%=$(ROOTBIN)/%) + +$(CMDS) := FILEMODE = 0555 + +all: $(SRCS) + +install: $(CMDS) + +clean lint: + +clobber: + $(RM) $(SRCS) + +$(CMDS): $(ROOTBIN) $(SRCS) + +$(ROOTBIN): + $(INS.dir) + +$(ROOTBIN)/%: % + $(INS.file) diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/baddof/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/baddof/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/baddof/baddof.c b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/baddof/baddof.c new file mode 100644 index 00000000..1c14c659 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/baddof/baddof.c @@ -0,0 +1,207 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +void +fatal(char *fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + + fprintf(stderr, "%s: ", "baddof"); + vfprintf(stderr, fmt, ap); + + if (fmt[strlen(fmt) - 1] != '\n') + fprintf(stderr, ": %s\n", strerror(errno)); + + exit(1); +} + +#define LEAP_DISTANCE 20 + +void +corrupt(int fd, unsigned char *buf, int len) +{ + static int ttl, valid; + int bit, i; + unsigned char saved; + int val[LEAP_DISTANCE], pos[LEAP_DISTANCE]; + int new, rv; + +again: + printf("valid DOF #%d\n", valid++); + + /* + * We are going iterate through, flipping one bit and attempting + * to enable. + */ + for (bit = 0; bit < len * 8; bit++) { + saved = buf[bit / 8]; + buf[bit / 8] ^= (1 << (bit % 8)); + + if ((bit % 100) == 0) + printf("%d\n", bit); + + if ((rv = ioctl(fd, DTRACEIOC_ENABLE, buf)) == -1) { + /* + * That failed -- restore the bit and drive on. + */ + buf[bit / 8] = saved; + continue; + } + + /* + * That worked -- and it may have enabled probes. To keep + * enabled probes down to a reasonable level, we'll close + * and reopen pseudodevice if we have more than 10,000 + * probes enabled. + */ + ttl += rv; + + if (ttl < 10000) { + buf[bit / 8] = saved; + continue; + } + + printf("enabled %d probes; resetting device.\n", ttl); + close(fd); + + new = open("/devices/pseudo/dtrace@0:dtrace", O_RDWR); + + if (new == -1) + fatal("couldn't open DTrace pseudo device"); + + if (new != fd) { + dup2(new, fd); + close(new); + } + + ttl = 0; + buf[bit / 8] = saved; + } + + for (;;) { + /* + * Now we want to get as many bits away as possible. We flip + * bits randomly -- getting as far away as we can until we don't + * seem to be making any progress. + */ + for (i = 0; i < LEAP_DISTANCE; i++) { + /* + * Pick a random bit and corrupt it. + */ + bit = lrand48() % (len * 8); + + val[i] = buf[bit / 8]; + pos[i] = bit / 8; + buf[bit / 8] ^= (1 << (bit % 8)); + } + + /* + * Let's see if that managed to get us valid DOF... + */ + if ((rv = ioctl(fd, DTRACEIOC_ENABLE, buf)) > 0) { + /* + * Success! This will be our new base for valid DOF. + */ + ttl += rv; + goto again; + } + + /* + * No luck -- we'll restore those bits and try flipping a + * different set. Note that this must be done in reverse + * order... + */ + for (i = LEAP_DISTANCE - 1; i >= 0; i--) + buf[pos[i]] = val[i]; + } +} + +int +main(int argc, char **argv) +{ + char *filename = argv[1]; + dtrace_hdl_t *dtp; + dtrace_prog_t *pgp; + int err, fd, len; + FILE *fp; + unsigned char *dof, *copy; + + if (argc < 2) + fatal("expected D script as argument\n"); + + if ((fp = fopen(filename, "r")) == NULL) + fatal("couldn't open %s", filename); + + /* + * First, we need to compile our provided D into DOF. + */ + if ((dtp = dtrace_open(DTRACE_VERSION, 0, &err)) == NULL) { + fatal("cannot open dtrace library: %s\n", + dtrace_errmsg(NULL, err)); + } + + pgp = dtrace_program_fcompile(dtp, fp, 0, 0, NULL); + fclose(fp); + + if (pgp == NULL) { + fatal("failed to compile script %s: %s\n", filename, + dtrace_errmsg(dtp, dtrace_errno(dtp))); + } + + dof = dtrace_dof_create(dtp, pgp, 0); + len = ((dof_hdr_t *)dof)->dofh_loadsz; + + if ((copy = malloc(len)) == NULL) + fatal("could not allocate copy of %d bytes", len); + + for (;;) { + bcopy(dof, copy, len); + /* + * Open another instance of the dtrace device. + */ + fd = open("/devices/pseudo/dtrace@0:dtrace", O_RDWR); + + if (fd == -1) + fatal("couldn't open DTrace pseudo device"); + + corrupt(fd, copy, len); + close(fd); + } + + /* NOTREACHED */ + return (0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/badioctl/Makefile b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/badioctl/Makefile new file mode 100644 index 00000000..6c3257df --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/badioctl/Makefile @@ -0,0 +1,58 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" + +include $(SRC)/cmd/Makefile.cmd + +.KEEP_STATE: + +ROOTOPTPKG = $(ROOT)/opt/SUNWdtrt +ROOTBIN = $(ROOTOPTPKG)/bin + +LDFLAGS += $(ZNODEFS) $(ZTEXTOFF) +LDLIBS = $(LDLIBS.cmd) + +SRCS = badioctl +CMDS = $(SRCS:%=$(ROOTBIN)/%) + +$(CMDS) := FILEMODE = 0555 + +all: $(SRCS) + +install: $(CMDS) + +clean lint: + +clobber: + $(RM) $(SRCS) + +$(CMDS): $(ROOTBIN) $(SRCS) + +$(ROOTBIN): + $(INS.dir) + +$(ROOTBIN)/%: % + $(INS.file) diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/badioctl/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/badioctl/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/badioctl/badioctl.c b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/badioctl/badioctl.c new file mode 100644 index 00000000..8d6833d5 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/badioctl/badioctl.c @@ -0,0 +1,145 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define DTRACEIOC (('d' << 24) | ('t' << 16) | ('r' << 8)) +#define DTRACEIOC_MAX 17 + +void +fatal(char *fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + + fprintf(stderr, "%s: ", "badioctl"); + vfprintf(stderr, fmt, ap); + + if (fmt[strlen(fmt) - 1] != '\n') + fprintf(stderr, ": %s\n", strerror(errno)); + + exit(1); +} + +void +badioctl(pid_t parent) +{ + int fd = -1, random, ps = sysconf(_SC_PAGESIZE); + int i = 0, seconds; + caddr_t addr; + hrtime_t now, last = 0, end; + + if ((random = open("/dev/random", O_RDONLY)) == -1) + fatal("couldn't open /dev/random"); + + if ((addr = mmap(0, ps, PROT_READ | PROT_WRITE, + MAP_ANON | MAP_PRIVATE, -1, 0)) == (caddr_t)-1) + fatal("mmap"); + + for (;;) { + unsigned int ioc; + + if ((now = gethrtime()) - last > NANOSEC) { + if (kill(parent, 0) == -1 && errno == ESRCH) { + /* + * Our parent died. We will kill ourselves in + * sympathy. + */ + exit(0); + } + + /* + * Once a second, we'll reopen the device. + */ + if (fd != -1) + close(fd); + + fd = open("/devices/pseudo/dtrace@0:dtrace", O_RDONLY); + + if (fd == -1) + fatal("couldn't open DTrace pseudo device"); + + last = now; + } + + + if ((i++ % 1000) == 0) { + /* + * Every thousand iterations, change our random gunk. + */ + read(random, addr, ps); + } + + read(random, &ioc, sizeof (ioc)); + ioc %= DTRACEIOC_MAX; + ioc++; + ioctl(fd, DTRACEIOC | ioc, addr); + } +} + +int +main() +{ + pid_t child, parent = getpid(); + int status; + + for (;;) { + if ((child = fork()) == 0) + badioctl(parent); + + while (waitpid(child, &status, WEXITED) != child) + continue; + + if (WIFEXITED(status)) { + /* + * Our child exited by design -- we'll exit with + * the same status code. + */ + exit(WEXITSTATUS(status)); + } + + /* + * Our child died on a signal. Respawn it. + */ + printf("badioctl: child died on signal %d; respawning.\n", + WTERMSIG(status)); + fflush(stdout); + } + + /* NOTREACHED */ + return (0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/chkargs/Makefile b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/chkargs/Makefile new file mode 100644 index 00000000..0510b9bf --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/chkargs/Makefile @@ -0,0 +1,33 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +#ident "%Z%%M% %I% %E% SMI" + +include $(SRC)/cmd/Makefile.cmd + +SUBDIRS = $(MACH) +$(BUILD64)SUBDIRS += $(MACH64) + +include ../../Makefile.subdirs diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/chkargs/Makefile.com b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/chkargs/Makefile.com new file mode 100644 index 00000000..f9ad9605 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/chkargs/Makefile.com @@ -0,0 +1,76 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" + +include $(SRC)/cmd/Makefile.cmd + +.KEEP_STATE: + +ROOTBIN = $(ROOT)/opt/SUNWdtrt/bin +ROOTBIN32 = $(ROOTBIN)/$(MACH32) +ROOTBIN64 = $(ROOTBIN)/$(MACH64) + +PROG = chkargs +LDLIBS = $(LDLIBS.cmd) +LDLIBS += -ldtrace -lctf + +ROOTISAEXEC = $(ROOTBIN)/$(PROG) +ROOTPROG32 = $(ROOTBIN32)/$(PROG) +ROOTPROG64 = $(ROOTBIN64)/$(PROG) + +$(ROOTPROG32) := FILEMODE = 0555 +$(ROOTPROG64) := FILEMODE = 0555 + +all: $(PROG) + +clean lint: + +clobber: + $(RM) $(PROG) $(ROOTISAEXEC) + +$(PROG): ../$(PROG).c + $(LINK.c) -o $@ ../$(PROG).c $(LDLIBS) + $(POST_PROCESS) ; $(STRIP_STABS) + +$(ROOTPROG32): $(ROOTBIN32) $(PROG) + +$(ROOTPROG64): $(ROOTBIN64) $(PROG) + +$(ROOTBIN32)/%: % + $(INS.file) + +$(ROOTBIN64)/%: % + $(INS.file) + +$(ROOTISAEXEC): + $(RM) $@; + $(CP) -p $(ISAEXEC) $@ + +$(ROOTBIN)/%: $(ROOTBIN) + $(INS.dir) + +$(ROOTBIN): + $(INS.dir) diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/chkargs/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/chkargs/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/chkargs/amd64/Makefile b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/chkargs/amd64/Makefile new file mode 100644 index 00000000..38bbfc0a --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/chkargs/amd64/Makefile @@ -0,0 +1,31 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" + +include ../Makefile.com +include $(SRC)/cmd/Makefile.cmd.64 + +install: $(ROOTPROG64) $(ROOTISAEXEC) diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/chkargs/amd64/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/chkargs/amd64/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/chkargs/chkargs.c b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/chkargs/chkargs.c new file mode 100644 index 00000000..a7e0222f --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/chkargs/chkargs.c @@ -0,0 +1,149 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#include +#include +#include + +static int g_count; +static int g_errs; +static int g_fd; +static int g_verbose; +static int g_errexit; +static char *g_progname; + +static int +probe(dtrace_hdl_t *dtp, const dtrace_probedesc_t *pdp, void *data) +{ + dtrace_probeinfo_t p; + dtrace_argdesc_t arg; + char buf[BUFSIZ]; + int i; + + (void) printf("\r%6d", ++g_count); + (void) fflush(stdout); + + if (dtrace_probe_info(dtp, pdp, &p) != 0) { + (void) printf(" failed to get probe info for " + "%s:%s:%s:%s [%d]\n", pdp->dtpd_provider, pdp->dtpd_mod, + pdp->dtpd_func, pdp->dtpd_name, pdp->dtpd_id); + g_errs++; + return (0); + } + + for (i = 0; i < p.dtp_argc; i++) { + if (p.dtp_argv[i].dtt_type == CTF_ERR) { + bzero(&arg, sizeof (dtrace_argdesc_t)); + arg.dtargd_id = pdp->dtpd_id; + arg.dtargd_ndx = i; + (void) ioctl(g_fd, DTRACEIOC_PROBEARG, &arg); + + (void) printf(" failed to get types for args[%d] " + "of %s:%s:%s:%s [%d]: <%s> -> <%s>\n", i, + pdp->dtpd_provider, pdp->dtpd_mod, pdp->dtpd_func, + pdp->dtpd_name, pdp->dtpd_id, + arg.dtargd_native, arg.dtargd_xlate); + + g_errs++; + + if (g_errexit) + return (-1); + + } else if (g_verbose) { + (void) printf("%d args[%d] : %s\n", pdp->dtpd_id, i, + ctf_type_name(p.dtp_argv[i].dtt_ctfp, + p.dtp_argv[i].dtt_type, buf, sizeof (buf))); + } + } + + return (0); +} + +int +main(int argc, char *argv[]) +{ + dtrace_probedesc_t pd, *pdp = NULL; + dtrace_hdl_t *dtp; + int err, c; + char *p; + + g_progname = argv[0]; + + if ((dtp = dtrace_open(DTRACE_VERSION, 0, &err)) == NULL) { + (void) fprintf(stderr, "%s: failed to open dtrace: %s\n", + g_progname, dtrace_errmsg(dtp, err)); + return (1); + } + + while ((c = getopt(argc, argv, "evx:")) != -1) { + switch (c) { + case 'e': + g_errexit++; + break; + case 'v': + g_verbose++; + break; + case 'x': + if ((p = strchr(optarg, '=')) != NULL) + *p++ = '\0'; + + if (dtrace_setopt(dtp, optarg, p) != 0) { + (void) fprintf(stderr, "%s: failed to set " + "option -x %s: %s\n", g_progname, optarg, + dtrace_errmsg(dtp, dtrace_errno(dtp))); + return (2); + } + break; + + default: + (void) fprintf(stderr, "Usage: %s [-ev] " + "[-x opt[=arg]] [probedesc]\n", g_progname); + return (2); + } + } + + argv += optind; + argc -= optind; + + if (argc > 0) { + if (dtrace_str2desc(dtp, DTRACE_PROBESPEC_NAME, argv[0], &pd)) { + (void) fprintf(stderr, "%s: invalid probe description " + "%s: %s\n", g_progname, argv[0], + dtrace_errmsg(dtp, dtrace_errno(dtp))); + return (2); + } + pdp = &pd; + } + + g_fd = dtrace_ctlfd(dtp); + (void) dtrace_probe_iter(dtp, pdp, probe, NULL); + dtrace_close(dtp); + + (void) printf("\nTotal probes: %d\n", g_count); + (void) printf("Total errors: %d\n\n", g_errs); + + return (g_errs != 0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/chkargs/i386/Makefile b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/chkargs/i386/Makefile new file mode 100644 index 00000000..596e5b08 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/chkargs/i386/Makefile @@ -0,0 +1,30 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" + +include ../Makefile.com + +install: $(ROOTPROG32) $(ROOTISAEXEC) diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/chkargs/i386/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/chkargs/i386/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/chkargs/sparc/Makefile b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/chkargs/sparc/Makefile new file mode 100644 index 00000000..596e5b08 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/chkargs/sparc/Makefile @@ -0,0 +1,30 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" + +include ../Makefile.com + +install: $(ROOTPROG32) $(ROOTISAEXEC) diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/chkargs/sparc/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/chkargs/sparc/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/chkargs/sparcv9/Makefile b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/chkargs/sparcv9/Makefile new file mode 100644 index 00000000..38bbfc0a --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/chkargs/sparcv9/Makefile @@ -0,0 +1,31 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" + +include ../Makefile.com +include $(SRC)/cmd/Makefile.cmd.64 + +install: $(ROOTPROG64) $(ROOTISAEXEC) diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/chkargs/sparcv9/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/chkargs/sparcv9/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/jdtrace/Getopt.java b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/jdtrace/Getopt.java new file mode 100644 index 00000000..e06a170d --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/jdtrace/Getopt.java @@ -0,0 +1,453 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + * + * ident "%Z%%M% %I% %E% SMI" + */ + +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ + +import java.io.StringWriter; +import java.io.PrintWriter; + +/** + * A Java port of Solaris {@code lib/libc/port/gen/getopt.c}, which is a + * port of System V UNIX getopt. See getopt(3C) and SUS/XPG + * getopt() for function definition and requirements. Unlike that + * definition, this implementation moves non-options to the end of the + * argv array rather than quitting at the first non-option. + */ +public class Getopt { + static final int EOF = -1; + + private String progname; + private String[] args; + private int argc; + private String optstring; + private int optind = 0; // args index + private int optopt = 0; + private String optarg = null; + private boolean opterr = true; + + /* + * _sp is required to keep state between successive calls to + * getopt() while extracting aggregated short-options (ie: -abcd). + */ + private int _sp = 1; + + /** + * Creates a {Code Getopt} instance to parse the given command-line + * arguments. Modifies the given args array by swapping the + * positions of non-options and options so that non-options appear + * at the end of the array. + */ + public Getopt(String programName, String[] args, + String optionString) + { + progname = programName; + // No defensive copy; Getopt is expected to modify the given + // args array + this.args = args; + argc = this.args.length; + optstring = optionString; + validate(); + } + + private void + validate() + { + if (progname == null) { + throw new NullPointerException("program name is null"); + } + int i = 0; + for (String s : args) { + if (s == null) { + throw new NullPointerException("null arg at index " + i); + } + ++i; + } + if (optstring == null) { + throw new NullPointerException("option string is null"); + } + } + + private static class StringRef { + private String s; + + public String + get() + { + return s; + } + + public StringRef + set(String value) + { + s = value; + return this; + } + } + + /* + * Generalized error processing method. If the optstr parameter is + * null, the character c is converted to a string and displayed + * instead. + */ + void + err(String format, char c, String optstr) + { + if (opterr && optstring.charAt(0) != ':') { + StringWriter w = new StringWriter(); + PrintWriter p = new PrintWriter(w); + p.printf(format, progname, (optstr == null ? + Character.toString(c) : optstr.substring(2))); + System.err.println(w.toString()); + } + } + + /* + * Determine if the specified character (c) is present in the string + * (optstring) as a regular, single character option. If the option + * is found, return an index into optstring where the short-option + * character is found, otherwise return -1. The characters ':' and + * '(' are not allowed. + */ + static int + parseshort(String optstring, char c) + { + if (c == ':' || c == '(') { + return -1; + } + + int ch; + int len = optstring.length(); + for (int i = 0; i < len; ++i) { + ch = optstring.charAt(i); + if (ch == c) { + return i; + } + + while (i < len && ch == '(') { + for (++i; i < len && (ch = optstring.charAt(i)) != ')'; ++i); + } + } + + return -1; + } + + /** + * Determine if the specified string (opt) is present in the string + * (optstring) as a long-option contained within parenthesis. If the + * long-option specifies option-argument, return a reference to it + * in longoptarg. Otherwise set the longoptarg reference to null. + * If the option is found, return an index into optstring at the + * position of the short-option character associated with the + * long-option; otherwise return -1. + * + * @param optstring the entire optstring passed to the {@code + * Getopt} constructor + * @param opt the long option read from the command line + * @param longoptarg the value of the option is returned in this + * parameter, if an option exists. Possible return values in + * longoptarg are: + *
    + *
  • NULL: No argument was found
  • + *
  • empty string (""): Argument was explicitly left empty + * by the user (e.g., --option= )
  • + *
  • valid string: Argument found on the command line
  • + *
+ * @return index to equivalent short-option in optstring, or -1 if + * option not found in optstring. + */ + static int + parselong(String optstring, String opt, StringRef longoptarg) + { + int cp; // index into optstring, beginning of one option spec + int ip; // index into optstring, traverses every char + char ic; // optstring char + int il; // optstring length + int op; // index into opt + char oc; // opt char + int ol; // opt length + boolean match; // true if opt is matching part of optstring + + longoptarg.set(null); + cp = ip = 0; + il = optstring.length(); + ol = opt.length(); + do { + ic = optstring.charAt(ip); + if (ic != '(' && ++ip == il) + break; + ic = optstring.charAt(ip); + if (ic == ':' && ++ip == il) + break; + ic = optstring.charAt(ip); + while (ic == '(') { + if (++ip == il) + break; + op = 0; + match = true; + while (ip < il && (ic = optstring.charAt(ip)) != ')' && + op < ol) { + oc = opt.charAt(op++); + match = (ic == oc && match); + ++ip; + } + + if (match && ip < il && ic == ')' && (op >= ol || + opt.charAt(op) == '=')) { + if (op < ol && opt.charAt(op) == '=') { + /* may be an empty string - OK */ + longoptarg.set(opt.substring(op + 1)); + } else { + longoptarg.set(null); + } + return cp; + } + if (ip < il && ic == ')' && ++ip == il) + break; + ic = optstring.charAt(ip); + } + cp = ip; + /* + * Handle double-colon in optstring ("a::(longa)") The old + * getopt() accepts it and treats it as a required argument. + */ + while ((cp > 0) && (cp < il) && (optstring.charAt(cp) == ':')) { + --cp; + } + } while (cp < il); + return -1; + } + + /** + * Get the current option value. + */ + public String + getOptarg() + { + return optarg; + } + + /** + * Get the index of the next option to be parsed. + */ + public int + getOptind() + { + return optind; + } + + /** + * Gets the command-line arguments. + */ + public String[] + getArgv() + { + // No defensive copy: Getopt is expected to modify the given + // args array. + return args; + } + + /** + * Gets the aggregated short option that just failed. Since long + * options can't be aggregated, a failed long option can be obtained + * by {@code getArgv()[getOptind() - 1]}. + */ + public int + getOptopt() + { + return optopt; + } + + /** + * Set to {@code false} to suppress diagnostic messages to stderr. + */ + public void + setOpterr(boolean err) + { + opterr = err; + } + + /** + * Gets the next option character, or -1 if there are no more + * options. If getopt() encounters a short-option character or a + * long-option string not described in the {@code optionString} + * argument to the constructor, it returns the question-mark (?) + * character. If it detects a missing option-argument, it also + * returns the question-mark (?) character, unless the first + * character of the {@code optionString} argument was a colon (:), + * in which case getopt() returns the colon (:) character. + *

+ * This implementation swaps the positions of options and + * non-options in the given argv array. + */ + public int + getopt() + { + char c; + int cp; + boolean longopt; + StringRef longoptarg = new StringRef(); + + /* + * Has the end of the options been encountered? The following + * implements the SUS requirements: + * + * If, when getopt() is called: + * - the first character of argv[optind] is not '-' + * - argv[optind] is the string "-" + * getopt() returns -1 without changing optind if + * - argv[optind] is the string "--" + * getopt() returns -1 after incrementing optind + */ + if (_sp == 1) { + boolean nonOption; + do { + nonOption = false; + if (optind >= argc || args[optind].equals("-")) { + return EOF; + } else if (args[optind].equals("--")) { + ++optind; + return EOF; + } else if (args[optind].charAt(0) != '-') { + // non-option: here we deviate from the SUS requirements + // by not quitting, and instead move non-options to the + // end of the args array + nonOption = true; + String tmp = args[optind]; + if (optind + 1 < args.length) { + System.arraycopy(args, optind + 1, args, optind, + args.length - (optind + 1)); + args[args.length - 1] = tmp; + } + --argc; + } + } while (nonOption); + } + + /* + * Getting this far indicates that an option has been encountered. + * Note that the syntax of optstring applies special meanings to + * the characters ':' and '(', so they are not permissible as + * option letters. A special meaning is also applied to the ')' + * character, but its meaning can be determined from context. + * Note that the specification only requires that the alnum + * characters be accepted. + * + * If the second character of the argument is a '-' this must be + * a long-option, otherwise it must be a short option. Scan for + * the option in optstring by the appropriate algorithm. Either + * scan will return an index to the short-option character in + * optstring if the option is found and -1 otherwise. + * + * For an unrecognized long-option, optopt will equal 0, but + * since long-options can't aggregate the failing option can be + * identified by argv[optind-1]. + */ + optopt = c = args[optind].charAt(_sp); + optarg = null; + longopt = (_sp == 1 && c == '-'); + if (!(longopt + ? ((cp = parselong(optstring, args[optind].substring(2), + longoptarg)) != -1) + : ((cp = parseshort(optstring, c)) != -1))) { + err("%s: illegal option -- %s", c, + (longopt ? args[optind] : null)); + /* + * Note: When the long option is unrecognized, optopt will + * be '-' here, which matches the specification. + */ + if (args[optind].length() == ++_sp || longopt) { + ++optind; + _sp = 1; + } + return '?'; + } + optopt = c = optstring.charAt(cp); + + /* + * A valid option has been identified. If it should have an + * option-argument, process that now. SUS defines the setting + * of optarg as follows: + * + * 1. If the option was the last character in an element of + * argv, then optarg contains the next element of argv, and + * optind is incremented by 2. If the resulting value of + * optind is not less than argc, this indicates a missing + * option-argument, and getopt() returns an error indication. + * + * 2. Otherwise, optarg points to the string following the + * option character in that element of argv, and optind is + * incremented by 1. + * + * The second clause allows -abcd (where b requires an + * option-argument) to be interpreted as "-a -b cd". + * + * Note that the option-argument can legally be an empty string, + * such as: + * command --option= operand + * which explicitly sets the value of --option to nil + */ + if (cp + 1 < optstring.length() && optstring.charAt(cp + 1) == ':') { + // The option takes an argument + if (!longopt && ((_sp + 1) < args[optind].length())) { + optarg = args[optind++].substring(_sp + 1); + } else if (longopt && (longoptarg.get() != null)) { + /* + * The option argument was explicitly set to the empty + * string on the command line (--option=) + */ + optind++; + optarg = longoptarg.get(); + } else if (++optind >= argc) { + err("%s: option requires an argument -- %s", c, + (longopt ? args[optind - 1] : null)); + _sp = 1; + optarg = null; + return (optstring.charAt(0) == ':' ? ':' : '?'); + } else + optarg = args[optind++]; + _sp = 1; + } else { + // The option does NOT take an argument + if (longopt && (longoptarg.get() != null)) { + // User supplied an arg to an option that takes none + err("%s: option doesn't take an argument -- %s", (char)0, + (longopt ? args[optind] : null)); + optarg = longoptarg.set(null).get(); + c = '?'; + } + + if (longopt || args[optind].length() == ++_sp) { + _sp = 1; + ++optind; + } + optarg = null; + } + return (c); + } +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/jdtrace/JDTrace.java b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/jdtrace/JDTrace.java new file mode 100644 index 00000000..3c5654d8 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/jdtrace/JDTrace.java @@ -0,0 +1,1042 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + * + * ident "%Z%%M% %I% %E% SMI" + */ +import org.opensolaris.os.dtrace.*; +import java.io.*; +import java.util.*; +import java.util.logging.*; + +/** + * Emulates {@code dtrace(1M)} using the Java DTrace API. + */ +public class JDTrace { + static Logger logger = Logger.getLogger(JDTrace.class.getName()); + + static Consumer dtrace; + + static { + Handler handler = new ConsoleHandler(); + handler.setLevel(Level.ALL); + logger.addHandler(handler); + } + + static final String CLASSNAME = "JDTrace"; + static final String OPTSTR = + "3:6:b:c:CD:ef:Fi:I:lL:m:n:o:p:P:qs:U:vVwx:X:Z"; + static boolean heading = false; + static boolean quiet = false; + static boolean flow = false; + static int stackindent = 14; + static int exitStatus = 0; + static boolean started; + static boolean stopped; + static PrintStream out = System.out; + static final String ATS = "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"; + static final String SPACES = " "; + static final int QUANTIZE_ZERO_BUCKET = 63; + + enum Mode { + EXEC, + INFO, + LIST, + VERSION + } + + enum ProgramType { + STRING, + FILE + } + + static class CompileRequest { + String s; + ProgramType type; + ProbeDescription.Spec probespec; + } + + // Modify program string by expanding an incomplete probe + // description according to the requested probespec. + static void + applyProbespec(CompileRequest req) + { + ProbeDescription.Spec spec = ((req.probespec == null) + ? ProbeDescription.Spec.NAME + : req.probespec); + + int colons = 0; + switch (req.probespec) { + case PROVIDER: + colons = 3; + break; + case MODULE: + colons = 2; + break; + case FUNCTION: + colons = 1; + break; + } + + StringBuffer buf = new StringBuffer(); + if (colons > 0) { + char ch; + int len = req.s.length(); + + int i = 0; + // Find first whitespace character not including leading + // whitespace (end of first token). Ignore whitespace + // inside a block if the block is concatenated with the + // probe description. + for (; (i < len) && Character.isWhitespace(req.s.charAt(i)); ++i); + int npos = i; + boolean inBlock = false; + for (; (npos < len) && + (!Character.isWhitespace(ch = req.s.charAt(npos)) || + inBlock); ++npos) { + if (ch == '{') { + inBlock = true; + } else if (ch == '}') { + inBlock = false; + } + } + + // libdtrace lets you concatenate multiple probe + // descriptions separated by code blocks in curly braces, + // for example genunix::'{printf("FOUND");}'::entry, as long + // as the concatenated probe descriptions begin with ':' and + // not a specific field such as 'syscall'. So to expand the + // possibly multiple probe descriptions, we need to insert + // colons before each open curly brace, and again at the end + // only if there is at least one non-whitespace (probe + // specifying) character after the last closing curly brace. + + int prev_i = 0; + while (i < npos) { + for (; (i < npos) && (req.s.charAt(i) != '{'); ++i); + buf.append(req.s.substring(prev_i, i)); + if ((i < npos) || ((i > 0) && (req.s.charAt(i - 1) != '}'))) { + for (int c = 0; c < colons; ++c) { + buf.append(':'); + } + } + if (i < npos) { + buf.append(req.s.charAt(i++)); + } + prev_i = i; + } + + // append remainder of program text + buf.append(req.s.substring(i)); + + req.s = buf.toString(); + } + } + + static void + printValue(Object value, int bytes, String stringFormat) + { + if (value instanceof Integer) { + if (bytes == 1) { + out.printf(" %3d", (Integer)value); + } else if (bytes == 2) { + out.printf(" %5d", (Integer)value); + } else { + out.printf(" %8d", (Integer)value); + } + } else if (value instanceof Long) { + out.printf(" %16d", (Long)value); + } else { + out.printf(stringFormat, value.toString()); + } + } + + static void + consumeProbeData(ProbeData data) + { + if (logger.isLoggable(Level.FINER)) { + logger.finer(data.toString()); + } + + if (!heading) { + if (flow) { + out.printf("%3s %-41s\n", "CPU", "FUNCTION"); + } else { + if (!quiet) { + out.printf("%3s %6s %32s\n", + "CPU", "ID", "FUNCTION:NAME"); + } + } + heading = true; + } + ProbeDescription probe = data.getEnabledProbeDescription(); + if (flow) { + Flow flow = data.getFlow(); + int indent = (flow.getDepth() * 2); + StringBuffer buf = new StringBuffer(); + // indent + buf.append(' '); + for (int i = 0; i < indent; ++i) { + buf.append(' '); + } + // prefix + switch (flow.getKind()) { + case ENTRY: + if (indent == 0) { + buf.append("=> "); + } else { + buf.append("-> "); + } + break; + case RETURN: + if (indent == 0) { + buf.append("<= "); + } else { + buf.append("<- "); + } + break; + } + + switch (flow.getKind()) { + case NONE: + buf.append(probe.getFunction()); + buf.append(':'); + buf.append(probe.getName()); + break; + default: + buf.append(probe.getFunction()); + } + + out.printf("%3s %-41s ", data.getCPU(), + buf.toString()); + } else { + if (!quiet) { + StringBuffer buf = new StringBuffer(); + buf.append(probe.getFunction()); + buf.append(':'); + buf.append(probe.getName()); + out.printf("%3s %6s %32s ", + data.getCPU(), probe.getID(), + buf.toString()); + } + } + Record record = null; + Object value; + List records = data.getRecords(); + Iterator itr = records.iterator(); + while (itr.hasNext()) { + record = itr.next(); + + if (record instanceof ExitRecord) { + exitStatus = ((ExitRecord)record).getStatus(); + } else if (record instanceof ScalarRecord) { + ScalarRecord scalar = (ScalarRecord)record; + value = scalar.getValue(); + if (value instanceof byte[]) { + out.print(record.toString()); + } else { + if (quiet) { + out.print(value); + } else { + printValue(value, scalar.getNumberOfBytes(), + " %-33s"); + } + } + } else if (record instanceof PrintfRecord) { + out.print(record); + } else if (record instanceof PrintaRecord) { + PrintaRecord printa = (PrintaRecord)record; + List tuples = printa.getTuples(); + if (tuples.isEmpty()) { + out.print(printa.getOutput()); + } else { + for (Tuple t : tuples) { + out.print(printa.getFormattedString(t)); + } + } + + if (logger.isLoggable(Level.FINE)) { + logger.fine(printa.toString()); + } + } else if (record instanceof StackValueRecord) { + printStack((StackValueRecord)record); + } + } + if (!quiet) { + out.println(); + } + } + + static void + printDistribution(Distribution d) + { + out.printf("\n%16s %41s %-9s\n", "value", + "------------- Distribution -------------", + "count"); + long v; // bucket frequency (value) + long b; // lower bound of bucket range + double total = 0; + boolean positives = false; + boolean negatives = false; + + Distribution.Bucket bucket; + int b1 = 0; // first displayed bucket + int b2 = d.size() - 1; // last displayed bucket + for (; (b1 <= b2) && (d.get(b1).getFrequency() == 0); ++b1); + // If possible, get one bucket before the first non-zero + // bucket and one bucket after the last. + if (b1 > b2) { + // There isn't any data. This is possible if (and only if) + // negative increment values have been used. In this case, + // print the buckets around the base. + if (d instanceof LinearDistribution) { + b1 = 0; + b2 = 2; + } else { + b1 = QUANTIZE_ZERO_BUCKET - 1; + b2 = QUANTIZE_ZERO_BUCKET + 1; + } + } else { + if (b1 > 0) --b1; + for (; (b2 > 0) && (d.get(b2).getFrequency() == 0); --b2); + if (b2 < (d.size() - 1)) ++b2; + } + for (int i = b1; i <= b2; ++i) { + v = d.get(i).getFrequency(); + if (v > 0) { + positives = true; + } + if (v < 0) { + negatives = true; + } + total += Math.abs((double)v); + } + for (int i = b1; i <= b2; ++i) { + bucket = d.get(i); + v = bucket.getFrequency(); + b = bucket.getMin(); + + if (d instanceof LinearDistribution) { + if (b == Long.MIN_VALUE) { + String lt = "< " + ((LinearDistribution)d).getBase(); + out.printf("%16s ", lt); + } else if (bucket.getMax() == Long.MAX_VALUE) { + String ge = ">= " + b; + out.printf("%16s ", ge); + } else { + out.printf("%16d ", b); + } + } else { + out.printf("%16d ", b); + } + + printDistributionLine(v, total, positives, negatives); + } + } + + static void + printDistributionLine(long val, double total, boolean positives, + boolean negatives) + { + double f; + int depth, len = 40; + + assert (ATS.length() == len && SPACES.length() == len); + assert (!(total == 0 && (positives || negatives))); + assert (!(val < 0 && !negatives)); + assert (!(val > 0 && !positives)); + assert (!(val != 0 && total == 0)); + + if (!negatives) { + if (positives) { + f = (Math.abs((double)val) * (double)len) / total; + depth = (int)(f + 0.5); + } else { + depth = 0; + } + + out.printf("|%s%s %-9d\n", ATS.substring(len - depth), + SPACES.substring(depth), val); + return; + } + + if (!positives) { + f = (Math.abs((double)val) * (double)len) / total; + depth = (int)(f + 0.5); + + out.printf("%s%s| %-9d\n", SPACES.substring(depth), + ATS.substring(len - depth), val); + return; + } + + /* + * If we're here, we have both positive and negative bucket values. + * To express this graphically, we're going to generate both positive + * and negative bars separated by a centerline. These bars are half + * the size of normal quantize()/lquantize() bars, so we divide the + * length in half before calculating the bar length. + */ + len /= 2; + String ats = ATS.substring(len); + String spaces = SPACES.substring(len); + + f = (Math.abs((double)val) * (double)len) / total; + depth = (int)(f + 0.5); + + if (val <= 0) { + out.printf("%s%s|%s %-9d\n", spaces.substring(depth), + ats.substring(len - depth), repeat(" ", len), val); + return; + } else { + out.printf("%20s|%s%s %-9d\n", "", ats.substring(len - depth), + spaces.substring(depth), val); + } + } + + public static String + repeat(String s, int n) + { + StringBuffer buf = new StringBuffer(); + for (int i = 0; i < n; ++i) { + buf.append(s); + } + return buf.toString(); + } + + static void + printStack(StackValueRecord rec) + { + StackFrame[] frames = rec.getStackFrames(); + int i; + out.println(); + String s; + for (StackFrame f : frames) { + for (i = 0; i < stackindent; ++i) { + out.print(' '); + } + s = f.getFrame(); + if (s.indexOf('[') == 0) { + out.print(" "); + } + out.println(s); + } + } + + static void + printAggregate(Aggregate aggregate) + { + printAggregationRecords(aggregate.getOrderedRecords()); + } + + static void + printAggregationRecords(List list) + { + Tuple tuple; + AggregationValue value; + ValueRecord tupleRecord; + int i; + int len; + for (AggregationRecord r : list) { + tuple = r.getTuple(); + value = r.getValue(); + len = tuple.size(); + for (i = 0; i < len; ++i) { + tupleRecord = tuple.get(i); + if (tupleRecord instanceof StackValueRecord) { + printStack((StackValueRecord)tupleRecord); + } else if (tupleRecord instanceof SymbolValueRecord) { + printValue(tupleRecord.toString(), -1, " %-50s"); + } else { + printValue(tupleRecord.getValue(), + ((ScalarRecord)tupleRecord).getNumberOfBytes(), + " %-50s"); + } + } + if (value instanceof Distribution) { + Distribution d = (Distribution)value; + printDistribution(d); + } else { + Number v = value.getValue(); + printValue(v, -1, " %-50s"); + } + out.println(); + } + } + + static void + exit(int status) + { + out.flush(); + System.err.flush(); + if (status == 0) { + status = exitStatus; + } + System.exit(status); + } + + static void + usage() + { + String predact = "[[ predicate ] action ]"; + System.err.printf("Usage: java %s [-32|-64] [-CeFlqvVwZ] " + + "[-b bufsz] [-c cmd] [-D name[=def]]\n\t[-I path] [-L path] " + + "[-o output] [-p pid] [-s script] [-U name]\n\t" + + "[-x opt[=val]] [-X a|c|s|t]\n\n" + + "\t[-P provider %s]\n" + + "\t[-m [ provider: ] module %s]\n" + + "\t[-f [[ provider: ] module: ] func %s]\n" + + "\t[-n [[[ provider: ] module: ] func: ] name %s]\n" + + "\t[-i probe-id %s] [ args ... ]\n\n", CLASSNAME, + predact, predact, predact, predact, predact); + System.err.printf("\tpredicate -> '/' D-expression '/'\n"); + System.err.printf("\t action -> '{' D-statements '}'\n"); + System.err.printf("\n" + + "\t-32 generate 32-bit D programs\n" + + "\t-64 generate 64-bit D programs\n\n" + + "\t-b set trace buffer size\n" + + "\t-c run specified command and exit upon its completion\n" + + "\t-C run cpp(1) preprocessor on script files\n" + + "\t-D define symbol when invoking preprocessor\n" + + "\t-e exit after compiling request but prior to enabling " + + "probes\n" + + "\t-f enable or list probes matching the specified " + + "function name\n" + + "\t-F coalesce trace output by function\n" + + "\t-i enable or list probes matching the specified probe id\n" + + "\t-I add include directory to preprocessor search path\n" + + "\t-l list probes matching specified criteria\n" + + "\t-L add library directory to library search path\n" + + "\t-m enable or list probes matching the specified " + + "module name\n" + + "\t-n enable or list probes matching the specified probe name\n" + + "\t-o set output file\n" + + "\t-p grab specified process-ID and cache its symbol tables\n" + + "\t-P enable or list probes matching the specified " + + "provider name\n" + + "\t-q set quiet mode (only output explicitly traced data)\n" + + "\t-s enable or list probes according to the specified " + + "D script\n" + + "\t-U undefine symbol when invoking preprocessor\n" + + "\t-v set verbose mode (report stability attributes, " + + "arguments)\n" + + "\t-V report DTrace API version\n" + + "\t-w permit destructive actions\n" + + "\t-x enable or modify compiler and tracing options\n" + + "\t-X specify ISO C conformance settings for preprocessor\n" + + "\t-Z permit probe descriptions that match zero probes\n" + + "\n" + + "\tTo log PrintaRecord, set this environment variable:\n" + + "\t\tJDTRACE_LOGGING_LEVEL=FINE\n" + + "\tTo log ProbeData, set JDTRACE_LOGGING_LEVEL=FINER\n"); + exit(2); + } + + static void + printProgramStability(String programType, String programDescription, + ProgramInfo info) + { + out.println(); + out.printf("Stability data for %s %s:\n\n", + programType, programDescription); + InterfaceAttributes a; + out.println("\tMinimum probe description " + + "attributes"); + a = info.getMinimumProbeAttributes(); + out.printf("\t\tIdentifier Names: %s\n", + a.getNameStability()); + out.printf("\t\tData Semantics: %s\n", + a.getDataStability()); + out.printf("\t\tDependency Class: %s\n", + a.getDependencyClass()); + out.println("\tMinimum probe statement attributes"); + a = info.getMinimumStatementAttributes(); + out.printf("\t\tIdentifier Names: %s\n", + a.getNameStability()); + out.printf("\t\tData Semantics: %s\n", + a.getDataStability()); + out.printf("\t\tDependency Class: %s\n", + a.getDependencyClass()); + } + + static void + printProbeDescription(ProbeDescription p) + { + out.printf("%5d %10s %17s %33s %s\n", p.getID(), + p.getProvider(), p.getModule(), + p.getFunction(), p.getName()); + } + + static void + printProbeInfo(ProbeInfo p) + { + InterfaceAttributes a; + out.println("\n\tProbe Description Attributes"); + + a = p.getProbeAttributes(); + out.printf("\t\tIdentifier Names: %s\n", + a.getNameStability()); + out.printf("\t\tData Semantics: %s\n", + a.getDataStability()); + out.printf("\t\tDependency Class: %s\n", + a.getDependencyClass()); + + out.println("\n\tArgument Attributes"); + + a = p.getArgumentAttributes(); + out.printf("\t\tIdentifier Names: %s\n", + a.getNameStability()); + out.printf("\t\tData Semantics: %s\n", + a.getDataStability()); + out.printf("\t\tDependency Class: %s\n", + a.getDependencyClass()); + + // Argument types unsupported for now. + + out.println(); + } + + public static void + main(String[] args) + { + String loggingLevel = System.getenv().get("JDTRACE_LOGGING_LEVEL"); + try { + logger.setLevel(Level.parse(loggingLevel)); + } catch (Exception e) { + logger.setLevel(Level.OFF); + } + + if (args.length == 0) { + usage(); + } + + List compileRequests = new LinkedList + (); + List programList = new LinkedList (); + boolean verbose = false; + Mode mode = Mode.EXEC; + + final ExceptionHandler exceptionHandler = new ExceptionHandler() { + public void handleException(Throwable e) { + if (e instanceof DTraceException) { + DTraceException de = (DTraceException)e; + System.err.printf("dtrace: %s\n", de.getMessage()); + } else if (e instanceof ConsumerException) { + ConsumerException ce = (ConsumerException)e; + Object msg = ce.getNotificationObject(); + if ((msg instanceof org.opensolaris.os.dtrace.Error) || + (msg instanceof Drop)) { + System.err.printf("dtrace: %s\n", ce.getMessage()); + } else { + ce.printStackTrace(); + } + } else { + e.printStackTrace(); + } + exit(1); + } + }; + + Getopt g = new Getopt(CLASSNAME, args, OPTSTR); + int c = 0; + + List openFlags = + new ArrayList (); + + while ((c = g.getopt()) != -1) { + switch (c) { + case '3': { + String s = g.getOptarg(); + if (!s.equals("2")) { + System.err.println("dtrace: illegal option -- 3" + s); + usage(); + } + openFlags.add(Consumer.OpenFlag.ILP32); + break; + } + case '6': { + String s = g.getOptarg(); + if (!s.equals("4")) { + System.err.println("dtrace: illegal option -- 6" + s); + usage(); + } + openFlags.add(Consumer.OpenFlag.LP64); + break; + } + } + } + + Consumer.OpenFlag[] oflags = new Consumer.OpenFlag[openFlags.size()]; + oflags = openFlags.toArray(oflags); + + dtrace = new LocalConsumer() { + protected Thread createThread() { + Thread t = super.createThread(); + t.setDaemon(false); + t.setPriority(Thread.MIN_PRIORITY); + return t; + } + }; + + g = new Getopt(CLASSNAME, args, OPTSTR); + c = 0; + + try { + dtrace.open(oflags); + + // Set default options that may be overriden by options or #pragma + dtrace.setOption(Option.bufsize, Option.mb(4)); + dtrace.setOption(Option.aggsize, Option.mb(4)); + + CompileRequest r; + while ((c = g.getopt()) != -1) { + switch (c) { + case 'b': + dtrace.setOption(Option.bufsize, g.getOptarg()); + break; + case 'c': + dtrace.createProcess(g.getOptarg()); + break; + case 'C': + dtrace.setOption(Option.cpp); + break; + case 'D': + dtrace.setOption(Option.define, g.getOptarg()); + break; + case 'e': + mode = Mode.INFO; + break; + case 'f': + r = new CompileRequest(); + r.s = g.getOptarg(); + r.type = ProgramType.STRING; + r.probespec = ProbeDescription.Spec.FUNCTION; + compileRequests.add(r); + break; + case 'F': + dtrace.setOption(Option.flowindent); + break; + case 'i': + r = new CompileRequest(); + r.s = g.getOptarg(); + r.type = ProgramType.STRING; + r.probespec = ProbeDescription.Spec.NAME; + compileRequests.add(r); + break; + case 'I': + dtrace.setOption(Option.incdir, g.getOptarg()); + break; + case 'l': + mode = Mode.LIST; + dtrace.setOption(Option.zdefs); // -l implies -Z + break; + case 'L': + dtrace.setOption(Option.libdir, g.getOptarg()); + break; + case 'm': + r = new CompileRequest(); + r.s = g.getOptarg(); + r.type = ProgramType.STRING; + r.probespec = ProbeDescription.Spec.MODULE; + compileRequests.add(r); + break; + case 'n': + r = new CompileRequest(); + r.s = g.getOptarg(); + r.type = ProgramType.STRING; + r.probespec = ProbeDescription.Spec.NAME; + compileRequests.add(r); + break; + case 'o': + String outFileName = g.getOptarg(); + File outFile = new File(outFileName); + try { + FileOutputStream fos = new FileOutputStream( + outFile, true); + out = new PrintStream(fos); + } catch (FileNotFoundException e) { + System.err.println("failed to open " + + outFileName + " in write mode"); + exit(1); + } catch (SecurityException e) { + System.err.println("failed to open " + + outFileName); + exit(1); + } + break; + case 'p': + String pidstr = g.getOptarg(); + int pid = -1; + try { + pid = Integer.parseInt(pidstr); + } catch (NumberFormatException e) { + System.err.println("invalid pid: " + pidstr); + exit(1); + } + dtrace.grabProcess(pid); + break; + case 'P': + r = new CompileRequest(); + r.s = g.getOptarg(); + r.type = ProgramType.STRING; + r.probespec = ProbeDescription.Spec.PROVIDER; + compileRequests.add(r); + break; + case 'q': + dtrace.setOption(Option.quiet); + break; + case 's': + r = new CompileRequest(); + r.s = g.getOptarg(); + r.type = ProgramType.FILE; + compileRequests.add(r); + break; + case 'U': + dtrace.setOption(Option.undef, g.getOptarg()); + break; + case 'v': + verbose = true; + break; + case 'V': + mode = Mode.VERSION; + break; + case 'w': + dtrace.setOption(Option.destructive); + break; + case 'x': + String[] xarg = g.getOptarg().split("=", 2); + if (xarg.length > 1) { + dtrace.setOption(xarg[0], xarg[1]); + } else if (xarg.length == 1) { + dtrace.setOption(xarg[0]); + } + break; + case 'X': + dtrace.setOption(Option.stdc, g.getOptarg()); + break; + case 'Z': + dtrace.setOption(Option.zdefs); + break; + case '?': + usage(); // getopt() already printed an error + break; + default: + System.err.print("getopt() returned " + c + "\n"); + c = 0; + } + } + c = 0; + List argList = new LinkedList (); + for (int i = g.getOptind(); i < args.length; ++i) { + argList.add(args[i]); + } + + if (mode == Mode.VERSION) { + out.printf("dtrace: %s\n", dtrace.getVersion()); + dtrace.close(); + exit(0); + } + + String[] compileArgs = new String[argList.size()]; + compileArgs = argList.toArray(compileArgs); + + Program program; + for (CompileRequest req : compileRequests) { + switch (req.type) { + case STRING: + applyProbespec(req); + program = dtrace.compile(req.s, compileArgs); + break; + case FILE: + File file = new File(req.s); + program = dtrace.compile(file, compileArgs); + break; + default: + throw new IllegalArgumentException( + "Unexpected program type: " + req.type); + } + + programList.add(program); + } + + // Get options set by #pragmas in compiled program + long optval; + quiet = (dtrace.getOption(Option.quiet) != Option.UNSET); + flow = (dtrace.getOption(Option.flowindent) != Option.UNSET); + optval = dtrace.getOption("stackindent"); + if (optval != Option.UNSET) { + stackindent = (int)optval; + } + + if (mode == Mode.LIST) { + out.printf("%5s %10s %17s %33s %s\n", + "ID", "PROVIDER", "MODULE", "FUNCTION", "NAME"); + + if (verbose) { + List > lists = + new LinkedList > (); + for (Program p : programList) { + lists.add(dtrace.listProgramProbeDetail(p)); + } + ProbeDescription p; + ProbeInfo pinfo; + for (List list : lists) { + for (Probe probe : list) { + p = probe.getDescription(); + pinfo = probe.getInfo(); + printProbeDescription(p); + printProbeInfo(pinfo); + } + } + } else { + List > lists = + new LinkedList > (); + for (Program p : programList) { + lists.add(dtrace.listProgramProbes(p)); + } + for (List list : lists) { + for (ProbeDescription p : list) { + printProbeDescription(p); + } + } + } + exit(0); + } + + String programType; + String programDescription; + ProgramInfo info; + for (Program p : programList) { + if (p instanceof Program.File) { + Program.File pf = (Program.File)p; + programType = "script"; + programDescription = pf.getFile().getPath(); + } else { + programType = "description"; + programDescription = + p.getContents().split("[/{;]", 2)[0]; + } + + if (mode == Mode.EXEC) { + dtrace.enable(p); + } else { + dtrace.getProgramInfo(p); + } + info = p.getInfo(); + if ((mode == Mode.EXEC) && !quiet) { + System.err.printf("dtrace: %s '%s' matched %d probe%s\n", + programType, programDescription, + info.getMatchingProbeCount(), + info.getMatchingProbeCount() == 1 ? "" : "s"); + } + if (verbose) { + printProgramStability(programType, + programDescription, info); + } + } + if (mode != Mode.EXEC) { + exit(0); + } + dtrace.addConsumerListener(new ConsumerAdapter() { + public void consumerStarted(ConsumerEvent e) { + started = true; + } + public void consumerStopped(ConsumerEvent e) { + stopped = true; + out.println(); + try { + Aggregate aggregate = dtrace.getAggregate(); + if (aggregate != null) { + printAggregate(aggregate); + } + dtrace.close(); + } catch (Throwable x) { + exceptionHandler.handleException(x); + } + exit(0); + } + public void dataDropped(DropEvent e) { + System.err.printf("dtrace: %s", + e.getDrop().getDefaultMessage()); + } + public void errorEncountered(ErrorEvent e) + throws ConsumerException { + org.opensolaris.os.dtrace.Error error = e.getError(); + if (logger.isLoggable(Level.FINE)) { + logger.fine(error.toString()); + } + System.err.printf("dtrace: %s", + error.getDefaultMessage()); + } + public void dataReceived(DataEvent e) + throws ConsumerException { + consumeProbeData(e.getProbeData()); + } + public void processStateChanged(ProcessEvent e) + throws ConsumerException { + if (logger.isLoggable(Level.FINE)) { + logger.fine(e.getProcessState().toString()); + } + } + }); + // Print unprinted aggregations after Ctrl-C + Runtime.getRuntime().addShutdownHook(new Thread() { + public void run() { + if (stopped || !started) { + return; + } + + try { + Aggregate aggregate = dtrace.getAggregate(); + if (aggregate != null) { + out.println(); + out.println(); + printAggregate(aggregate); + } + } catch (Throwable x) { + exceptionHandler.handleException(x); + } + } + }); + dtrace.go(exceptionHandler); + } catch (DTraceException e) { + if (c > 0) { + // set option error + if (g.getOptarg() == null) { + System.err.printf("dtrace: failed to set -%c: %s\n", + c, e.getMessage()); + } else { + System.err.printf("dtrace: failed to set -%c %s: %s\n", + c, g.getOptarg(), e.getMessage()); + } + } else { + // any other error + System.err.printf("dtrace: %s\n", e.getMessage()); + } + exit(1); + } catch (Exception e) { + e.printStackTrace(); + exit(1); + } + } +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/jdtrace/Makefile b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/jdtrace/Makefile new file mode 100644 index 00000000..99a571be --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/jdtrace/Makefile @@ -0,0 +1,109 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" + +PROG = jdtrace +SRCS = jdtrace.c + +include $(SRC)/cmd/Makefile.cmd + +ROOTOPTPKG = $(ROOT)/opt/SUNWdtrt +ROOTBIN = $(ROOTOPTPKG)/bin +ROOTLIB = $(ROOTOPTPKG)/lib +ROOTLIBJAVA = $(ROOTLIB)/java + +# Use the proto dtrace.jar if it exists, otherwise use whatever is +# installed on the system. It should be possible to build +# usr/src/cmd/dtrace/test independently, even if only on systems that +# have a compatible dtrace.jar installed. +DTRACE_JAR=usr/share/lib/java/dtrace.jar +PROTO_DTRACE_JAR=$(ROOT)/$(DTRACE_JAR) +INSTALLED_DTRACE_JAR=/$(DTRACE_JAR) +CLASSPATH=$(PROTO_DTRACE_JAR):$(INSTALLED_DTRACE_JAR) +DTEST_DIR=$(SRC)/cmd/dtrace/test +CLASSDIR=classes +LIBDIR=lib +MANIFESTDIR=manifest +MANIFEST=$(MANIFESTDIR)/jdtrace.jar-manifest +JDTRACE_JAR=$(LIBDIR)/jdtrace.jar + +PROTO_JDTRACE_JAR=$(ROOTLIBJAVA)/jdtrace.jar +CMD = $(ROOTBIN)/jdtrace +XLIST = $(ROOTBIN)/exception.lst + +$(PROTO_JDTRACE_JAR) := FILEMODE = 0644 +$(CMD) := FILEMODE = 0555 +$(XLIST) := FILEMODE = 0444 + +all: $(JDTRACE_JAR) $(PROG) + +clean: + -$(RM) $(CLASSDIR)/*.class + +clobber: clean + -$(RM) $(JDTRACE_JAR) + -$(RM) $(PROG) + +lint: + +install: all $(PROTO_JDTRACE_JAR) $(CMD) $(XLIST) + +$(PROG): $(SRCS) + $(LINK.c) -o $@ $(SRCS) $(LDLIBS) + $(POST_PROCESS) ; $(STRIP_STABS) + +JFLAGS= -g -cp $(CLASSPATH) -d $(CLASSDIR) -deprecation +JFLAGS += -target 1.5 +JFLAGS += -Xlint +COMPILE.java=$(JAVAC) $(JFLAGS) +JAVASRC= JDTrace.java Getopt.java + +$(JDTRACE_JAR): $(JAVASRC) + @mkdir -p $(CLASSDIR) + @mkdir -p $(LIBDIR) + $(COMPILE.java) $(JAVASRC) + $(JAR) -cmf $(MANIFEST) $(JDTRACE_JAR) -C $(CLASSDIR) . + +$(PROTO_JDTRACE_JAR): $(ROOTLIBJAVA) + +$(CMD): $(ROOTBIN) + +$(XLIST): $(ROOTBIN) + +$(ROOTBIN): + $(INS.dir) + +$(ROOTLIB): + $(INS.dir) + +$(ROOTLIBJAVA): $(ROOTLIB) + $(INS.dir) + +$(ROOTLIBJAVA)/%.jar: $(LIBDIR)/%.jar + $(INS.file) + +$(ROOTBIN)/%: % + $(INS.file) diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/jdtrace/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/jdtrace/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/jdtrace/exception.lst b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/jdtrace/exception.lst new file mode 100644 index 00000000..261f8707 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/jdtrace/exception.lst @@ -0,0 +1,77 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" + +# Exception list: names tests that are bypassed when running in Java +# mode (relative to /opt/SUNWdtrt/tst) + +# double precision (64-bit floating point) not same in java +common/aggs/tst.neglquant.d +common/aggs/tst.negquant.d + +# freopen() (to suppress output) not supported by Java DTrace API +common/printa/tst.walltimestamp.ksh + +# -G option not supported by jdtrace +common/dtraceUtil/tst.ELFGenerationOut.d.ksh +common/dtraceUtil/tst.ELFGenerationWithO.d.ksh + +# -H option not supported by jdtrace +common/dtraceUtil/tst.PreprocessorStatement.d.ksh + +# -G and -h options not supported by jdtrace +common/usdt/tst.badguess.ksh +common/usdt/tst.dlclose1.ksh +common/usdt/tst.dlclose2.ksh +common/usdt/tst.dlclose3.ksh +common/usdt/tst.eliminate.ksh +common/usdt/tst.enabled.ksh +common/usdt/tst.enabled2.ksh +common/usdt/tst.entryreturn.ksh +common/usdt/tst.fork.ksh +common/usdt/tst.header.ksh +common/usdt/tst.guess32.ksh +common/usdt/tst.guess64.ksh +common/usdt/tst.linkpriv.ksh +common/usdt/tst.linkunpriv.ksh +common/usdt/tst.multiple.ksh +common/usdt/tst.nodtrace.ksh +common/usdt/tst.onlyenabled.ksh +common/usdt/tst.reeval.ksh +common/usdt/tst.static.ksh +common/usdt/tst.static2.ksh +common/usdt/tst.user.ksh +sparc/usdt/tst.tailcall.ksh +common/pid/tst.provregex3.ksh +common/pid/tst.provregex4.ksh + +# freopen() and ftruncate() not supported by Java DTrace API +common/funcs/tst.badfreopen.ksh +common/funcs/tst.freopen.ksh +common/funcs/tst.ftruncate.ksh + +# jdtrace doesn't pull in library files? +common/pragma/tst.libdepfullyconnected.ksh diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/jdtrace/jdtrace.c b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/jdtrace/jdtrace.c new file mode 100644 index 00000000..09512656 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/jdtrace/jdtrace.c @@ -0,0 +1,60 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#include +#include +#include +#include + +int +main(int argc, char **argv) +{ + int i, ac, has64; + char **av, **p; + + ac = argc + 3; + av = p = alloca(sizeof (char *) * ac); + + *p++ = "java"; + *p++ = "-jar"; + *p++ = "/opt/SUNWdtrt/lib/java/jdtrace.jar"; + + argc--; + argv++; + + for (i = 0; i < argc; i++) { + p[i] = argv[i]; + } + p[i] = NULL; + + (void) execvp(av[0], av); + + perror("exec failed"); + + return (0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/jdtrace/manifest/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/jdtrace/manifest/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/jdtrace/manifest/jdtrace.jar-manifest b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/jdtrace/manifest/jdtrace.jar-manifest new file mode 100644 index 00000000..323c4a4c --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/jdtrace/manifest/jdtrace.jar-manifest @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Main-Class: JDTrace +Class-Path: /usr/share/lib/java/dtrace.jar diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/scripts/Makefile b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/scripts/Makefile new file mode 100644 index 00000000..0a7b167c --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/scripts/Makefile @@ -0,0 +1,56 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +#ident "%Z%%M% %I% %E% SMI" + +include $(SRC)/Makefile.master + +.KEEP_STATE: + +ROOTOPTPKG = $(ROOT)/opt/SUNWdtrt +ROOTBIN = $(ROOTOPTPKG)/bin + +SRCS = dtest itest dstyle +CMDS = $(SRCS:%=$(ROOTBIN)/%) + +$(CMDS) := FILEMODE = 0555 + +all clean clobber lint: + +install: $(CMDS) + +$(CMDS): $(ROOTBIN) + +$(ROOTBIN): + $(INS.dir) + +$(ROOTBIN)/%: %.pl + $(INS.rename) + +$(ROOTBIN)/%: %.sh + $(INS.rename) + +$(ROOTBIN)/%: %.ksh + $(INS.rename) diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/scripts/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/scripts/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/scripts/dstyle.pl b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/scripts/dstyle.pl new file mode 100755 index 00000000..c1075a36 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/scripts/dstyle.pl @@ -0,0 +1,235 @@ +#!/usr/perl5/bin/perl +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +require 5.8.4; + +$PNAME = $0; +$PNAME =~ s:.*/::; +$USAGE = "Usage: $PNAME [file ...]\n"; +$errs = 0; + +sub err +{ + my($msg) = @_; + + print "$file: $lineno: $msg\n"; + $errs++; +} + +sub dstyle +{ + open(FILE, "$file"); + $lineno = 0; + $inclause = 0; + $skipnext = 0; + + while () { + $lineno++; + + chop; + + if ($skipnext) { + $skipnext = 0; + next; + } + + # + # Amazingly, some ident strings are longer than 80 characters! + # + if (/^#pragma ident/) { + next; + } + + # + # The algorithm to calculate line length from cstyle. + # + $line = $_; + if ($line =~ tr/\t/\t/ * 7 + length($line) > 80) { + # yes, there is a chance. + # replace tabs with spaces and check again. + $eline = $line; + 1 while $eline =~ + s/\t+/' ' x (length($&) * 8 - length($`) % 8)/e; + + if (length($eline) > 80) { + err "line > 80 characters"; + } + } + + if (/\/\*DSTYLED\*\//) { + $skipnext = 1; + next; + } + + if (/^#pragma/) { + next; + } + + if (/^#include/) { + next; + } + + # + # Before we do any more analysis, we want to prune out any + # quoted strings. This is a bit tricky because we need + # to be careful of backslashed quotes within quoted strings. + # I'm sure there is a very crafty way to do this with a + # single regular expression, but that will have to wait for + # somone with better regex juju that I; we do this by first + # eliminating the backslashed quotes, and then eliminating + # whatever quoted strings are left. Note that we eliminate + # the string by replacing it with "quotedstr"; this is to + # allow lines to end with a quoted string. (If we simply + # eliminated the quoted string, dstyle might complain about + # the line ending in a space or tab.) + # + s/\\\"//g; + s/\"[^\"]*\"/quotedstr/g; + + if (/[ \t]$/) { + err "space or tab at end of line"; + } + + if (/^[\t]+[ ]+[\t]+/) { + err "spaces between tabs"; + } + + if (/^[\t]* \*/) { + next; + } + + if (/^ /) { + err "indented by spaces not tabs"; + } + + if (/^{}$/) { + next; + } + + if (!/^enum/ && !/^\t*struct/ && !/^\t*union/ && !/^typedef/ && + !/^translator/ && !/^provider/) { + if (/[\w\s]+{/) { + err "left brace not on its own line"; + } + + if (/{[\w\s]+/) { + err "left brace not on its own line"; + } + } + + if (!/;$/) { + if (/[\w\s]+}/) { + err "right brace not on its own line"; + } + + if (/}[\w\s]+/) { + err "right brace not on its own line"; + } + } + + if (/^}/) { + $inclause = 0; + } + + if (!$inclause && /^[\w ]+\//) { + err "predicate not at beginning of line"; + } + + if (!$inclause && /^\/[ \t]+\w/) { + err "space between '/' and expression in predicate"; + } + + if (!$inclause && /\w[ \t]+\/$/) { + err "space between expression and '/' in predicate"; + } + + if (!$inclause && /\s,/) { + err "space before comma in probe description"; + } + + if (!$inclause && /\w,[\w\s]/ && !/;$/) { + if (!/extern/ && !/\(/ && !/inline/) { + err "multiple probe descriptions on same line"; + } + } + + if ($inclause && /sizeof\(/) { + err "missing space after sizeof"; + } + + if ($inclause && /^[\w ]/) { + err "line doesn't begin with a tab"; + } + + if ($inclause && /,[\w]/) { + err "comma without trailing space"; + } + + if (/\w&&/ || /&&\w/ || /\w\|\|/ || /\|\|\w/) { + err "logical operator not set off with spaces"; + } + + # + # We want to catch "i<0" variants, but we don't want to + # erroneously flag translators. + # + if (!/\w<\w+>\(/) { + if (/\w>/ || / >\w/ || /\w=\w/ || /\w!=/ || /!=\w/) { + err "comparison operator not set off with spaces"; + } + + if (/\w=/ || /=\w/) { + err "assignment operator not set off with spaces"; + } + + if (/^{/) { + $inclause = 1; + } + } +} + +foreach $arg (@ARGV) { + if (-f $arg) { + push(@files, $arg); + } else { + die "$PNAME: $arg is not a valid file\n"; + } +} + +die $USAGE if (scalar(@files) == 0); + +foreach $file (@files) { + dstyle($file); +} + +exit($errs != 0); diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/scripts/dtest.pl b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/scripts/dtest.pl new file mode 100755 index 00000000..3f244295 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/cmd/scripts/dtest.pl @@ -0,0 +1,704 @@ +#!/usr/perl5/bin/perl +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +require 5.8.4; + +use File::Find; +use File::Basename; +use Getopt::Std; +use Cwd; +use Cwd 'abs_path'; + +$PNAME = $0; +$PNAME =~ s:.*/::; +$OPTSTR = 'abd:fghi:jlnqsx:'; +$USAGE = "Usage: $PNAME [-abfghjlnqs] [-d dir] [-i isa] " + . "[-x opt[=arg]] [file | dir ...]\n"; +($MACH = `uname -p`) =~ s/\W*\n//; +($PLATFORM = `uname -i`) =~ s/\W*\n//; + +@dtrace_argv = (); + +$ksh_path = '/usr/bin/ksh'; + +@files = (); +%exceptions = (); +%results = (); +$errs = 0; + +# +# If no test files are specified on the command-line, execute a find on "." +# and append any tst.*.d, tst.*.ksh, err.*.d or drp.*.d files found within +# the directory tree. +# +sub wanted +{ + push(@files, $File::Find::name) + if ($_ =~ /^(tst|err|drp)\..+\.(d|ksh)$/ && -f "$_"); +} + +sub dirname { + my($s) = @_; + my($i); + + $s = substr($s, 0, $i) if (($i = rindex($s, '/')) != -1); + return $i == -1 ? '.' : $i == 0 ? '/' : $s; +} + +sub usage +{ + print $USAGE; + print "\t -a execute test suite using anonymous enablings\n"; + print "\t -b execute bad ioctl test program\n"; + print "\t -d specify directory for test results files and cores\n"; + print "\t -g enable libumem debugging when running tests\n"; + print "\t -f force bypassed tests to run\n"; + print "\t -h display verbose usage message\n"; + print "\t -i specify ISA to test instead of isaexec(3C) default\n"; + print "\t -j execute test suite using jdtrace (Java API) only\n"; + print "\t -l save log file of results and PIDs used by tests\n"; + print "\t -n execute test suite using dtrace(1m) only\n"; + print "\t -q set quiet mode (only report errors and summary)\n"; + print "\t -s save results files even for tests that pass\n"; + print "\t -x pass corresponding -x argument to dtrace(1M)\n"; + exit(2); +} + +sub errmsg +{ + my($msg) = @_; + + print STDERR $msg; + print LOG $msg if ($opt_l); + $errs++; +} + +sub fail +{ + my(@parms) = @_; + my($msg) = $parms[0]; + my($errfile) = $parms[1]; + my($n) = 0; + my($dest) = basename($file); + + while (-d "$opt_d/failure.$n") { + $n++; + } + + unless (mkdir "$opt_d/failure.$n") { + warn "ERROR: failed to make directory $opt_d/failure.$n: $!\n"; + exit(125); + } + + open(README, ">$opt_d/failure.$n/README"); + print README "ERROR: " . $file . " " . $msg; + + if (scalar @parms > 1) { + print README "; see $errfile\n"; + } else { + if (-f "$opt_d/$pid.core") { + print README "; see $pid.core\n"; + } else { + print README "\n"; + } + } + + close(README); + + if (-f "$opt_d/$pid.out") { + rename("$opt_d/$pid.out", "$opt_d/failure.$n/$pid.out"); + link("$file.out", "$opt_d/failure.$n/$dest.out"); + } + + if (-f "$opt_d/$pid.err") { + rename("$opt_d/$pid.err", "$opt_d/failure.$n/$pid.err"); + link("$file.err", "$opt_d/failure.$n/$dest.err"); + } + + if (-f "$opt_d/$pid.core") { + rename("$opt_d/$pid.core", "$opt_d/failure.$n/$pid.core"); + } + + link("$file", "$opt_d/failure.$n/$dest"); + + $msg = "ERROR: " . $dest . " " . $msg; + + if (scalar @parms > 1) { + $msg = $msg . "; see $errfile in failure.$n\n"; + } else { + $msg = $msg . "; details in failure.$n\n"; + } + + errmsg($msg); +} + +sub logmsg +{ + my($msg) = @_; + + print STDOUT $msg unless ($opt_q); + print LOG $msg if ($opt_l); +} + +# Trim leading and trailing whitespace +sub trim { + my($s) = @_; + + $s =~ s/^\s*//; + $s =~ s/\s*$//; + return $s; +} + +# Load exception set of skipped tests from the file at the given +# pathname. The test names are assumed to be paths relative to $dt_tst, +# for example: common/aggs/tst.neglquant.d, and specify tests to be +# skipped. +sub load_exceptions { + my($listfile) = @_; + my($line) = ""; + + %exceptions = (); + if (length($listfile) > 0) { + exit(123) unless open(STDIN, "<$listfile"); + while () { + chomp; + $line = $_; + # line is non-empty and not a comment + if ((length($line) > 0) && ($line =~ /^\s*[^\s#]/ )) { + $exceptions{trim($line)} = 1; + } + } + } +} + +# Return 1 if the test is found in the exception set, 0 otherwise. +sub is_exception { + my($file) = @_; + my($i) = -1; + + if (scalar(keys(%exceptions)) == 0) { + return 0; + } + + # hash absolute pathname after $dt_tst/ + $file = abs_path($file); + $i = index($file, $dt_tst); + if ($i == 0) { + $file = substr($file, length($dt_tst) + 1); + return $exceptions{$file}; + } + return 0; +} + +# +# Iterate over the set of test files specified on the command-line or by a find +# on "$defdir/common", "$defdir/$MACH" and "$defdir/$PLATFORM" and execute each +# one. If the test file is executable, we fork and exec it. If the test is a +# .ksh file, we run it with $ksh_path. Otherwise we run dtrace -s on it. If +# the file is named tst.* we assume it should return exit status 0. If the +# file is named err.* we assume it should return exit status 1. If the file is +# named err.D_[A-Z0-9]+[.*].d we use dtrace -xerrtags and examine stderr to +# ensure that a matching error tag was produced. If the file is named +# drp.[A-Z0-9]+[.*].d we use dtrace -xdroptags and examine stderr to ensure +# that a matching drop tag was produced. If any *.out or *.err files are found +# we perform output comparisons. +# +# run_tests takes two arguments: The first is the pathname of the dtrace +# command to invoke when running the tests. The second is the pathname +# of a file (may be the empty string) listing tests that ought to be +# skipped (skipped tests are listed as paths relative to $dt_tst, for +# example: common/aggs/tst.neglquant.d). +# +sub run_tests { + my($dtrace, $exceptions_path) = @_; + my($passed) = 0; + my($bypassed) = 0; + my($failed) = $errs; + my($total) = 0; + + die "$PNAME: $dtrace not found\n" unless (-x "$dtrace"); + logmsg($dtrace . "\n"); + + load_exceptions($exceptions_path); + + foreach $file (sort @files) { + $file =~ m:.*/((.*)\.(\w+)):; + $name = $1; + $base = $2; + $ext = $3; + + $dir = dirname($file); + $isksh = 0; + $tag = 0; + $droptag = 0; + + if ($name =~ /^tst\./) { + $isksh = ($ext eq 'ksh'); + $status = 0; + } elsif ($name =~ /^err\.(D_[A-Z0-9_]+)\./) { + $status = 1; + $tag = $1; + } elsif ($name =~ /^err\./) { + $status = 1; + } elsif ($name =~ /^drp\.([A-Z0-9_]+)\./) { + $status = 0; + $droptag = $1; + } else { + errmsg("ERROR: $file is not a valid test file name\n"); + next; + } + + $fullname = "$dir/$name"; + $exe = "$dir/$base.exe"; + $exe_pid = -1; + + if ($opt_a && ($status != 0 || $tag != 0 || $droptag != 0 || + -x $exe || $isksh || -x $fullname)) { + $bypassed++; + next; + } + + if (!$opt_f && is_exception("$dir/$name")) { + $bypassed++; + next; + } + + if (!$isksh && -x $exe) { + if (($exe_pid = fork()) == -1) { + errmsg( + "ERROR: failed to fork to run $exe: $!\n"); + next; + } + + if ($exe_pid == 0) { + open(STDIN, '$opt_d/$$.out"); + exit(125) unless open(STDERR, ">$opt_d/$$.err"); + + unless (chdir($dir)) { + warn "ERROR: failed to chdir for $file: $!\n"; + exit(126); + } + + push(@dtrace_argv, '-xerrtags') if ($tag); + push(@dtrace_argv, '-xdroptags') if ($droptag); + push(@dtrace_argv, $exe_pid) if ($exe_pid != -1); + + if ($isksh) { + exit(123) unless open(STDIN, "<$name"); + exec("$ksh_path /dev/stdin $dtrace"); + } elsif (-x $name) { + warn "ERROR: $name is executable\n"; + exit(1); + } else { + if ($tag == 0 && $status == $0 && $opt_a) { + push(@dtrace_argv, '-A'); + } + + push(@dtrace_argv, '-C'); + push(@dtrace_argv, '-s'); + push(@dtrace_argv, $name); + exec($dtrace, @dtrace_argv); + } + + warn "ERROR: failed to exec for $file: $!\n"; + exit(127); + } + + if (waitpid($pid, 0) == -1) { + errmsg("ERROR: timed out waiting for $file\n"); + kill(9, $exe_pid) if ($exe_pid != -1); + kill(9, $pid); + next; + } + + kill(9, $exe_pid) if ($exe_pid != -1); + + if ($tag == 0 && $status == $0 && $opt_a) { + # + # We can chuck the earler output. + # + unlink($pid . '.out'); + unlink($pid . '.err'); + + # + # This is an anonymous enabling. We need to get + # the module unloaded. + # + system("dtrace -ae 1> /dev/null 2> /dev/null"); + system("svcadm disable -s " . + "svc:/network/nfs/mapid:default"); + system("modunload -i 0 ; modunload -i 0 ; " . + "modunload -i 0"); + if (!system("modinfo | grep dtrace")) { + warn "ERROR: couldn't unload dtrace\n"; + system("svcadm enable " . + "-s svc:/network/nfs/mapid:default"); + exit(124); + } + + # + # DTrace is gone. Now update_drv(1M), and rip + # everything out again. + # + system("update_drv dtrace"); + system("dtrace -ae 1> /dev/null 2> /dev/null"); + system("modunload -i 0 ; modunload -i 0 ; " . + "modunload -i 0"); + if (!system("modinfo | grep dtrace")) { + warn "ERROR: couldn't unload dtrace\n"; + system("svcadm enable " . + "-s svc:/network/nfs/mapid:default"); + exit(124); + } + + # + # Now bring DTrace back in. + # + system("sync ; sync"); + system("dtrace -l -n bogusprobe 1> /dev/null " . + "2> /dev/null"); + system("svcadm enable -s " . + "svc:/network/nfs/mapid:default"); + + # + # That should have caused DTrace to reload with + # the new configuration file. Now we can try to + # snag our anonymous state. + # + if (($pid = fork()) == -1) { + errmsg("ERROR: failed to fork to run " . + "test $file: $!\n"); + next; + } + + if ($pid == 0) { + open(STDIN, '$opt_d/$$.out"); + exit(125) unless open(STDERR, ">$opt_d/$$.err"); + + push(@dtrace_argv, '-a'); + + unless (chdir($dir)) { + warn "ERROR: failed to chdir " . + "for $file: $!\n"; + exit(126); + } + + exec($dtrace, @dtrace_argv); + warn "ERROR: failed to exec for $file: $!\n"; + exit(127); + } + + if (waitpid($pid, 0) == -1) { + errmsg("ERROR: timed out waiting for $file\n"); + kill(9, $pid); + next; + } + } + + logmsg("[$pid]\n"); + $wstat = $?; + $wifexited = ($wstat & 0xFF) == 0; + $wexitstat = ($wstat >> 8) & 0xFF; + $wtermsig = ($wstat & 0x7F); + + if (!$wifexited) { + fail("died from signal $wtermsig"); + next; + } + + if ($wexitstat == 125) { + die "$PNAME: failed to create output file in $opt_d " . + "(cd elsewhere or use -d)\n"; + } + + if ($wexitstat != $status) { + fail("returned $wexitstat instead of $status"); + next; + } + + if (-f "$file.out" && + system("cmp -s $file.out $opt_d/$pid.out") != 0) { + fail("stdout mismatch", "$pid.out"); + next; + } + + if (-f "$file.err" && + system("cmp -s $file.err $opt_d/$pid.err") != 0) { + fail("stderr mismatch: see $pid.err"); + next; + } + + if ($tag) { + open(TSTERR, "<$opt_d/$pid.err"); + $tsterr = ; + close(TSTERR); + + unless ($tsterr =~ /: \[$tag\] line \d+:/) { + fail("errtag mismatch: see $pid.err"); + next; + } + } + + if ($droptag) { + $found = 0; + open(TSTERR, "<$opt_d/$pid.err"); + + while () { + if (/\[$droptag\] /) { + $found = 1; + last; + } + } + + close (TSTERR); + + unless ($found) { + fail("droptag mismatch: see $pid.err"); + next; + } + } + + unless ($opt_s) { + unlink($pid . '.out'); + unlink($pid . '.err'); + } + } + + if ($opt_a) { + # + # If we're running with anonymous enablings, we need to + # restore the .conf file. + # + system("dtrace -A 1> /dev/null 2> /dev/null"); + system("dtrace -ae 1> /dev/null 2> /dev/null"); + system("modunload -i 0 ; modunload -i 0 ; modunload -i 0"); + system("update_drv dtrace"); + } + + $total = scalar(@files); + $failed = $errs - $failed; + $passed = ($total - $failed - $bypassed); + $results{$dtrace} = { + "passed" => $passed, + "bypassed" => $bypassed, + "failed" => $failed, + "total" => $total + }; +} + +die $USAGE unless (getopts($OPTSTR)); +usage() if ($opt_h); + +foreach $arg (@ARGV) { + if (-f $arg) { + push(@files, $arg); + } elsif (-d $arg) { + find(\&wanted, $arg); + } else { + die "$PNAME: $arg is not a valid file or directory\n"; + } +} + +$dt_tst = '/opt/SUNWdtrt/tst'; +$dt_bin = '/opt/SUNWdtrt/bin'; +$defdir = -d $dt_tst ? $dt_tst : '.'; +$bindir = -d $dt_bin ? $dt_bin : '.'; + +find(\&wanted, "$defdir/common") if (scalar(@ARGV) == 0); +find(\&wanted, "$defdir/$MACH") if (scalar(@ARGV) == 0); +find(\&wanted, "$defdir/$PLATFORM") if (scalar(@ARGV) == 0); +die $USAGE if (scalar(@files) == 0); + +$dtrace_path = '/usr/sbin/dtrace'; +$jdtrace_path = "$bindir/jdtrace"; + +%exception_lists = ("$jdtrace_path" => "$bindir/exception.lst"); + +if ($opt_j || $opt_n || $opt_i) { + @dtrace_cmds = (); + push(@dtrace_cmds, $dtrace_path) if ($opt_n); + push(@dtrace_cmds, $jdtrace_path) if ($opt_j); + push(@dtrace_cmds, "/usr/sbin/$opt_i/dtrace") if ($opt_i); +} else { + @dtrace_cmds = ($dtrace_path, $jdtrace_path); +} + +if ($opt_d) { + die "$PNAME: -d arg must be absolute path\n" unless ($opt_d =~ /^\//); + die "$PNAME: -d arg $opt_d is not a directory\n" unless (-d "$opt_d"); + system("coreadm -p $opt_d/%p.core"); +} else { + my $dir = getcwd; + system("coreadm -p $dir/%p.core"); + $opt_d = '.'; +} + +if ($opt_x) { + push(@dtrace_argv, '-x'); + push(@dtrace_argv, $opt_x); +} + +die "$PNAME: failed to open $PNAME.$$.log: $!\n" + unless (!$opt_l || open(LOG, ">$PNAME.$$.log")); + +if ($opt_g) { + $ENV{'UMEM_DEBUG'} = 'default,verbose'; + $ENV{'UMEM_LOGGING'} = 'fail,contents'; + $ENV{'LD_PRELOAD'} = 'libumem.so'; +} + +# +# Ensure that $PATH contains a cc(1) so that we can execute the +# test programs that require compilation of C code. +# +$ENV{'PATH'} = $ENV{'PATH'} . ':/ws/onnv-tools/SUNWspro/SS11/bin'; + +if ($opt_b) { + logmsg("badioctl'ing ... "); + + if (($badioctl = fork()) == -1) { + errmsg("ERROR: failed to fork to run badioctl: $!\n"); + next; + } + + if ($badioctl == 0) { + open(STDIN, '$opt_d/$$.out"); + exit(125) unless open(STDERR, ">$opt_d/$$.err"); + + exec($bindir . "/badioctl"); + warn "ERROR: failed to exec badioctl: $!\n"; + exit(127); + } + + + logmsg("[$badioctl]\n"); + + # + # If we're going to be bad, we're just going to iterate over each + # test file. + # + foreach $file (sort @files) { + ($name = $file) =~ s:.*/::; + $dir = dirname($file); + + if (!($name =~ /^tst\./ && $name =~ /\.d$/)) { + next; + } + + logmsg("baddof'ing $file ... "); + + if (($pid = fork()) == -1) { + errmsg("ERROR: failed to fork to run baddof: $!\n"); + next; + } + + if ($pid == 0) { + open(STDIN, '$opt_d/$$.out"); + exit(125) unless open(STDERR, ">$opt_d/$$.err"); + + unless (chdir($dir)) { + warn "ERROR: failed to chdir for $file: $!\n"; + exit(126); + } + + exec($bindir . "/baddof", $name); + + warn "ERROR: failed to exec for $file: $!\n"; + exit(127); + } + + sleep 60; + kill(9, $pid); + waitpid($pid, 0); + + logmsg("[$pid]\n"); + + unless ($opt_s) { + unlink($pid . '.out'); + unlink($pid . '.err'); + } + } + + kill(9, $badioctl); + waitpid($badioctl, 0); + + unless ($opt_s) { + unlink($badioctl . '.out'); + unlink($badioctl . '.err'); + } + + exit(0); +} + +# +# Run all the tests specified on the command-line (the entire test suite +# by default) once for each dtrace command tested, skipping any tests +# not valid for that command. +# +foreach $dtrace_cmd (@dtrace_cmds) { + run_tests($dtrace_cmd, $exception_lists{$dtrace_cmd}); +} + +$opt_q = 0; # force final summary to appear regardless of -q option + +logmsg("\n==== TEST RESULTS ====\n"); +foreach $key (keys %results) { + my $passed = $results{$key}{"passed"}; + my $bypassed = $results{$key}{"bypassed"}; + my $failed = $results{$key}{"failed"}; + my $total = $results{$key}{"total"}; + + logmsg("\n mode: " . $key . "\n"); + logmsg(" passed: " . $passed . "\n"); + if ($bypassed) { + logmsg(" bypassed: " . $bypassed . "\n"); + } + logmsg(" failed: " . $failed . "\n"); + logmsg(" total: " . $total . "\n"); +} + +exit($errs != 0); diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/Makefile b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/Makefile new file mode 100644 index 00000000..27c9c699 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/Makefile @@ -0,0 +1,39 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +#ident "%Z%%M% %I% %E% SMI" + +include $(SRC)/Makefile.master + +SUBDIRS= common $(MACH:i386=i386 i86xpv) +include ../Makefile.subdirs + +dstyle := TARGET += dstyle + +check: FRC + @$(ECHO) "checking dstyle" + @$(MAKE) dstyle + +dstyle: $(SUBDIRS) diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/Makefile.com b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/Makefile.com new file mode 100644 index 00000000..a23b8d65 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/Makefile.com @@ -0,0 +1,104 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# + +include $(SRC)/cmd/Makefile.cmd + +.KEEP_STATE: + +ROOTOPTPKG = $(ROOT)/opt/SUNWdtrt +ROOTTST = $(ROOTOPTPKG)/tst +SUBDIR :sh= basename `pwd` +TSTDIR = $(ROOTTST)/$(SUBDIR) +DSTYLE = $(ROOTOPTPKG)/bin/dstyle + +CSRCS :sh= find . -name SCCS -prune -o -name *.c -print | cut -b3- +SSRCS :sh= find . -name SCCS -prune -o -name *.s -print | cut -b3- +DSRCS :sh= find . -name SCCS -prune -o -name *.d -print | cut -b3- + +TSTS :sh= find . -name tst.*.d -o -name err.*.d -o \ + -name tst.*.d.out -o -name err.*.d.out -o -name tst.*.ksh \ + -o -name err.*.ksh -o -name tst.*.ksh.out -o -name drp.*.d \ + -o -name get.*.pl + +EXES :sh= find . -name SCCS -prune -o \( -name *.exe -o -name \*.pl \) -print \ + | cut -b3- +EXES += $(CSRCS:%.c=%.exe) +EXES += $(SSRCS:%.s=%.exe) + +ROOT_TSTS = $(TSTS:%=$(TSTDIR)/%) +ROOT_EXES = $(EXES:%=$(TSTDIR)/%) + +$(ROOT_TSTS) := FILEMODE = 0444 +$(ROOT_EXES) := FILEMODE = 0555 + +all: $(EXES) + +clean lint: + +clobber: FRC + -$(RM) $(CSRCS:%.c=%.exe) $(CSRCS:%.c=%.o) + -$(RM) $(SSRCS:%.s=%.exe) $(SSRCS:%.s=%.o) + -$(RM) $(DSRCS:%.d=%.o) + -$(RM) $(CLOBBERFILES) + +install: $(ROOT_TSTS) $(ROOT_EXES) + +$(ROOT_TSTS): $(TSTDIR) + +$(ROOT_EXES): $(TSTDIR) + +$(TSTDIR): + $(INS.dir) + +$(TSTDIR)/%: % + $(INS) -s -d -m $(DIRMODE) $(@D) + $(INS.file) + +%.exe: %.c + $(LINK.c) -o $@ $< $(LDLIBS) + $(POST_PROCESS) ; $(STRIP_STABS) + +%.exe: %.o + $(LINK.c) -o $@ $< $(LDLIBS) + $(POST_PROCESS) ; $(STRIP_STABS) + +%.o: %.c + $(COMPILE.c) -o $@ $< + $(POST_PROCESS_O) + +%.o: %.s + $(COMPILE.s) -o $@ $< + $(POST_PROCESS_O) + +scripts: FRC + @cd ../cmd/scripts; pwd; $(MAKE) install + +dstyle: FRC + @if [ -n "$(DSRCS)" ]; then $(DSTYLE) $(DSRCS); fi + +FRC: diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/Makefile b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/Makefile new file mode 100644 index 00000000..065124ad --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/Makefile @@ -0,0 +1,101 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# + +include $(SRC)/Makefile.master +include ../Makefile.com + +SNOOPDIR = $(SRC)/cmd/cmd-inet/usr.sbin/snoop +SNOOPOBJS = nfs4_xdr.o +SNOOPSRCS = ${SNOOPOBJS:%.o=%.c} +CLOBBERFILES += nfs/$(SNOOPOBJS) + +RPCSVCDIR = $(SRC)/head/rpcsvc +RPCSVCOBJS = nfs_prot.o +RPCSVCSRCS = ${RPCSVCOBJS:%o=%c} +CLOBBERFILES += nfs/$(RPCSVCOBJS) $(RPCSVCDIR)/$(RPCSVCSRCS) + +fasttrap/tst.fasttrap.exe := LDLIBS += -ldtrace +fasttrap/tst.stack.exe := LDLIBS += -ldtrace + +sysevent/tst.post.exe := LDLIBS += -lsysevent +sysevent/tst.post_chan.exe := LDLIBS += -lsysevent + +ustack/tst.bigstack.exe := COPTFLAG += -xO1 + +GCC = $(ONBLD_TOOLS)/bin/$(MACH)/cw -_gcc + +nfs/%.o: $(SNOOPDIR)/%.c + $(COMPILE.c) -o $@ $< -I$(SNOOPDIR) + $(POST_PROCESS_O) +nfs/tst.call.exe: nfs/tst.call.o nfs/$(SNOOPOBJS) + $(LINK.c) -o $@ nfs/tst.call.o nfs/$(SNOOPOBJS) $(LDLIBS) -lnsl + $(POST_PROCESS) ; $(STRIP_STABS) +$(RPCSVCDIR)/%.c: $(RPCSVCDIR)/%.x + $(RPCGEN) -Cc $< > $@ +nfs/$(RPCSVCOBJS): $(RPCSVCDIR)/$(RPCSVCSRCS) + $(COMPILE.c) -o $@ $(RPCSVCDIR)/$(RPCSVCSRCS) + $(POST_PROCESS_O) +nfs/tst.call3.exe: nfs/tst.call3.o nfs/$(RPCSVCOBJS) + $(LINK.c) -o $@ nfs/tst.call3.o nfs/$(RPCSVCOBJS) \ + $(LDLIBS) -lnsl -lrpcsvc + $(POST_PROCESS) ; $(STRIP_STABS) + +pid/tst.gcc.exe: pid/tst.gcc.c + $(GCC) -o pid/tst.gcc.exe pid/tst.gcc.c $(LDFLAGS) + $(POST_PROCESS) ; $(STRIP_STABS) + +usdt/tst.args.exe: usdt/tst.args.o usdt/args.o + $(LINK.c) -o usdt/tst.args.exe usdt/tst.args.o usdt/args.o $(LDLIBS) + $(POST_PROCESS) ; $(STRIP_STABS) + +usdt/args.o: usdt/args.d usdt/tst.args.o + $(COMPILE.d) -o usdt/args.o -s usdt/args.d usdt/tst.args.o + +usdt/tst.argmap.exe: usdt/tst.argmap.o usdt/argmap.o + $(LINK.c) -o usdt/tst.argmap.exe usdt/tst.argmap.o usdt/argmap.o \ + $(LDLIBS) + $(POST_PROCESS) ; $(STRIP_STABS) + +usdt/argmap.o: usdt/argmap.d usdt/tst.argmap.o + $(COMPILE.d) -o usdt/argmap.o -s usdt/argmap.d usdt/tst.argmap.o + +usdt/tst.forker.exe: usdt/tst.forker.o usdt/forker.o + $(LINK.c) -o usdt/tst.forker.exe usdt/tst.forker.o usdt/forker.o \ + $(LDLIBS) + $(POST_PROCESS) ; $(STRIP_STABS) + +usdt/forker.o: usdt/forker.d usdt/tst.forker.o + $(COMPILE.d) -o usdt/forker.o -s usdt/forker.d usdt/tst.forker.o + +usdt/tst.forker.o: usdt/forker.h + +usdt/forker.h: usdt/forker.d + $(DTRACE) -h -s usdt/forker.d -o usdt/forker.h + +SUBDIRS = java_api +include ../../Makefile.subdirs diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_AGG_FUNC.bad.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_AGG_FUNC.bad.d new file mode 100644 index 00000000..d12454be --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_AGG_FUNC.bad.d @@ -0,0 +1,45 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * An aggregation must call an aggregating function. + * + * SECTION: Aggregations/Aggregations + * + */ + +BEGIN +{ + + @counts["xyz"] = breakpoint(); + exit(0); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_AGG_MDIM.bad.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_AGG_MDIM.bad.d new file mode 100644 index 00000000..2c47289b --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_AGG_MDIM.bad.d @@ -0,0 +1,45 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * An aggregation may not be used as a multi-dimensional array + * + * SECTION: Aggregations/Aggregations + * + */ + +BEGIN +{ + + @counts[0][2] = count(); + exit(0); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_AGG_NULL.bad.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_AGG_NULL.bad.d new file mode 100644 index 00000000..87d18187 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_AGG_NULL.bad.d @@ -0,0 +1,44 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * An aggregation must have an aggregating function applied. + * + * SECTION: Aggregations/Aggregations + * + */ + +BEGIN +{ + + @a[1]; +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_AGG_REDEF.redef.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_AGG_REDEF.redef.d new file mode 100644 index 00000000..9b4b425e --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_AGG_REDEF.redef.d @@ -0,0 +1,45 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Test redefining the aggregation + * + * SECTION: Aggregations/Aggregations + * + */ + +BEGIN +{ + @a = count(); +} + +END +{ + @a = max(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_AGG_SCALAR.avgtoofew.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_AGG_SCALAR.avgtoofew.d new file mode 100644 index 00000000..106f4cde --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_AGG_SCALAR.avgtoofew.d @@ -0,0 +1,43 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * avg() should not accept a non-scalar value + * + * SECTION: Aggregations/Aggregations + * + */ + +#pragma D option quiet + +BEGIN +{ + @a[pid] = avg(probefunc); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_AGG_SCALAR.maxnoarg.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_AGG_SCALAR.maxnoarg.d new file mode 100644 index 00000000..181e1962 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_AGG_SCALAR.maxnoarg.d @@ -0,0 +1,41 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * max() should not accept a non-scalar value + * + * SECTION: Aggregations/Aggregations + * + */ +BEGIN +{ + @a[pid] = max(probefunc); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_AGG_SCALAR.mintoofew.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_AGG_SCALAR.mintoofew.d new file mode 100644 index 00000000..3ca34ffb --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_AGG_SCALAR.mintoofew.d @@ -0,0 +1,42 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * min() should not accept a non-scalar value + * + * SECTION: Aggregations/Aggregations + * + */ + +BEGIN +{ + @a[pid] = min(probefunc); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_AGG_SCALAR.quantizetoofew.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_AGG_SCALAR.quantizetoofew.d new file mode 100644 index 00000000..b7464552 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_AGG_SCALAR.quantizetoofew.d @@ -0,0 +1,41 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * quantize() should not accept a non-scalar value + * + * SECTION: Aggregations/Aggregations + * + */ + +BEGIN +{ + @a[pid] = quantize(probefunc); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_AGG_SCALAR.stddevtoofew.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_AGG_SCALAR.stddevtoofew.d new file mode 100644 index 00000000..262040f1 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_AGG_SCALAR.stddevtoofew.d @@ -0,0 +1,41 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +/* + * ASSERTION: + * stddev() should not accept a non-scalar value + * + * SECTION: Aggregations/Aggregations + * + */ + +#pragma D option quiet + +BEGIN +{ + @a[pid] = stddev(probefunc); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_AGG_SCALAR.sumtoofew.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_AGG_SCALAR.sumtoofew.d new file mode 100644 index 00000000..a77a2d5d --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_AGG_SCALAR.sumtoofew.d @@ -0,0 +1,42 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * sum() should not accept a non-scalar value + * + * SECTION: Aggregations/Aggregations + * + */ + +BEGIN +{ + @a[pid] = sum(probefunc); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_CLEAR_AGGARG.bad.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_CLEAR_AGGARG.bad.d new file mode 100644 index 00000000..0e6060ae --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_CLEAR_AGGARG.bad.d @@ -0,0 +1,77 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * The argument to clear() must be an aggregation. + * + * SECTION: Aggregations/Clearing aggregations + * + * + */ + +#pragma D option quiet +#pragma D option aggrate=10ms +#pragma D option switchrate=10ms + +BEGIN +{ + i = 0; + start = timestamp; +} + +tick-100ms +/i < 20/ +{ + @func[i%5] = sum(i * 100); + i++; +} + +tick-100ms +/i == 10/ +{ + printf("Aggregation data before clear():\n"); + printa(@func); + + clear(count()); + + printf("Aggregation data after clear():\n"); + printa(@func); + i++; +} + +tick-100ms +/i == 20/ +{ + printf("Final aggregation data:\n"); + printa(@func); + + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_CLEAR_PROTO.bad.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_CLEAR_PROTO.bad.d new file mode 100644 index 00000000..57fa8841 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_CLEAR_PROTO.bad.d @@ -0,0 +1,77 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * clear() should handle no args as an error. + * + * SECTION: Aggregations/Clearing aggregations + * + * + */ + +#pragma D option quiet +#pragma D option aggrate=10ms +#pragma D option switchrate=10ms + +BEGIN +{ + i = 0; + start = timestamp; +} + +tick-100ms +/i < 20/ +{ + @func[i%5] = sum(i * 100); + i++; +} + +tick-100ms +/i == 10/ +{ + printf("Aggregation data before clear():\n"); + printa(@func); + + clear(); + + printf("Aggregation data after clear():\n"); + printa(@func); + i++; +} + +tick-100ms +/i == 20/ +{ + printf("Final aggregation data:\n"); + printa(@func); + + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_FUNC_IDENT.bad.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_FUNC_IDENT.bad.d new file mode 100644 index 00000000..866a7acf --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_FUNC_IDENT.bad.d @@ -0,0 +1,45 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * An aggregation must call an aggregating function, not a probe + * + * SECTION: Aggregations/Aggregations + * + */ + +BEGIN +{ + + @counts[0][2] = tick-1(); + exit(0); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_FUNC_UNDEF.badaggfunc.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_FUNC_UNDEF.badaggfunc.d new file mode 100644 index 00000000..65c12da4 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_FUNC_UNDEF.badaggfunc.d @@ -0,0 +1,43 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Test the use of a non-supported aggregate function. + * + * SECTION: Aggregations/Aggregations + * + */ + + + +BEGIN +{ + @counts["badtest"] = foo(); + +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_IDENT_UNDEF.badexpr.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_IDENT_UNDEF.badexpr.d new file mode 100644 index 00000000..83e6ab79 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_IDENT_UNDEF.badexpr.d @@ -0,0 +1,41 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Test using an aggregation in an expression context. + * This should result in a compile-time error. + * + * SECTION: Aggregations/Aggregations + * + */ + +BEGIN +{ + trace(@a + 3); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_IDENT_UNDEF.badkey3.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_IDENT_UNDEF.badkey3.d new file mode 100644 index 00000000..67c5b64e --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_IDENT_UNDEF.badkey3.d @@ -0,0 +1,42 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Test the use of a dynamic expression as an aggregation key. + * + * SECTION: Aggregations/Aggregations + * + */ + + +BEGIN +{ + @t[i] = count(); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_IDENT_UNDEF.noeffect.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_IDENT_UNDEF.noeffect.d new file mode 100644 index 00000000..9bdff789 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_IDENT_UNDEF.noeffect.d @@ -0,0 +1,41 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Test compiling an aggregation statement that has no effect. + * This should result in a compile-time error. + * + * SECTION: Aggregations/Aggregations + * + */ + +BEGIN +{ + @a; +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_KEY_TYPE.badkey1.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_KEY_TYPE.badkey1.d new file mode 100644 index 00000000..abf3dd8c --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_KEY_TYPE.badkey1.d @@ -0,0 +1,41 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Test the use of a void expression as an aggregation key. + * This should result in a compile-time error. + * + * SECTION: Aggregations/Aggregations + * + */ + +BEGIN +{ + @a[1, (void)0] = count(); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_KEY_TYPE.badkey2.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_KEY_TYPE.badkey2.d new file mode 100644 index 00000000..9490b821 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_KEY_TYPE.badkey2.d @@ -0,0 +1,42 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Test the use of a dynamic expression as an aggregation key. + * This should result in a compile-time error. + * + * SECTION: Aggregations/Aggregations + * + */ + +BEGIN +{ + @a[0] = count(); + @b[@a] = count(); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_KEY_TYPE.badkey4.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_KEY_TYPE.badkey4.d new file mode 100644 index 00000000..057746eb --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_KEY_TYPE.badkey4.d @@ -0,0 +1,44 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * Test the use of a dynamic expression as an aggregation key. + * This should result in a compile-time error. + * + * SECTION: Aggregations/Aggregations + * + */ + + +BEGIN +{ + @a[curpsinfo] = count(); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_BASETYPE.lqbad1.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_BASETYPE.lqbad1.d new file mode 100644 index 00000000..6bb6765a --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_BASETYPE.lqbad1.d @@ -0,0 +1,44 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * lquantize() lower bound around must be an integer constant + * + * SECTION: Aggregations/Aggregations + * + */ + + +BEGIN +{ + x = 'a'; + @a[1] = lquantize(timestamp, x, 1000, 1); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_BASETYPE.lqshort.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_BASETYPE.lqshort.d new file mode 100644 index 00000000..6bb6765a --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_BASETYPE.lqshort.d @@ -0,0 +1,44 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * lquantize() lower bound around must be an integer constant + * + * SECTION: Aggregations/Aggregations + * + */ + + +BEGIN +{ + x = 'a'; + @a[1] = lquantize(timestamp, x, 1000, 1); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_BASEVAL.bad.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_BASEVAL.bad.d new file mode 100644 index 00000000..23d318e7 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_BASEVAL.bad.d @@ -0,0 +1,43 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * lquantize() lower bound must be a 32-bit quantity + * + * SECTION: Aggregations/Aggregations + * + */ + +BEGIN +{ + @a[1] = lquantize(timestamp, 2147483657, 1000, 1); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_LIMTYPE.lqbad1.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_LIMTYPE.lqbad1.d new file mode 100644 index 00000000..894f064a --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_LIMTYPE.lqbad1.d @@ -0,0 +1,45 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * lquantize() upper bound around must be an integer constant + * + * SECTION: Aggregations/Aggregations + * + */ + + +BEGIN +{ + x = 'a'; + @a[1] = lquantize(timestamp, 100, rand(), 1); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_LIMVAL.bad.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_LIMVAL.bad.d new file mode 100644 index 00000000..0a2f5e7f --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_LIMVAL.bad.d @@ -0,0 +1,44 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * lquantize() upper bound around must be an integer constant + * + * SECTION: Aggregations/Aggregations + * + */ + +BEGIN +{ + x = 'a'; + @a[1] = lquantize(timestamp, 100, 2147483657, 1); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_MATCHBASE.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_MATCHBASE.d new file mode 100644 index 00000000..b93ffabf --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_MATCHBASE.d @@ -0,0 +1,33 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +BEGIN +{ + @ = lquantize(0, 10, 20, 1); + @ = lquantize(0, 15, 20, 1); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_MATCHBASE.order.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_MATCHBASE.order.d new file mode 100644 index 00000000..763c1e0b --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_MATCHBASE.order.d @@ -0,0 +1,33 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +BEGIN +{ + @ = lquantize(0, 10, 20, 1); + @ = lquantize(0, 15, 30, 10); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_MATCHLIM.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_MATCHLIM.d new file mode 100644 index 00000000..d9ba023e --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_MATCHLIM.d @@ -0,0 +1,33 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +BEGIN +{ + @ = lquantize(0, 10, 20, 1); + @ = lquantize(0, 10, 2000, 1); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_MATCHLIM.order.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_MATCHLIM.order.d new file mode 100644 index 00000000..62be0c5b --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_MATCHLIM.order.d @@ -0,0 +1,33 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +BEGIN +{ + @ = lquantize(0, 10, 20, 1); + @ = lquantize(0, 10, 2000, 10); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_MATCHSTEP.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_MATCHSTEP.d new file mode 100644 index 00000000..086f4392 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_MATCHSTEP.d @@ -0,0 +1,33 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +BEGIN +{ + @ = lquantize(0, 10, 20, 1); + @ = lquantize(0, 10, 20, 2); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_MISMATCH.lqbadarg.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_MISMATCH.lqbadarg.d new file mode 100644 index 00000000..a4444ad1 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_MISMATCH.lqbadarg.d @@ -0,0 +1,55 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * Upper bound must be greater than lower bound argument + * + * SECTION: Aggregations/Aggregations + */ + +#pragma D option quiet + +BEGIN +{ + i = 0; +} + +tick-1 +/i < 1000/ +{ + @a[i] = lquantize(i, 1100, -100, -100 ); + i += 100; +} + +tick-1 +/i == 1000/ +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_STEPLARGE.lqtoofew.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_STEPLARGE.lqtoofew.d new file mode 100644 index 00000000..664f70f2 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_STEPLARGE.lqtoofew.d @@ -0,0 +1,42 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * lquantize() should not accept more than 4 arguments. + * + * SECTION: Aggregations/Aggregations + * + */ + +BEGIN +{ + @a[1] = lquantize(1, 2, 3, 4, 5); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_STEPSMALL.bad.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_STEPSMALL.bad.d new file mode 100644 index 00000000..634e8c06 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_STEPSMALL.bad.d @@ -0,0 +1,55 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Number of quantization levels must be a 16-bit quantity + * + * SECTION: Aggregations/Aggregations + * + */ + + +BEGIN +{ + i = 0; +} + +tick-10ms +/i < 1000/ +{ + @a[i] = lquantize(i, 0, 1000000, 10); + i += 100; +} + +tick-10ms +/i == 1000/ +{ + exit(0); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_STEPTYPE.lqbadinc.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_STEPTYPE.lqbadinc.d new file mode 100644 index 00000000..87c51273 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_STEPTYPE.lqbadinc.d @@ -0,0 +1,56 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * Upper bound must be greater than lower bound argument + * + * SECTION: Aggregations/Aggregations + * + */ + +#pragma D option quiet + +BEGIN +{ + i = 0; +} + +tick-1 +/i < 1000/ +{ + @a[i] = lquantize(i, 0, 1100, -100); + i += 100; +} + +tick-1 +/i == 1000/ +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_STEPVAL.bad.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_STEPVAL.bad.d new file mode 100644 index 00000000..a90d7571 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_LQUANT_STEPVAL.bad.d @@ -0,0 +1,56 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * lquantize() step value should be a 16-bit quantity + * + * SECTION: Aggregations/Aggregations + * + */ + + +BEGIN +{ + i = 0; +} + +tick-10ms +/i < 1000/ +{ + @a[i] = lquantize(i, 100, 1100, 200000 ); + i += 100; +} + +tick-10ms +/i == 1000/ +{ + exit(0); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_NORMALIZE_AGGARG.bad.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_NORMALIZE_AGGARG.bad.d new file mode 100644 index 00000000..7e5974c5 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_NORMALIZE_AGGARG.bad.d @@ -0,0 +1,65 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * The first argument to normalize() should be an aggregation. + * + * SECTION: Aggregations/Clearing aggregations + * + * + */ + + +#pragma D option quiet +#pragma D option aggrate=1ms +#pragma D option switchrate=1ms + +BEGIN +{ + i = 0; + start = timestamp; +} + +tick-100ms +/i < 20/ +{ + @func[i % 5] = sum(i * 100); + i++; +} + +tick-100ms +/i == 20/ +{ + + printf("normalized data:\n"); + normalize(count(), 4); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_NORMALIZE_PROTO.bad.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_NORMALIZE_PROTO.bad.d new file mode 100644 index 00000000..82d819d4 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_NORMALIZE_PROTO.bad.d @@ -0,0 +1,64 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * normalize() accepts 2 args - passing fewer is an error. + * + * SECTION: Aggregations/Clearing aggregations + * + * + */ + + +#pragma D option quiet +#pragma D option aggrate=1ms +#pragma D option switchrate=1ms + +BEGIN +{ + i = 0; + start = timestamp; +} + +tick-100ms +/i < 20/ +{ + @func[i % 5] = sum(i * 100); + i++; +} + +tick-100ms +/i == 20/ +{ + printf("normalized data:\n"); + normalize(@func); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_NORMALIZE_SCALAR.bad.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_NORMALIZE_SCALAR.bad.d new file mode 100644 index 00000000..14a25864 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_NORMALIZE_SCALAR.bad.d @@ -0,0 +1,64 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * The second argument to normalize() should be a scalar. + * + * SECTION: Aggregations/Clearing aggregations + * + * + */ + + +#pragma D option quiet +#pragma D option aggrate=1ms +#pragma D option switchrate=1ms + +BEGIN +{ + i = 0; + start = timestamp; +} + +tick-100ms +/i < 20/ +{ + @func[i % 5] = sum(i * 100); + i++; +} + +tick-100ms +/i == 20/ +{ + printf("normalized data:\n"); + normalize(@func, "hello"); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_ARG.lquantizetoofew.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_ARG.lquantizetoofew.d new file mode 100644 index 00000000..db4567f8 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_ARG.lquantizetoofew.d @@ -0,0 +1,42 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * lquantize() should not accept a non-scalar value + * + * SECTION: Aggregations/Aggregations + * + */ + +BEGIN +{ + @a[pid] = lquantize(probefunc, probefunc, probefunc, probefunc); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.avgnoarg.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.avgnoarg.d new file mode 100644 index 00000000..628eeaba --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.avgnoarg.d @@ -0,0 +1,44 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * avg() should not accept a call with no arguments + * + * SECTION: Aggregations/Aggregations + * + */ + +#pragma D option quiet + +BEGIN +{ + @a[1] = avg(); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.avgtoomany.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.avgtoomany.d new file mode 100644 index 00000000..42e5c1cc --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.avgtoomany.d @@ -0,0 +1,44 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * avg() should not more than one argument + * + * SECTION: Aggregations/Aggregations + * + */ + +#pragma D option quiet + +BEGIN +{ + @a[1] = avg(1, 2); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.counttoomany.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.counttoomany.d new file mode 100644 index 00000000..5dc5b800 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.counttoomany.d @@ -0,0 +1,41 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * count() should not accept any arguments + * + * SECTION: Aggregations/Aggregations + * + */ + +BEGIN +{ + @a["badtest"] = count(1); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.lquantizenoarg.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.lquantizenoarg.d new file mode 100644 index 00000000..ae4b6724 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.lquantizenoarg.d @@ -0,0 +1,42 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * lquantize() should not accept a call with no arguments + * + * SECTION: Aggregations/Aggregations + * + */ + +BEGIN +{ + @a[1] = lquantize(); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.lquantizetoomany.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.lquantizetoomany.d new file mode 100644 index 00000000..bf87a468 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.lquantizetoomany.d @@ -0,0 +1,40 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * lquantize() should not have more than five (!) arguments + * + * SECTION: Aggregations/Aggregations + * + */ + +BEGIN +{ + @[1] = lquantize(10, 0, 100, 1, 10, 20); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.maxnoarg.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.maxnoarg.d new file mode 100644 index 00000000..aad2c249 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.maxnoarg.d @@ -0,0 +1,41 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * max() should not accept a call with no arguments + * + * SECTION: Aggregations/Aggregations + * + */ + +BEGIN +{ + @a[1] = max(); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.maxtoomany.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.maxtoomany.d new file mode 100644 index 00000000..d0fb0918 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.maxtoomany.d @@ -0,0 +1,41 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * max() should not more than one argument + * + * SECTION: Aggregations/Aggregations + * + */ + +BEGIN +{ + @a[1] = max(1, 2); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.minnoarg.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.minnoarg.d new file mode 100644 index 00000000..09db51f2 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.minnoarg.d @@ -0,0 +1,41 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * min() should not accept a call with no arguments + * + * SECTION: Aggregations/Aggregations + * + */ + +BEGIN +{ + @a[1] = min(); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.mintoomany.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.mintoomany.d new file mode 100644 index 00000000..2647402c --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.mintoomany.d @@ -0,0 +1,42 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * min() should not more than one argument + * + * SECTION: Aggregations/Aggregations + * + */ + +BEGIN +{ + @a[1] = min(1, 2); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.quantizenoarg.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.quantizenoarg.d new file mode 100644 index 00000000..b33957a2 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.quantizenoarg.d @@ -0,0 +1,42 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * quantize() should not accept a call with no arguments + * + * SECTION: Aggregations/Aggregations + * + */ + +BEGIN +{ + @a[1] = quantize(); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.quantizetoomany.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.quantizetoomany.d new file mode 100644 index 00000000..9b162bd2 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.quantizetoomany.d @@ -0,0 +1,41 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * quantize() should not have more than two arguments + * + * SECTION: Aggregations/Aggregations + * + */ + +BEGIN +{ + @a[1] = quantize(1, 2, 3); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.stddevnoarg.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.stddevnoarg.d new file mode 100644 index 00000000..2952cf50 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.stddevnoarg.d @@ -0,0 +1,41 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +/* + * ASSERTION: + * stddev() should not accept a call with no arguments + * + * SECTION: Aggregations/Aggregations + * + */ + +#pragma D option quiet + +BEGIN +{ + @a[1] = stddev(); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.stddevtoomany.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.stddevtoomany.d new file mode 100644 index 00000000..c42e9628 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.stddevtoomany.d @@ -0,0 +1,41 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +/* + * ASSERTION: + * stddev() should not have more than one argument + * + * SECTION: Aggregations/Aggregations + * + */ + +#pragma D option quiet + +BEGIN +{ + @a[1] = stddev(1, 2); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.sumnoarg.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.sumnoarg.d new file mode 100644 index 00000000..4f279017 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.sumnoarg.d @@ -0,0 +1,41 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * sum() should not accept a call with no arguments + * + * SECTION: Aggregations/Aggregations + * + */ + +BEGIN +{ + @a[pid] = sum(); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.sumtoomany.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.sumtoomany.d new file mode 100644 index 00000000..5e899be6 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_PROTO_LEN.sumtoomany.d @@ -0,0 +1,41 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * sum() should not more than one argument + * + * SECTION: Aggregations/Aggregations + * + */ + +BEGIN +{ + @a[pid] = sum(1, 2); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_TRUNC_AGGARG.bad.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_TRUNC_AGGARG.bad.d new file mode 100644 index 00000000..69cb7291 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_TRUNC_AGGARG.bad.d @@ -0,0 +1,35 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +int i; + +BEGIN +{ + trunc(i); + exit(1); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_TRUNC_PROTO.badmany.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_TRUNC_PROTO.badmany.d new file mode 100644 index 00000000..61271a74 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_TRUNC_PROTO.badmany.d @@ -0,0 +1,34 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +BEGIN +{ + @[0] = count(); + trunc(@, 10, 20); + exit(1); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_TRUNC_PROTO.badnone.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_TRUNC_PROTO.badnone.d new file mode 100644 index 00000000..e141e6c9 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_TRUNC_PROTO.badnone.d @@ -0,0 +1,33 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +BEGIN +{ + trunc(); + exit(1); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_TRUNC_SCALAR.bad.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_TRUNC_SCALAR.bad.d new file mode 100644 index 00000000..e5485766 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/err.D_TRUNC_SCALAR.bad.d @@ -0,0 +1,34 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +BEGIN +{ + @[0] = count(); + trunc(@, @); + exit(1); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.allquant.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.allquant.d new file mode 100644 index 00000000..26241b31 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.allquant.d @@ -0,0 +1,46 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma D option quiet + +int i; + +tick-10ms +{ + @ = quantize(1LL << i); + @ = quantize((1LL << i) + 1); + @ = quantize(-(1LL << i)); + @ = quantize(-(1LL << i) - 1); + i++; +} + +tick-10ms +/i == 64/ +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.allquant.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.allquant.d.out new file mode 100644 index 00000000..356d6b46 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.allquant.d.out @@ -0,0 +1,131 @@ + + + value ------------- Distribution ------------- count +-4611686018427387904 |@ 5 +-2305843009213693952 | 2 +-1152921504606846976 | 2 +-576460752303423488 | 2 +-288230376151711744 | 2 +-144115188075855872 | 2 +-72057594037927936 | 2 +-36028797018963968 | 2 +-18014398509481984 | 2 +-9007199254740992 | 2 +-4503599627370496 | 2 +-2251799813685248 | 2 +-1125899906842624 | 2 +-562949953421312 | 2 +-281474976710656 | 2 +-140737488355328 | 2 + -70368744177664 | 2 + -35184372088832 | 2 + -17592186044416 | 2 + -8796093022208 | 2 + -4398046511104 | 2 + -2199023255552 | 2 + -1099511627776 | 2 + -549755813888 | 2 + -274877906944 | 2 + -137438953472 | 2 + -68719476736 | 2 + -34359738368 | 2 + -17179869184 | 2 + -8589934592 | 2 + -4294967296 | 2 + -2147483648 | 2 + -1073741824 | 2 + -536870912 | 2 + -268435456 | 2 + -134217728 | 2 + -67108864 | 2 + -33554432 | 2 + -16777216 | 2 + -8388608 | 2 + -4194304 | 2 + -2097152 | 2 + -1048576 | 2 + -524288 | 2 + -262144 | 2 + -131072 | 2 + -65536 | 2 + -32768 | 2 + -16384 | 2 + -8192 | 2 + -4096 | 2 + -2048 | 2 + -1024 | 2 + -512 | 2 + -256 | 2 + -128 | 2 + -64 | 2 + -32 | 2 + -16 | 2 + -8 | 2 + -4 | 2 + -2 | 3 + -1 | 1 + 0 | 0 + 1 | 1 + 2 | 3 + 4 | 2 + 8 | 2 + 16 | 2 + 32 | 2 + 64 | 2 + 128 | 2 + 256 | 2 + 512 | 2 + 1024 | 2 + 2048 | 2 + 4096 | 2 + 8192 | 2 + 16384 | 2 + 32768 | 2 + 65536 | 2 + 131072 | 2 + 262144 | 2 + 524288 | 2 + 1048576 | 2 + 2097152 | 2 + 4194304 | 2 + 8388608 | 2 + 16777216 | 2 + 33554432 | 2 + 67108864 | 2 + 134217728 | 2 + 268435456 | 2 + 536870912 | 2 + 1073741824 | 2 + 2147483648 | 2 + 4294967296 | 2 + 8589934592 | 2 + 17179869184 | 2 + 34359738368 | 2 + 68719476736 | 2 + 137438953472 | 2 + 274877906944 | 2 + 549755813888 | 2 + 1099511627776 | 2 + 2199023255552 | 2 + 4398046511104 | 2 + 8796093022208 | 2 + 17592186044416 | 2 + 35184372088832 | 2 + 70368744177664 | 2 + 140737488355328 | 2 + 281474976710656 | 2 + 562949953421312 | 2 +1125899906842624 | 2 +2251799813685248 | 2 +4503599627370496 | 2 +9007199254740992 | 2 +18014398509481984 | 2 +36028797018963968 | 2 +72057594037927936 | 2 +144115188075855872 | 2 +288230376151711744 | 2 +576460752303423488 | 2 +1152921504606846976 | 2 +2305843009213693952 | 2 +4611686018427387904 | 3 + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.avg.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.avg.d new file mode 100644 index 00000000..a4bfd3cd --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.avg.d @@ -0,0 +1,57 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * Positive avg() test + * + * SECTION: Aggregations/Aggregations + * + * NOTES: This is a simple verifiable positive test of the avg() function. + */ + +#pragma D option quiet + +BEGIN +{ + i = 0; +} + +tick-10ms +/i < 1000/ +{ + @a = avg(i); + i += 100; +} + +tick-10ms +/i == 1000/ +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.avg.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.avg.d.out new file mode 100644 index 00000000..e3c0687d --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.avg.d.out @@ -0,0 +1,2 @@ + + 450 diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.avg_neg.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.avg_neg.d new file mode 100644 index 00000000..5c1e77d1 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.avg_neg.d @@ -0,0 +1,46 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * Positive avg() test using negative values + * + * SECTION: Aggregations/Aggregations + * + * NOTES: This is a simple verifiable positive test of the avg() function. + */ + +#pragma D option quiet + +BEGIN +{ + @ = avg(0); + @ = avg(-900); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.avg_neg.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.avg_neg.d.out new file mode 100644 index 00000000..3fafcd45 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.avg_neg.d.out @@ -0,0 +1,2 @@ + + -450 diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.clear.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.clear.d new file mode 100644 index 00000000..2acd8ee9 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.clear.d @@ -0,0 +1,75 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Positive test for clearing aggregations + * + * SECTION: Aggregations/Clearing aggregations + * + * + */ + +#pragma D option quiet +#pragma D option aggrate=1ms +#pragma D option switchrate=50ms + +BEGIN +{ + i = 0; + start = timestamp; +} + +tick-100ms +/i < 20/ +{ + @func[i%5] = sum(i * 100); + i++; +} + +tick-100ms +/i == 10/ +{ + printf("Aggregation data before clear():\n"); + printa(@func); + + clear(@func); + + printf("Aggregation data after clear():\n"); + printa(@func); + i++; +} + +tick-100ms +/i == 20/ +{ + printf("Final aggregation data:\n"); + printa(@func); + + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.clear.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.clear.d.out new file mode 100644 index 00000000..486e4ac0 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.clear.d.out @@ -0,0 +1,22 @@ +Aggregation data before clear(): + + 0 500 + 1 700 + 2 900 + 3 1100 + 4 1300 +Aggregation data after clear(): + + 0 0 + 1 0 + 2 0 + 3 0 + 4 0 +Final aggregation data: + + 0 1500 + 1 2700 + 2 2900 + 3 3100 + 4 3300 + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.clearavg.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.clearavg.d new file mode 100644 index 00000000..135e511b --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.clearavg.d @@ -0,0 +1,60 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * Positive avg() test + * + * SECTION: Aggregations/Aggregations + * + * NOTES: + * Verifies that printing a clear()'d aggregation with an avg() + * aggregation function doesn't cause problems. + * + */ + +#pragma D option quiet + +tick-10ms +/i++ < 5/ +{ + @a = avg(timestamp); +} + +tick-10ms +/i == 5/ +{ + exit(2); +} + +END +{ + clear(@a); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.clearavg.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.clearavg.d.out new file mode 100644 index 00000000..8d23188f --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.clearavg.d.out @@ -0,0 +1,2 @@ + + 0 diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.clearavg2.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.clearavg2.d new file mode 100644 index 00000000..0f7a9584 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.clearavg2.d @@ -0,0 +1,63 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * Positive avg() test + * + * SECTION: Aggregations/Aggregations + * + * NOTES: + * Verifies that printing a clear()'d aggregation with an avg() + * aggregation function of 0 doesn't cause divide-by-zero problems. + * + */ + +#pragma D option quiet +#pragma D option switchrate=50ms +#pragma D option aggrate=1ms + +tick-100ms +/(x++ % 5) == 0/ +{ + @time = avg(0); +} + +tick-100ms +/x > 5 && x <= 20/ +{ + printa(" %@d\n", @time); + clear(@time); +} + +tick-100ms +/x > 20/ +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.clearavg2.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.clearavg2.d.out new file mode 100644 index 00000000..7cceedda --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.clearavg2.d.out @@ -0,0 +1,16 @@ + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.cleardenormalize.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.cleardenormalize.d new file mode 100644 index 00000000..7aefed03 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.cleardenormalize.d @@ -0,0 +1,78 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * Denormalized aggregations can be cleared + * + * SECTION: Aggregations/Normalization; + * Aggregations/Clearing aggregations + * + */ + +#pragma D option quiet +#pragma D option aggrate=1ms +#pragma D option switchrate=50ms + +BEGIN +{ + i = 0; + start = timestamp; +} + +tick-100ms +/i != 10 || i != 20/ +{ + @func[i%5] = sum(i * 100); + i++; +} + +tick-100ms +/i == 10/ +{ + printf("Denormalized data before clear:\n"); + denormalize(@func); + printa(@func); + + clear(@func); + + printf("Aggregation data after clear:\n"); + printa(@func); + i++ +} + +tick-100ms +/i == 20/ +{ + printf("Final (denormalized) aggregation data:\n"); + denormalize(@func); + printa(@func); + + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.cleardenormalize.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.cleardenormalize.d.out new file mode 100644 index 00000000..ed7f2f34 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.cleardenormalize.d.out @@ -0,0 +1,22 @@ +Denormalized data before clear: + + 0 500 + 1 700 + 2 900 + 3 1100 + 4 1300 +Aggregation data after clear: + + 0 0 + 1 0 + 2 0 + 3 0 + 4 0 +Final (denormalized) aggregation data: + + 0 1500 + 1 2700 + 2 2900 + 3 3100 + 4 3300 + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.clearlquantize.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.clearlquantize.d new file mode 100644 index 00000000..2d0ff838 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.clearlquantize.d @@ -0,0 +1,67 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * Positive lquantize()/clear() test + * + * SECTION: Aggregations/Aggregations + * + * NOTES: + * Verifies that printing a clear()'d aggregation with an lquantize() + * aggregation function doesn't cause problems. + * + */ + + +#pragma D option switchrate=50ms +#pragma D option aggrate=1ms +#pragma D option quiet + +tick-100ms +{ + x++; + @a["linear"] = lquantize(x, 0, 100, 1); + @b["exp"] = quantize(x); +} + +tick-100ms +/(x % 5) == 0 && y++ < 5/ +{ + printa(@a); + printa(@b); + clear(@a); + clear(@b); +} + +tick-100ms +/(x % 5) == 0 && y == 5/ +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.clearlquantize.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.clearlquantize.d.out new file mode 100644 index 00000000..e7e2a600 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.clearlquantize.d.out @@ -0,0 +1,94 @@ + + linear + value ------------- Distribution ------------- count + 0 | 0 + 1 |@@@@@@@@ 1 + 2 |@@@@@@@@ 1 + 3 |@@@@@@@@ 1 + 4 |@@@@@@@@ 1 + 5 |@@@@@@@@ 1 + 6 | 0 + + + exp + value ------------- Distribution ------------- count + 0 | 0 + 1 |@@@@@@@@ 1 + 2 |@@@@@@@@@@@@@@@@ 2 + 4 |@@@@@@@@@@@@@@@@ 2 + 8 | 0 + + + linear + value ------------- Distribution ------------- count + 5 | 0 + 6 |@@@@@@@@ 1 + 7 |@@@@@@@@ 1 + 8 |@@@@@@@@ 1 + 9 |@@@@@@@@ 1 + 10 |@@@@@@@@ 1 + 11 | 0 + + + exp + value ------------- Distribution ------------- count + 2 | 0 + 4 |@@@@@@@@@@@@@@@@ 2 + 8 |@@@@@@@@@@@@@@@@@@@@@@@@ 3 + 16 | 0 + + + linear + value ------------- Distribution ------------- count + 10 | 0 + 11 |@@@@@@@@ 1 + 12 |@@@@@@@@ 1 + 13 |@@@@@@@@ 1 + 14 |@@@@@@@@ 1 + 15 |@@@@@@@@ 1 + 16 | 0 + + + exp + value ------------- Distribution ------------- count + 4 | 0 + 8 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 5 + 16 | 0 + + + linear + value ------------- Distribution ------------- count + 15 | 0 + 16 |@@@@@@@@ 1 + 17 |@@@@@@@@ 1 + 18 |@@@@@@@@ 1 + 19 |@@@@@@@@ 1 + 20 |@@@@@@@@ 1 + 21 | 0 + + + exp + value ------------- Distribution ------------- count + 8 | 0 + 16 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 5 + 32 | 0 + + + linear + value ------------- Distribution ------------- count + 20 | 0 + 21 |@@@@@@@@ 1 + 22 |@@@@@@@@ 1 + 23 |@@@@@@@@ 1 + 24 |@@@@@@@@ 1 + 25 |@@@@@@@@ 1 + 26 | 0 + + + exp + value ------------- Distribution ------------- count + 8 | 0 + 16 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 5 + 32 | 0 + + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.clearnormalize.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.clearnormalize.d new file mode 100644 index 00000000..75cfa2d1 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.clearnormalize.d @@ -0,0 +1,77 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Normalized aggregation data can be cleared + * + * SECTION: Aggregations/Normalization; + * Aggregations/Clearing aggregations + * + */ + +#pragma D option quiet +#pragma D option aggrate=1ms +#pragma D option switchrate=50ms + +BEGIN +{ + i = 0; + start = timestamp; +} + +tick-100ms +/i < 20/ +{ + @func[i % 5] = sum(i * 100); + i++; +} + +tick-100ms +/i == 10/ +{ + printf("Normalized data before clear:\n"); + normalize(@func, 5); + printa(@func); + + clear(@func); + + printf("Aggregation data after clear:\n"); + printa(@func); + i++ +} + +tick-100ms +/i == 20/ +{ + printf("Final (normalized) aggregation data:\n"); + normalize(@func, 5); + printa(@func); + + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.clearnormalize.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.clearnormalize.d.out new file mode 100644 index 00000000..e568427e --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.clearnormalize.d.out @@ -0,0 +1,22 @@ +Normalized data before clear: + + 0 100 + 1 140 + 2 180 + 3 220 + 4 260 +Aggregation data after clear: + + 0 0 + 1 0 + 2 0 + 3 0 + 4 0 +Final (normalized) aggregation data: + + 0 300 + 1 540 + 2 580 + 3 620 + 4 660 + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.clearstddev.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.clearstddev.d new file mode 100644 index 00000000..af3ecd56 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.clearstddev.d @@ -0,0 +1,57 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +/* + * ASSERTION: + * Positive stddev() test + * + * SECTION: Aggregations/Aggregations + * + * NOTES: + * Verifies that printing a clear()'d aggregation with an stddev() + * aggregation function doesn't cause problems. + * + */ + +#pragma D option quiet + +tick-10ms +/i++ < 5/ +{ + @a = stddev(timestamp); +} + +tick-10ms +/i == 5/ +{ + exit(2); +} + +END +{ + clear(@a); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.clearstddev.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.clearstddev.d.out new file mode 100644 index 00000000..8d23188f --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.clearstddev.d.out @@ -0,0 +1,2 @@ + + 0 diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.count.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.count.d new file mode 100644 index 00000000..e81d123d --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.count.d @@ -0,0 +1,44 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Postive count() test + * + * SECTION: Aggregations/Aggregations + * + */ + +#pragma D option quiet + +BEGIN +{ + @a = count(); + @a = count(); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.count.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.count.d.out new file mode 100644 index 00000000..d34fd3b0 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.count.d.out @@ -0,0 +1,2 @@ + + 2 diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.count2.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.count2.d new file mode 100644 index 00000000..624b1b4e --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.count2.d @@ -0,0 +1,54 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Positive count() test + * + * SECTION: Aggregations/Aggregations + */ + +#pragma D option quiet + +BEGIN +{ + i = 0; +} + +tick-10ms +/i != 10/ +{ + i++; + @counts["tick-count"] = count(); +} + +tick-10ms +/i == 10/ +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.count2.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.count2.d.out new file mode 100644 index 00000000..4998a339 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.count2.d.out @@ -0,0 +1,2 @@ + + tick-count 10 diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.count3.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.count3.d new file mode 100644 index 00000000..5913ff60 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.count3.d @@ -0,0 +1,56 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Test multiple count() calls. + * + * SECTION: Aggregations/Aggregations + * + */ + +#pragma D option quiet + +BEGIN +{ + i = 0; +} + +tick-10ms +/i != 10/ +{ + i++; + @counts1[execname] = count(); + @counts2[execname, arg0] = count(); +} + +tick-10ms +/i == 10/ +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.denormalize.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.denormalize.d new file mode 100644 index 00000000..37269e82 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.denormalize.d @@ -0,0 +1,63 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * Simple denormalization test + * + * SECTION: Aggregations/Normalization + * + */ + +#pragma D option quiet + + +BEGIN +{ + i = 0; + start = timestamp; +} + +tick-10ms +/i < 20/ +{ + @func[i % 5] = sum(i * 100); + i++; +} + +tick-10ms +/i == 20/ +{ + normalize(@func, 5); + + printf("denormalized:"); + denormalize(@func); + printa(@func); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.denormalize.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.denormalize.d.out new file mode 100644 index 00000000..fa4d0da7 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.denormalize.d.out @@ -0,0 +1,7 @@ +denormalized: + 0 3000 + 1 3400 + 2 3800 + 3 4200 + 4 4600 + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.denormalizeonly.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.denormalizeonly.d new file mode 100644 index 00000000..d63a83e6 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.denormalizeonly.d @@ -0,0 +1,61 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * denormalize() should work even if normalize() isn't called. + * + * SECTION: Aggregations/Normalization + * + * + */ + +#pragma D option quiet + + +BEGIN +{ + i = 0; + start = timestamp; +} + +tick-10ms +/i < 20/ +{ + @func[i%5] = sum(i * 100); + i++; +} + +tick-10ms +/i == 20/ +{ + printf("denormalized:"); + denormalize(@func); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.denormalizeonly.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.denormalizeonly.d.out new file mode 100644 index 00000000..cc16f277 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.denormalizeonly.d.out @@ -0,0 +1,6 @@ +denormalized: + 0 3000 + 1 3400 + 2 3800 + 3 4200 + 4 4600 diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.fmtnormalize.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.fmtnormalize.d new file mode 100644 index 00000000..8ff3aabf --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.fmtnormalize.d @@ -0,0 +1,61 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Positive test for normalization() with printa() + * + * SECTION: Aggregations/Normalization + * + */ + +#pragma D option quiet +#pragma D option aggrate=1ms +#pragma D option switchrate=50ms + +BEGIN +{ + i = 0; + start = timestamp; +} + +tick-100ms +/i < 20/ +{ + @func[i % 5] = sum(i * 100); + i++; +} + +tick-100ms +/i == 20/ +{ + printf("normalized data:\n"); + normalize(@func, 5); + printa("%u %@u\n", @func); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.fmtnormalize.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.fmtnormalize.d.out new file mode 100644 index 00000000..bbf345be --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.fmtnormalize.d.out @@ -0,0 +1,7 @@ +normalized data: +0 600 +1 680 +2 760 +3 840 +4 920 + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.forms.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.forms.d new file mode 100644 index 00000000..2b08a12d --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.forms.d @@ -0,0 +1,53 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Positive aggregation test + * + * SECTION: Aggregations/Aggregations + * + */ + + +#pragma D option quiet + +BEGIN +{ + @a = count(); + @b = max(1); + @c[0] = count(); + @d[0] = max(1); + + printa("\n@a = %@u\n", @a); + printa("@b = %@u\n", @b); + printa("@c = %@u\n", @c); + printa("@d = %@u\n", @d); + + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.forms.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.forms.d.out new file mode 100644 index 00000000..1f31450d --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.forms.d.out @@ -0,0 +1,6 @@ + +@a = 1 +@b = 1 +@c = 1 +@d = 1 + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.goodkey.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.goodkey.d new file mode 100644 index 00000000..46becd56 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.goodkey.d @@ -0,0 +1,55 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Positive aggregation key test + * + * SECTION: Aggregations/Aggregations + */ + +#pragma D option quiet + +BEGIN +{ + i = 0; +} + +tick-10ms +/i != 5/ +{ + i++; + @counts[execname, pid, id, tid, arg0, vtimestamp ] = count(); + +} + +tick-10ms +/i == 5/ +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.keysort.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.keysort.d new file mode 100644 index 00000000..dbc8b6d2 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.keysort.d @@ -0,0 +1,108 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma D option quiet + +BEGIN +{ + i = 0; + j = 0; + + @tour["Ghent", i++, j] = sum(5 - j); + j++; + + @tour["Berlin", i++, j] = sum(5 - j); + j++; + + @tour["London", i++, j] = sum(5 - j); + @tour["Dublin", i++, j] = sum(5 - j); + j++; + + @tour["Shanghai", i++, j] = sum(5 - j); + j++; + + @tour["Zurich", i++, j] = sum(5 - j); + j++; + + @tour["Regina", i++, j] = sum(5 - j); + @tour["Winnipeg", i++, j] = sum(5 - j); + @tour["Edmonton", i++, j] = sum(5 - j); + @tour["Calgary", i++, j] = sum(5 - j); + @tour["Vancouver", i++, j] = sum(5 - j); + @tour["Victoria", i++, j] = sum(5 - j); + j++; + + @tour["Prague", i++, j] = sum(5 - j); + @tour["London", i++, j] = sum(5 - j); + j++; + + @tour["Brisbane", i++, j] = sum(5 - j); + @tour["Sydney", i++, j] = sum(5 - j); + @tour["Melbourne", i++, j] = sum(5 - j); + j++; + + setopt("aggsortkey", "false"); + setopt("aggsortkeypos", "0"); + @tour["Amsterdam", i++, j] = sum(5 - j); + + printf("By value:\n"); + printa("%20s %8d %8d %8@d\n", @tour); + + setopt("aggsortkey"); + printf("\nBy key, position 0:\n"); + printa("%20s %8d %8d %8@d\n", @tour); + + setopt("aggsortkeypos", "1"); + printf("\nBy key, position 1:\n"); + printa("%20s %8d %8d %8@d\n", @tour); + + setopt("aggsortkeypos", "2"); + printf("\nBy key, position 2:\n"); + printa("%20s %8d %8d %8@d\n", @tour); + + setopt("aggsortkey", "false"); + setopt("aggsortkeypos", "0"); + setopt("aggsortrev"); + + printf("\nReversed by value:\n"); + printa("%20s %8d %8d %8@d\n", @tour); + + setopt("aggsortkey"); + printf("\nReversed by key, position 0:\n"); + printa("%20s %8d %8d %8@d\n", @tour); + + setopt("aggsortkeypos", "1"); + printf("\nReversed by key, position 1:\n"); + printa("%20s %8d %8d %8@d\n", @tour); + + setopt("aggsortkeypos", "2"); + printf("\nReversed by key, position 2:\n"); + printa("%20s %8d %8d %8@d\n", @tour); + + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.keysort.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.keysort.d.out new file mode 100644 index 00000000..250d84b9 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.keysort.d.out @@ -0,0 +1,160 @@ +By value: + Amsterdam 17 8 -3 + Brisbane 14 7 -2 + Melbourne 16 7 -2 + Sydney 15 7 -2 + London 13 6 -1 + Prague 12 6 -1 + Calgary 9 5 0 + Edmonton 8 5 0 + Regina 6 5 0 + Vancouver 10 5 0 + Victoria 11 5 0 + Winnipeg 7 5 0 + Zurich 5 4 1 + Shanghai 4 3 2 + Dublin 3 2 3 + London 2 2 3 + Berlin 1 1 4 + Ghent 0 0 5 + +By key, position 0: + Amsterdam 17 8 -3 + Berlin 1 1 4 + Brisbane 14 7 -2 + Calgary 9 5 0 + Dublin 3 2 3 + Edmonton 8 5 0 + Ghent 0 0 5 + London 2 2 3 + London 13 6 -1 + Melbourne 16 7 -2 + Prague 12 6 -1 + Regina 6 5 0 + Shanghai 4 3 2 + Sydney 15 7 -2 + Vancouver 10 5 0 + Victoria 11 5 0 + Winnipeg 7 5 0 + Zurich 5 4 1 + +By key, position 1: + Ghent 0 0 5 + Berlin 1 1 4 + London 2 2 3 + Dublin 3 2 3 + Shanghai 4 3 2 + Zurich 5 4 1 + Regina 6 5 0 + Winnipeg 7 5 0 + Edmonton 8 5 0 + Calgary 9 5 0 + Vancouver 10 5 0 + Victoria 11 5 0 + Prague 12 6 -1 + London 13 6 -1 + Brisbane 14 7 -2 + Sydney 15 7 -2 + Melbourne 16 7 -2 + Amsterdam 17 8 -3 + +By key, position 2: + Ghent 0 0 5 + Berlin 1 1 4 + Dublin 3 2 3 + London 2 2 3 + Shanghai 4 3 2 + Zurich 5 4 1 + Calgary 9 5 0 + Edmonton 8 5 0 + Regina 6 5 0 + Vancouver 10 5 0 + Victoria 11 5 0 + Winnipeg 7 5 0 + London 13 6 -1 + Prague 12 6 -1 + Brisbane 14 7 -2 + Melbourne 16 7 -2 + Sydney 15 7 -2 + Amsterdam 17 8 -3 + +Reversed by value: + Ghent 0 0 5 + Berlin 1 1 4 + London 2 2 3 + Dublin 3 2 3 + Shanghai 4 3 2 + Zurich 5 4 1 + Winnipeg 7 5 0 + Victoria 11 5 0 + Vancouver 10 5 0 + Regina 6 5 0 + Edmonton 8 5 0 + Calgary 9 5 0 + Prague 12 6 -1 + London 13 6 -1 + Sydney 15 7 -2 + Melbourne 16 7 -2 + Brisbane 14 7 -2 + Amsterdam 17 8 -3 + +Reversed by key, position 0: + Zurich 5 4 1 + Winnipeg 7 5 0 + Victoria 11 5 0 + Vancouver 10 5 0 + Sydney 15 7 -2 + Shanghai 4 3 2 + Regina 6 5 0 + Prague 12 6 -1 + Melbourne 16 7 -2 + London 13 6 -1 + London 2 2 3 + Ghent 0 0 5 + Edmonton 8 5 0 + Dublin 3 2 3 + Calgary 9 5 0 + Brisbane 14 7 -2 + Berlin 1 1 4 + Amsterdam 17 8 -3 + +Reversed by key, position 1: + Amsterdam 17 8 -3 + Melbourne 16 7 -2 + Sydney 15 7 -2 + Brisbane 14 7 -2 + London 13 6 -1 + Prague 12 6 -1 + Victoria 11 5 0 + Vancouver 10 5 0 + Calgary 9 5 0 + Edmonton 8 5 0 + Winnipeg 7 5 0 + Regina 6 5 0 + Zurich 5 4 1 + Shanghai 4 3 2 + Dublin 3 2 3 + London 2 2 3 + Berlin 1 1 4 + Ghent 0 0 5 + +Reversed by key, position 2: + Amsterdam 17 8 -3 + Sydney 15 7 -2 + Melbourne 16 7 -2 + Brisbane 14 7 -2 + Prague 12 6 -1 + London 13 6 -1 + Winnipeg 7 5 0 + Victoria 11 5 0 + Vancouver 10 5 0 + Regina 6 5 0 + Edmonton 8 5 0 + Calgary 9 5 0 + Zurich 5 4 1 + Shanghai 4 3 2 + London 2 2 3 + Dublin 3 2 3 + Berlin 1 1 4 + Ghent 0 0 5 + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.lquantize.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.lquantize.d new file mode 100644 index 00000000..dd25f861 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.lquantize.d @@ -0,0 +1,57 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Positive lquantize() test + * + * SECTION: Aggregations/Aggregations + * + * NOTES: This is verifiable simple positive test of the lquantize() function. + * + */ + +#pragma D option quiet + +BEGIN +{ + i = 0; +} + +tick-10ms +/i < 1000/ +{ + @a[i] = lquantize(i, -100, 1100, 100 ); + i += 100; +} + +tick-10ms +/i == 1000/ +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.lquantize.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.lquantize.d.out new file mode 100644 index 00000000..fecb4483 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.lquantize.d.out @@ -0,0 +1,61 @@ + + 0 + value ------------- Distribution ------------- count + -100 | 0 + 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1 + 100 | 0 + + 100 + value ------------- Distribution ------------- count + 0 | 0 + 100 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1 + 200 | 0 + + 200 + value ------------- Distribution ------------- count + 100 | 0 + 200 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1 + 300 | 0 + + 300 + value ------------- Distribution ------------- count + 200 | 0 + 300 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1 + 400 | 0 + + 400 + value ------------- Distribution ------------- count + 300 | 0 + 400 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1 + 500 | 0 + + 500 + value ------------- Distribution ------------- count + 400 | 0 + 500 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1 + 600 | 0 + + 600 + value ------------- Distribution ------------- count + 500 | 0 + 600 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1 + 700 | 0 + + 700 + value ------------- Distribution ------------- count + 600 | 0 + 700 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1 + 800 | 0 + + 800 + value ------------- Distribution ------------- count + 700 | 0 + 800 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1 + 900 | 0 + + 900 + value ------------- Distribution ------------- count + 800 | 0 + 900 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1 + 1000 | 0 + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.lquantnormal.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.lquantnormal.d new file mode 100644 index 00000000..003f846f --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.lquantnormal.d @@ -0,0 +1,51 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma D option quiet + +tick-10ms +/i++ < 10/ +{ + @ = lquantize(i, 0, 10); + @ = lquantize(i, 0, 10); + @ = lquantize(i, 0, 10); + @ = lquantize(i, 0, 10); + @ = lquantize(i, 0, 10); +} + +tick-10ms +/i == 10/ +{ + exit(0); +} + +END +{ + normalize(@, 5); + printa(@); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.lquantnormal.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.lquantnormal.d.out new file mode 100644 index 00000000..76b55b9c --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.lquantnormal.d.out @@ -0,0 +1,16 @@ + + + value ------------- Distribution ------------- count + 0 | 0 + 1 |@@@@ 1 + 2 |@@@@ 1 + 3 |@@@@ 1 + 4 |@@@@ 1 + 5 |@@@@ 1 + 6 |@@@@ 1 + 7 |@@@@ 1 + 8 |@@@@ 1 + 9 |@@@@ 1 + >= 10 |@@@@ 1 + + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.lquantrange.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.lquantrange.d new file mode 100644 index 00000000..e9e67165 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.lquantrange.d @@ -0,0 +1,40 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma D option quiet + +BEGIN +{ + @["Nixon"] = lquantize(-20, -10, 10, 1, 25); + @["Hoover"] = lquantize(20, -10, 10, 1, -100); + @["Harding"] = lquantize(-10, -10, 10, 1, 15); + @["Bush"] = lquantize(10, -10, 10, 1, 150); + + printa(@); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.lquantrange.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.lquantrange.d.out new file mode 100644 index 00000000..88d3505b --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.lquantrange.d.out @@ -0,0 +1,23 @@ + + Hoover + value ------------- Distribution ------------- count + 9 | 0 + >= 10 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -100 + + Nixon + value ------------- Distribution ------------- count + < -10 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 25 + -10 | 0 + + Harding + value ------------- Distribution ------------- count + < -10 | 0 + -10 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 15 + -9 | 0 + + Bush + value ------------- Distribution ------------- count + 9 | 0 + >= 10 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 150 + + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.lquantround.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.lquantround.d new file mode 100644 index 00000000..ad609ed2 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.lquantround.d @@ -0,0 +1,57 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma D option quiet + +/* + * This test verifies that the height of the ASCII quantization bars is + * determined using rounding and not truncated integer arithmetic. + */ +tick-10ms +/i++ >= 27/ +{ + exit(0); +} + +tick-10ms +/i > 8/ +{ + @ = lquantize(2, 0, 4); +} + +tick-10ms +/i > 2 && i <= 8/ +{ + @ = lquantize(1, 0, 4); +} + +tick-10ms +/i <= 2/ +{ + @ = lquantize(0, 0, 4); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.lquantround.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.lquantround.d.out new file mode 100644 index 00000000..1aa94e33 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.lquantround.d.out @@ -0,0 +1,9 @@ + + + value ------------- Distribution ------------- count + < 0 | 0 + 0 |@@@ 2 + 1 |@@@@@@@@@ 6 + 2 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 19 + 3 | 0 + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.lquantzero.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.lquantzero.d new file mode 100644 index 00000000..3905f2bd --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.lquantzero.d @@ -0,0 +1,96 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma D option quiet + + +BEGIN +{ + a = 7; + b = 13; + val = (-a * b) + a; +} + +tick-1ms +{ + incr = val % b; + val += a; +} + +tick-1ms +/val == 0/ +{ + val += a; +} + +tick-1ms +/incr != 0/ +{ + i++; + @one[i] = lquantize(0, 10, 20, 1, incr); + @two[i] = lquantize(0, 1, 20, 5, incr); + @three[i] = lquantize(0, 0, 20, 1, incr); + @four[i] = lquantize(0, -10, 10, 1, incr); + @five[i] = lquantize(0, -10, 0, 1, incr); + @six[i] = lquantize(0, -10, -1, 1, incr); + @seven[i] = lquantize(0, -10, -2, 1, incr); +} + +tick-1ms +/incr == 0/ +{ + printf("Zero below the range:\n"); + printa(@one); + printf("\n"); + + printf("Zero just below the range:\n"); + printa(@two); + printf("\n"); + + printf("Zero at the bottom of the range:\n"); + printa(@three); + printf("\n"); + + printf("Zero within the range:\n"); + printa(@four); + printf("\n"); + + printf("Zero at the top of the range:\n"); + printa(@five); + printf("\n"); + + printf("Zero just above the range:\n"); + printa(@six); + printf("\n"); + + printf("Zero above the range:\n"); + printa(@seven); + printf("\n"); + + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.lquantzero.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.lquantzero.d.out new file mode 100644 index 00000000..330de38a --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.lquantzero.d.out @@ -0,0 +1,910 @@ +Zero below the range: + + 2 + value ------------- Distribution ------------- count + < 10 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -12 + 10 | 0 + + 4 + value ------------- Distribution ------------- count + < 10 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -11 + 10 | 0 + + 6 + value ------------- Distribution ------------- count + < 10 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -10 + 10 | 0 + + 8 + value ------------- Distribution ------------- count + < 10 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -9 + 10 | 0 + + 10 + value ------------- Distribution ------------- count + < 10 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -8 + 10 | 0 + + 12 + value ------------- Distribution ------------- count + < 10 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -7 + 10 | 0 + + 1 + value ------------- Distribution ------------- count + < 10 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -6 + 10 | 0 + + 3 + value ------------- Distribution ------------- count + < 10 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -5 + 10 | 0 + + 5 + value ------------- Distribution ------------- count + < 10 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -4 + 10 | 0 + + 7 + value ------------- Distribution ------------- count + < 10 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -3 + 10 | 0 + + 9 + value ------------- Distribution ------------- count + < 10 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -2 + 10 | 0 + + 11 + value ------------- Distribution ------------- count + < 10 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -1 + 10 | 0 + + 14 + value ------------- Distribution ------------- count + < 10 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1 + 10 | 0 + + 16 + value ------------- Distribution ------------- count + < 10 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 2 + 10 | 0 + + 18 + value ------------- Distribution ------------- count + < 10 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 3 + 10 | 0 + + 20 + value ------------- Distribution ------------- count + < 10 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 4 + 10 | 0 + + 22 + value ------------- Distribution ------------- count + < 10 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 5 + 10 | 0 + + 24 + value ------------- Distribution ------------- count + < 10 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 6 + 10 | 0 + + 13 + value ------------- Distribution ------------- count + < 10 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 7 + 10 | 0 + + 15 + value ------------- Distribution ------------- count + < 10 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 8 + 10 | 0 + + 17 + value ------------- Distribution ------------- count + < 10 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 9 + 10 | 0 + + 19 + value ------------- Distribution ------------- count + < 10 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 10 + 10 | 0 + + 21 + value ------------- Distribution ------------- count + < 10 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 11 + 10 | 0 + + 23 + value ------------- Distribution ------------- count + < 10 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 12 + 10 | 0 + + +Zero just below the range: + + 2 + value ------------- Distribution ------------- count + < 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -12 + 1 | 0 + + 4 + value ------------- Distribution ------------- count + < 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -11 + 1 | 0 + + 6 + value ------------- Distribution ------------- count + < 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -10 + 1 | 0 + + 8 + value ------------- Distribution ------------- count + < 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -9 + 1 | 0 + + 10 + value ------------- Distribution ------------- count + < 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -8 + 1 | 0 + + 12 + value ------------- Distribution ------------- count + < 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -7 + 1 | 0 + + 1 + value ------------- Distribution ------------- count + < 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -6 + 1 | 0 + + 3 + value ------------- Distribution ------------- count + < 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -5 + 1 | 0 + + 5 + value ------------- Distribution ------------- count + < 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -4 + 1 | 0 + + 7 + value ------------- Distribution ------------- count + < 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -3 + 1 | 0 + + 9 + value ------------- Distribution ------------- count + < 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -2 + 1 | 0 + + 11 + value ------------- Distribution ------------- count + < 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -1 + 1 | 0 + + 14 + value ------------- Distribution ------------- count + < 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1 + 1 | 0 + + 16 + value ------------- Distribution ------------- count + < 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 2 + 1 | 0 + + 18 + value ------------- Distribution ------------- count + < 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 3 + 1 | 0 + + 20 + value ------------- Distribution ------------- count + < 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 4 + 1 | 0 + + 22 + value ------------- Distribution ------------- count + < 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 5 + 1 | 0 + + 24 + value ------------- Distribution ------------- count + < 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 6 + 1 | 0 + + 13 + value ------------- Distribution ------------- count + < 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 7 + 1 | 0 + + 15 + value ------------- Distribution ------------- count + < 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 8 + 1 | 0 + + 17 + value ------------- Distribution ------------- count + < 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 9 + 1 | 0 + + 19 + value ------------- Distribution ------------- count + < 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 10 + 1 | 0 + + 21 + value ------------- Distribution ------------- count + < 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 11 + 1 | 0 + + 23 + value ------------- Distribution ------------- count + < 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 12 + 1 | 0 + + +Zero at the bottom of the range: + + 2 + value ------------- Distribution ------------- count + < 0 | 0 + 0 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -12 + 1 | 0 + + 4 + value ------------- Distribution ------------- count + < 0 | 0 + 0 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -11 + 1 | 0 + + 6 + value ------------- Distribution ------------- count + < 0 | 0 + 0 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -10 + 1 | 0 + + 8 + value ------------- Distribution ------------- count + < 0 | 0 + 0 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -9 + 1 | 0 + + 10 + value ------------- Distribution ------------- count + < 0 | 0 + 0 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -8 + 1 | 0 + + 12 + value ------------- Distribution ------------- count + < 0 | 0 + 0 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -7 + 1 | 0 + + 1 + value ------------- Distribution ------------- count + < 0 | 0 + 0 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -6 + 1 | 0 + + 3 + value ------------- Distribution ------------- count + < 0 | 0 + 0 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -5 + 1 | 0 + + 5 + value ------------- Distribution ------------- count + < 0 | 0 + 0 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -4 + 1 | 0 + + 7 + value ------------- Distribution ------------- count + < 0 | 0 + 0 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -3 + 1 | 0 + + 9 + value ------------- Distribution ------------- count + < 0 | 0 + 0 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -2 + 1 | 0 + + 11 + value ------------- Distribution ------------- count + < 0 | 0 + 0 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -1 + 1 | 0 + + 14 + value ------------- Distribution ------------- count + < 0 | 0 + 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1 + 1 | 0 + + 16 + value ------------- Distribution ------------- count + < 0 | 0 + 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 2 + 1 | 0 + + 18 + value ------------- Distribution ------------- count + < 0 | 0 + 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 3 + 1 | 0 + + 20 + value ------------- Distribution ------------- count + < 0 | 0 + 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 4 + 1 | 0 + + 22 + value ------------- Distribution ------------- count + < 0 | 0 + 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 5 + 1 | 0 + + 24 + value ------------- Distribution ------------- count + < 0 | 0 + 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 6 + 1 | 0 + + 13 + value ------------- Distribution ------------- count + < 0 | 0 + 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 7 + 1 | 0 + + 15 + value ------------- Distribution ------------- count + < 0 | 0 + 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 8 + 1 | 0 + + 17 + value ------------- Distribution ------------- count + < 0 | 0 + 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 9 + 1 | 0 + + 19 + value ------------- Distribution ------------- count + < 0 | 0 + 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 10 + 1 | 0 + + 21 + value ------------- Distribution ------------- count + < 0 | 0 + 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 11 + 1 | 0 + + 23 + value ------------- Distribution ------------- count + < 0 | 0 + 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 12 + 1 | 0 + + +Zero within the range: + + 2 + value ------------- Distribution ------------- count + -1 | 0 + 0 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -12 + 1 | 0 + + 4 + value ------------- Distribution ------------- count + -1 | 0 + 0 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -11 + 1 | 0 + + 6 + value ------------- Distribution ------------- count + -1 | 0 + 0 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -10 + 1 | 0 + + 8 + value ------------- Distribution ------------- count + -1 | 0 + 0 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -9 + 1 | 0 + + 10 + value ------------- Distribution ------------- count + -1 | 0 + 0 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -8 + 1 | 0 + + 12 + value ------------- Distribution ------------- count + -1 | 0 + 0 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -7 + 1 | 0 + + 1 + value ------------- Distribution ------------- count + -1 | 0 + 0 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -6 + 1 | 0 + + 3 + value ------------- Distribution ------------- count + -1 | 0 + 0 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -5 + 1 | 0 + + 5 + value ------------- Distribution ------------- count + -1 | 0 + 0 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -4 + 1 | 0 + + 7 + value ------------- Distribution ------------- count + -1 | 0 + 0 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -3 + 1 | 0 + + 9 + value ------------- Distribution ------------- count + -1 | 0 + 0 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -2 + 1 | 0 + + 11 + value ------------- Distribution ------------- count + -1 | 0 + 0 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -1 + 1 | 0 + + 14 + value ------------- Distribution ------------- count + -1 | 0 + 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1 + 1 | 0 + + 16 + value ------------- Distribution ------------- count + -1 | 0 + 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 2 + 1 | 0 + + 18 + value ------------- Distribution ------------- count + -1 | 0 + 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 3 + 1 | 0 + + 20 + value ------------- Distribution ------------- count + -1 | 0 + 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 4 + 1 | 0 + + 22 + value ------------- Distribution ------------- count + -1 | 0 + 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 5 + 1 | 0 + + 24 + value ------------- Distribution ------------- count + -1 | 0 + 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 6 + 1 | 0 + + 13 + value ------------- Distribution ------------- count + -1 | 0 + 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 7 + 1 | 0 + + 15 + value ------------- Distribution ------------- count + -1 | 0 + 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 8 + 1 | 0 + + 17 + value ------------- Distribution ------------- count + -1 | 0 + 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 9 + 1 | 0 + + 19 + value ------------- Distribution ------------- count + -1 | 0 + 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 10 + 1 | 0 + + 21 + value ------------- Distribution ------------- count + -1 | 0 + 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 11 + 1 | 0 + + 23 + value ------------- Distribution ------------- count + -1 | 0 + 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 12 + 1 | 0 + + +Zero at the top of the range: + + 2 + value ------------- Distribution ------------- count + -1 | 0 + >= 0 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -12 + + 4 + value ------------- Distribution ------------- count + -1 | 0 + >= 0 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -11 + + 6 + value ------------- Distribution ------------- count + -1 | 0 + >= 0 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -10 + + 8 + value ------------- Distribution ------------- count + -1 | 0 + >= 0 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -9 + + 10 + value ------------- Distribution ------------- count + -1 | 0 + >= 0 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -8 + + 12 + value ------------- Distribution ------------- count + -1 | 0 + >= 0 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -7 + + 1 + value ------------- Distribution ------------- count + -1 | 0 + >= 0 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -6 + + 3 + value ------------- Distribution ------------- count + -1 | 0 + >= 0 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -5 + + 5 + value ------------- Distribution ------------- count + -1 | 0 + >= 0 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -4 + + 7 + value ------------- Distribution ------------- count + -1 | 0 + >= 0 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -3 + + 9 + value ------------- Distribution ------------- count + -1 | 0 + >= 0 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -2 + + 11 + value ------------- Distribution ------------- count + -1 | 0 + >= 0 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -1 + + 14 + value ------------- Distribution ------------- count + -1 | 0 + >= 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1 + + 16 + value ------------- Distribution ------------- count + -1 | 0 + >= 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 2 + + 18 + value ------------- Distribution ------------- count + -1 | 0 + >= 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 3 + + 20 + value ------------- Distribution ------------- count + -1 | 0 + >= 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 4 + + 22 + value ------------- Distribution ------------- count + -1 | 0 + >= 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 5 + + 24 + value ------------- Distribution ------------- count + -1 | 0 + >= 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 6 + + 13 + value ------------- Distribution ------------- count + -1 | 0 + >= 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 7 + + 15 + value ------------- Distribution ------------- count + -1 | 0 + >= 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 8 + + 17 + value ------------- Distribution ------------- count + -1 | 0 + >= 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 9 + + 19 + value ------------- Distribution ------------- count + -1 | 0 + >= 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 10 + + 21 + value ------------- Distribution ------------- count + -1 | 0 + >= 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 11 + + 23 + value ------------- Distribution ------------- count + -1 | 0 + >= 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 12 + + +Zero just above the range: + + 2 + value ------------- Distribution ------------- count + -2 | 0 + >= -1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -12 + + 4 + value ------------- Distribution ------------- count + -2 | 0 + >= -1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -11 + + 6 + value ------------- Distribution ------------- count + -2 | 0 + >= -1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -10 + + 8 + value ------------- Distribution ------------- count + -2 | 0 + >= -1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -9 + + 10 + value ------------- Distribution ------------- count + -2 | 0 + >= -1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -8 + + 12 + value ------------- Distribution ------------- count + -2 | 0 + >= -1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -7 + + 1 + value ------------- Distribution ------------- count + -2 | 0 + >= -1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -6 + + 3 + value ------------- Distribution ------------- count + -2 | 0 + >= -1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -5 + + 5 + value ------------- Distribution ------------- count + -2 | 0 + >= -1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -4 + + 7 + value ------------- Distribution ------------- count + -2 | 0 + >= -1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -3 + + 9 + value ------------- Distribution ------------- count + -2 | 0 + >= -1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -2 + + 11 + value ------------- Distribution ------------- count + -2 | 0 + >= -1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -1 + + 14 + value ------------- Distribution ------------- count + -2 | 0 + >= -1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1 + + 16 + value ------------- Distribution ------------- count + -2 | 0 + >= -1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 2 + + 18 + value ------------- Distribution ------------- count + -2 | 0 + >= -1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 3 + + 20 + value ------------- Distribution ------------- count + -2 | 0 + >= -1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 4 + + 22 + value ------------- Distribution ------------- count + -2 | 0 + >= -1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 5 + + 24 + value ------------- Distribution ------------- count + -2 | 0 + >= -1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 6 + + 13 + value ------------- Distribution ------------- count + -2 | 0 + >= -1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 7 + + 15 + value ------------- Distribution ------------- count + -2 | 0 + >= -1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 8 + + 17 + value ------------- Distribution ------------- count + -2 | 0 + >= -1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 9 + + 19 + value ------------- Distribution ------------- count + -2 | 0 + >= -1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 10 + + 21 + value ------------- Distribution ------------- count + -2 | 0 + >= -1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 11 + + 23 + value ------------- Distribution ------------- count + -2 | 0 + >= -1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 12 + + +Zero above the range: + + 23 + value ------------- Distribution ------------- count + -3 | 0 + >= -2 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 12 + + 21 + value ------------- Distribution ------------- count + -3 | 0 + >= -2 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 11 + + 19 + value ------------- Distribution ------------- count + -3 | 0 + >= -2 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 10 + + 17 + value ------------- Distribution ------------- count + -3 | 0 + >= -2 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 9 + + 15 + value ------------- Distribution ------------- count + -3 | 0 + >= -2 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 8 + + 13 + value ------------- Distribution ------------- count + -3 | 0 + >= -2 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 7 + + 24 + value ------------- Distribution ------------- count + -3 | 0 + >= -2 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 6 + + 22 + value ------------- Distribution ------------- count + -3 | 0 + >= -2 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 5 + + 20 + value ------------- Distribution ------------- count + -3 | 0 + >= -2 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 4 + + 18 + value ------------- Distribution ------------- count + -3 | 0 + >= -2 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 3 + + 16 + value ------------- Distribution ------------- count + -3 | 0 + >= -2 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 2 + + 14 + value ------------- Distribution ------------- count + -3 | 0 + >= -2 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1 + + 11 + value ------------- Distribution ------------- count + -3 | 0 + >= -2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -1 + + 9 + value ------------- Distribution ------------- count + -3 | 0 + >= -2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -2 + + 7 + value ------------- Distribution ------------- count + -3 | 0 + >= -2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -3 + + 5 + value ------------- Distribution ------------- count + -3 | 0 + >= -2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -4 + + 3 + value ------------- Distribution ------------- count + -3 | 0 + >= -2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -5 + + 1 + value ------------- Distribution ------------- count + -3 | 0 + >= -2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -6 + + 12 + value ------------- Distribution ------------- count + -3 | 0 + >= -2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -7 + + 10 + value ------------- Distribution ------------- count + -3 | 0 + >= -2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -8 + + 8 + value ------------- Distribution ------------- count + -3 | 0 + >= -2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -9 + + 6 + value ------------- Distribution ------------- count + -3 | 0 + >= -2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -10 + + 4 + value ------------- Distribution ------------- count + -3 | 0 + >= -2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -11 + + 2 + value ------------- Distribution ------------- count + -3 | 0 + >= -2 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -12 + + + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.max.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.max.d new file mode 100644 index 00000000..0c973ad5 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.max.d @@ -0,0 +1,58 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Positive max() test + * + * SECTION: Aggregations/Aggregations + * + * NOTES: This is verifiable simple positive test of the max() function. + * + */ + +#pragma D option quiet + +BEGIN +{ + i = 0; +} + +tick-10ms +/i < 1000/ +{ + @a = max(i); + i += 100; +} + +tick-10ms +/i == 1000/ +{ + printa(@a); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.max.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.max.d.out new file mode 100644 index 00000000..d3957f4c --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.max.d.out @@ -0,0 +1,3 @@ + + 900 + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.max_neg.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.max_neg.d new file mode 100644 index 00000000..63486e5f --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.max_neg.d @@ -0,0 +1,46 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Positive max() test using negative values + * + * SECTION: Aggregations/Aggregations + * + * NOTES: This is verifiable simple positive test of the max() function. + * + */ + +#pragma D option quiet + +BEGIN +{ + @ = max(0); + @ = max(-900); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.max_neg.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.max_neg.d.out new file mode 100644 index 00000000..8d23188f --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.max_neg.d.out @@ -0,0 +1,2 @@ + + 0 diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.min.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.min.d new file mode 100644 index 00000000..aff5452e --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.min.d @@ -0,0 +1,57 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Positive min() test + * + * SECTION: Aggregations/Aggregations + * + * NOTES: This is verifiable simple positive test of the min() function. + * + */ + +#pragma D option quiet + +BEGIN +{ + i = 0; +} + +tick-10ms +/i < 1000/ +{ + @a = min(i); + i += 100; +} + +tick-10ms +/i == 1000/ +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.min.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.min.d.out new file mode 100644 index 00000000..8d23188f --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.min.d.out @@ -0,0 +1,2 @@ + + 0 diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.min_neg.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.min_neg.d new file mode 100644 index 00000000..20f0a56d --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.min_neg.d @@ -0,0 +1,46 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Positive min() test using negative values + * + * SECTION: Aggregations/Aggregations + * + * NOTES: This is verifiable simple positive test of the min() function. + * + */ + +#pragma D option quiet + +BEGIN +{ + @ = min(0); + @ = min(-900); + exit (0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.min_neg.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.min_neg.d.out new file mode 100644 index 00000000..461b29cf --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.min_neg.d.out @@ -0,0 +1,2 @@ + + -900 diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.multiaggs1.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.multiaggs1.d new file mode 100644 index 00000000..c65fb529 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.multiaggs1.d @@ -0,0 +1,66 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +/* + * ASSERTION: + * Multiple aggregates can be used within the same D script. + * + * SECTION: Aggregations/Aggregations + * + */ + +#pragma D option quiet + +BEGIN +{ + time_1 = timestamp; + i = 0; +} + +tick-10ms +/i <= 10/ +{ + time_2 = timestamp; + new_time = time_2 - time_1; + @a[pid] = max(new_time); + @b[pid] = min(new_time); + @c[pid] = avg(new_time); + @d[pid] = sum(new_time); + @e[pid] = quantize(new_time); + @f[pid] = stddev(new_time); + @g[timestamp] = max(new_time); + @h[timestamp] = quantize(new_time); + @i[timestamp] = lquantize(new_time, 0, 10000, 1000); + + time_1 = time_2; + i++; +} + +tick-10ms +/i == 10/ +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.multiaggs2.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.multiaggs2.d new file mode 100644 index 00000000..b34d73fa --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.multiaggs2.d @@ -0,0 +1,61 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +/* + * ASSERTION: + * Test multiple aggregations and the default output order + * + * SECTION: Aggregations/Aggregations; + * Aggregations/Output + * + */ + +#pragma D option quiet + +BEGIN +{ + i = 0; +} + +tick-10ms +/i < 1000/ +{ + @a = avg(i); + @b = sum(i); + @c = min(i); + @d = max(i); + @e = quantize(i); + @f = lquantize(i, 0, 1000, 100); + @g = stddev(i); + + i += 100; +} + +tick-10ms +/i == 1000/ +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.multiaggs2.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.multiaggs2.d.out new file mode 100644 index 00000000..579f78dd --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.multiaggs2.d.out @@ -0,0 +1,37 @@ + + 450 + 4500 + 0 + 900 + + value ------------- Distribution ------------- count + -1 | 0 + 0 |@@@@ 1 + 1 | 0 + 2 | 0 + 4 | 0 + 8 | 0 + 16 | 0 + 32 | 0 + 64 |@@@@ 1 + 128 |@@@@ 1 + 256 |@@@@@@@@@@@@ 3 + 512 |@@@@@@@@@@@@@@@@ 4 + 1024 | 0 + + + value ------------- Distribution ------------- count + < 0 | 0 + 0 |@@@@ 1 + 100 |@@@@ 1 + 200 |@@@@ 1 + 300 |@@@@ 1 + 400 |@@@@ 1 + 500 |@@@@ 1 + 600 |@@@@ 1 + 700 |@@@@ 1 + 800 |@@@@ 1 + 900 |@@@@ 1 + >= 1000 | 0 + + 287 diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.multiaggs3.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.multiaggs3.d new file mode 100644 index 00000000..21d2fa9e --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.multiaggs3.d @@ -0,0 +1,74 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +/* + * ASSERTION: + * Test multiple aggregations and overriding default order with + * printa() statements. + * + * SECTION: Aggregations/Aggregations; + * Aggregations/Output + * + * NOTES: This is a simple verifiable test. + * + */ + +#pragma D option quiet + +BEGIN +{ + i = 0; +} + +tick-10ms +/i < 1000/ +{ + @a = count(); + @b = avg(i); + @c = sum(i); + @d = min(i); + @e = max(i); + @f = quantize(i); + @g = lquantize(i, 0, 1000, 100); + @h = stddev(i); + + i += 100; +} + +tick-10ms +/i == 1000/ +{ + printa("%@d\n", @h); + printa("%@d\n", @g); + printa("%@d\n", @f); + printa("%@d\n", @e); + printa("%@d\n", @d); + printa("%@d\n", @c); + printa("%@d\n", @b); + printa("%@d\n", @a); + + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.multiaggs3.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.multiaggs3.d.out new file mode 100644 index 00000000..ab976601 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.multiaggs3.d.out @@ -0,0 +1,38 @@ +287 + + value ------------- Distribution ------------- count + < 0 | 0 + 0 |@@@@ 1 + 100 |@@@@ 1 + 200 |@@@@ 1 + 300 |@@@@ 1 + 400 |@@@@ 1 + 500 |@@@@ 1 + 600 |@@@@ 1 + 700 |@@@@ 1 + 800 |@@@@ 1 + 900 |@@@@ 1 + >= 1000 | 0 + + + value ------------- Distribution ------------- count + -1 | 0 + 0 |@@@@ 1 + 1 | 0 + 2 | 0 + 4 | 0 + 8 | 0 + 16 | 0 + 32 | 0 + 64 |@@@@ 1 + 128 |@@@@ 1 + 256 |@@@@@@@@@@@@ 3 + 512 |@@@@@@@@@@@@@@@@ 4 + 1024 | 0 + +900 +0 +4500 +450 +10 + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.multinormalize.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.multinormalize.d new file mode 100644 index 00000000..2cfa1848 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.multinormalize.d @@ -0,0 +1,65 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Multiple aggregations are supported + * + * SECTION: Aggregations/Normalization + * + */ + +#pragma D option quiet +#pragma D option aggrate=1ms +#pragma D option switchrate=50ms + +BEGIN +{ + i = 0; + start = timestamp; +} + +tick-100ms +/i < 20/ +{ + @func1[i % 5] = sum(i * 100); + @func2[i % 5 + 1] = sum(i * 200); + i++; +} + +tick-100ms +/i == 20/ +{ + printf("normalized data #1:\n"); + normalize(@func1, 5); + printa(@func1); + + printf("\nnormalized data #2:\n"); + normalize(@func2, 5); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.multinormalize.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.multinormalize.d.out new file mode 100644 index 00000000..992b31e2 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.multinormalize.d.out @@ -0,0 +1,15 @@ +normalized data #1: + + 0 600 + 1 680 + 2 760 + 3 840 + 4 920 + +normalized data #2: + + 1 1200 + 2 1360 + 3 1520 + 4 1680 + 5 1840 diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.neglquant.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.neglquant.d new file mode 100644 index 00000000..d24884b5 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.neglquant.d @@ -0,0 +1,150 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma D option quiet + +BEGIN +{ + @["j-church"] = lquantize(1, 0, 10, 1, 100); + @["j-church"] = lquantize(1, 0, 10, 1, -99); + @["j-church"] = lquantize(1, 0, 10, 1, -1); + val = 123; +} + +BEGIN +{ + @["k-ingleside"] = lquantize(1, 0, 10, 1, -val); +} + +BEGIN +{ + @["l-taraval"] = lquantize(0, 0, 10, 1, -val); + @["l-taraval"] = lquantize(-1, 0, 10, 1, -val); + @["l-taraval"] = lquantize(1, 0, 10, 1, val); + @["l-taraval"] = lquantize(1, 0, 10, 1, val); +} + +BEGIN +{ + @["m-oceanview"] = lquantize(1, 0, 10, 1, (1 << 63) - 1); + @["m-oceanview"] = lquantize(1, 0, 10, 1); + @["m-oceanview"] = lquantize(2, 0, 10, 1, (1 << 63) - 1); + @["m-oceanview"] = lquantize(8, 0, 10, 1, 400000); +} + +BEGIN +{ + @["n-judah"] = lquantize(1, 0, 10, 1, val); + @["n-judah"] = lquantize(2, 0, 10, 1, val); + @["n-judah"] = lquantize(2, 0, 10, 1, val); + @["n-judah"] = lquantize(2, 0, 10, 1); +} + +BEGIN +{ + this->i = 1; + this->val = (1 << 63) - 1; + + @["f-market"] = lquantize(this->i, 0, 10, 1, this->val); + this->i++; + this->val = ((1 << 63) - 1) / this->i; + + @["f-market"] = lquantize(this->i, 0, 10, 1, this->val); + this->i++; + this->val = ((1 << 63) - 1) / this->i; + + @["f-market"] = lquantize(this->i, 0, 10, 1, this->val); + this->i++; + this->val = ((1 << 63) - 1) / this->i; + + @["f-market"] = lquantize(this->i, 0, 10, 1, this->val); + this->i++; + this->val = ((1 << 63) - 1) / this->i; + + @["f-market"] = lquantize(this->i, 0, 10, 1, this->val); + this->i++; + this->val = ((1 << 63) - 1) / this->i; + + @["f-market"] = lquantize(this->i, 0, 10, 1, this->val); + this->i++; + this->val = ((1 << 63) - 1) / this->i; + + @["f-market"] = lquantize(this->i, 0, 10, 1, this->val); + this->i++; + this->val = ((1 << 63) - 1) / this->i; +} + +BEGIN +{ + this->i = 1; + + /* + * We want to test the ability to sort very large quantizations + * that differ by a small amount. Ideally, they would differ only + * by 1 -- but that is smaller than the precision of long doubles of + * this magnitude on x86. To assure that the same test works on x86 + * just as it does on SPARC, we pick a value that is just larger than + * the precision at this magnitude. It should go without saying that + * this robustness on new ISAs very much depends on the precision + * of the long double representation. + */ + this->val = (1 << 63) - 7; + + @["s-castro"] = lquantize(this->i, 0, 10, 1, this->val); + this->i++; + this->val = ((1 << 63) - 1) / this->i; + + @["s-castro"] = lquantize(this->i, 0, 10, 1, this->val); + this->i++; + this->val = ((1 << 63) - 1) / this->i; + + @["s-castro"] = lquantize(this->i, 0, 10, 1, this->val); + this->i++; + this->val = ((1 << 63) - 1) / this->i; + + @["s-castro"] = lquantize(this->i, 0, 10, 1, this->val); + this->i++; + this->val = ((1 << 63) - 1) / this->i; + + @["s-castro"] = lquantize(this->i, 0, 10, 1, this->val); + this->i++; + this->val = ((1 << 63) - 1) / this->i; + + @["s-castro"] = lquantize(this->i, 0, 10, 1, this->val); + this->i++; + this->val = ((1 << 63) - 1) / this->i; + + @["s-castro"] = lquantize(this->i, 0, 10, 1, this->val); + this->i++; + this->val = ((1 << 63) - 1) / this->i; +} + +BEGIN +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.neglquant.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.neglquant.d.out new file mode 100644 index 00000000..3b7533b1 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.neglquant.d.out @@ -0,0 +1,64 @@ + + k-ingleside + value ------------- Distribution ------------- count + 0 | 0 + 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -123 + 2 | 0 + + j-church + value ------------- Distribution ------------- count + < 0 | 0 + 0 | 0 + 1 | 0 + + l-taraval + value ------------- Distribution ------------- count + < 0 @@@@@| -123 + 0 @@@@@| -123 + 1 |@@@@@@@@@@ 246 + 2 | 0 + + n-judah + value ------------- Distribution ------------- count + 0 | 0 + 1 |@@@@@@@@@@@@@ 123 + 2 |@@@@@@@@@@@@@@@@@@@@@@@@@@@ 247 + 3 | 0 + + m-oceanview + value ------------- Distribution ------------- count + 0 | 0 + 1 @@@@@@@@@@| -9223372036854775808 + 2 |@@@@@@@@@@ 9223372036854775807 + 3 | 0 + 4 | 0 + 5 | 0 + 6 | 0 + 7 | 0 + 8 | 400000 + 9 | 0 + + s-castro + value ------------- Distribution ------------- count + 0 | 0 + 1 |@@@@@@@@@@@@@@@ 9223372036854775801 + 2 |@@@@@@@@ 4611686018427387903 + 3 |@@@@@ 3074457345618258602 + 4 |@@@@ 2305843009213693951 + 5 |@@@ 1844674407370955161 + 6 |@@@ 1537228672809129301 + 7 |@@ 1317624576693539401 + 8 | 0 + + f-market + value ------------- Distribution ------------- count + 0 | 0 + 1 |@@@@@@@@@@@@@@@ 9223372036854775807 + 2 |@@@@@@@@ 4611686018427387903 + 3 |@@@@@ 3074457345618258602 + 4 |@@@@ 2305843009213693951 + 5 |@@@ 1844674407370955161 + 6 |@@@ 1537228672809129301 + 7 |@@ 1317624576693539401 + 8 | 0 + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.negorder.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.negorder.d new file mode 100644 index 00000000..440c4839 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.negorder.d @@ -0,0 +1,85 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma D option quiet + +BEGIN +{ + a = 7; + b = 13; + val = (-a * b) + a; +} + +tick-1ms +{ + incr = val % b; + val += a; +} + +tick-1ms +/val == 0/ +{ + val += a; +} + +tick-1ms +/incr != 0/ +{ + i++; + @quanty[i] = quantize(1, incr); + @lquanty[i] = lquantize(1, -10, 10, 1, incr); + @summy[i] = sum(incr); + @maxxy[i] = max(incr); + @minny[i] = min(incr); +} + +tick-1ms +/incr == 0/ +{ + printf("Ordering of quantize() with some negative weights:\n"); + printa(@quanty); + printf("\n"); + + printf("Ordering of lquantize() with some negative weights:\n"); + printa(@lquanty); + printf("\n"); + + printf("Ordering of sum() with some negative weights:\n"); + printa(@summy); + printf("\n"); + + printf("Ordering of max() with some negative weights:\n"); + printa(@maxxy); + printf("\n"); + + printf("Ordering of min() with some negative weights:\n"); + printa(@minny); + printf("\n"); + + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.negorder.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.negorder.d.out new file mode 100644 index 00000000..a03b6850 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.negorder.d.out @@ -0,0 +1,376 @@ +Ordering of quantize() with some negative weights: + + 2 + value ------------- Distribution ------------- count + 0 | 0 + 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -12 + 2 | 0 + + 4 + value ------------- Distribution ------------- count + 0 | 0 + 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -11 + 2 | 0 + + 6 + value ------------- Distribution ------------- count + 0 | 0 + 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -10 + 2 | 0 + + 8 + value ------------- Distribution ------------- count + 0 | 0 + 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -9 + 2 | 0 + + 10 + value ------------- Distribution ------------- count + 0 | 0 + 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -8 + 2 | 0 + + 12 + value ------------- Distribution ------------- count + 0 | 0 + 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -7 + 2 | 0 + + 1 + value ------------- Distribution ------------- count + 0 | 0 + 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -6 + 2 | 0 + + 3 + value ------------- Distribution ------------- count + 0 | 0 + 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -5 + 2 | 0 + + 5 + value ------------- Distribution ------------- count + 0 | 0 + 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -4 + 2 | 0 + + 7 + value ------------- Distribution ------------- count + 0 | 0 + 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -3 + 2 | 0 + + 9 + value ------------- Distribution ------------- count + 0 | 0 + 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -2 + 2 | 0 + + 11 + value ------------- Distribution ------------- count + 0 | 0 + 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -1 + 2 | 0 + + 14 + value ------------- Distribution ------------- count + 0 | 0 + 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1 + 2 | 0 + + 16 + value ------------- Distribution ------------- count + 0 | 0 + 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 2 + 2 | 0 + + 18 + value ------------- Distribution ------------- count + 0 | 0 + 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 3 + 2 | 0 + + 20 + value ------------- Distribution ------------- count + 0 | 0 + 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 4 + 2 | 0 + + 22 + value ------------- Distribution ------------- count + 0 | 0 + 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 5 + 2 | 0 + + 24 + value ------------- Distribution ------------- count + 0 | 0 + 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 6 + 2 | 0 + + 13 + value ------------- Distribution ------------- count + 0 | 0 + 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 7 + 2 | 0 + + 15 + value ------------- Distribution ------------- count + 0 | 0 + 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 8 + 2 | 0 + + 17 + value ------------- Distribution ------------- count + 0 | 0 + 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 9 + 2 | 0 + + 19 + value ------------- Distribution ------------- count + 0 | 0 + 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 10 + 2 | 0 + + 21 + value ------------- Distribution ------------- count + 0 | 0 + 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 11 + 2 | 0 + + 23 + value ------------- Distribution ------------- count + 0 | 0 + 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 12 + 2 | 0 + + +Ordering of lquantize() with some negative weights: + + 2 + value ------------- Distribution ------------- count + 0 | 0 + 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -12 + 2 | 0 + + 4 + value ------------- Distribution ------------- count + 0 | 0 + 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -11 + 2 | 0 + + 6 + value ------------- Distribution ------------- count + 0 | 0 + 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -10 + 2 | 0 + + 8 + value ------------- Distribution ------------- count + 0 | 0 + 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -9 + 2 | 0 + + 10 + value ------------- Distribution ------------- count + 0 | 0 + 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -8 + 2 | 0 + + 12 + value ------------- Distribution ------------- count + 0 | 0 + 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -7 + 2 | 0 + + 1 + value ------------- Distribution ------------- count + 0 | 0 + 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -6 + 2 | 0 + + 3 + value ------------- Distribution ------------- count + 0 | 0 + 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -5 + 2 | 0 + + 5 + value ------------- Distribution ------------- count + 0 | 0 + 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -4 + 2 | 0 + + 7 + value ------------- Distribution ------------- count + 0 | 0 + 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -3 + 2 | 0 + + 9 + value ------------- Distribution ------------- count + 0 | 0 + 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -2 + 2 | 0 + + 11 + value ------------- Distribution ------------- count + 0 | 0 + 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -1 + 2 | 0 + + 14 + value ------------- Distribution ------------- count + 0 | 0 + 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1 + 2 | 0 + + 16 + value ------------- Distribution ------------- count + 0 | 0 + 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 2 + 2 | 0 + + 18 + value ------------- Distribution ------------- count + 0 | 0 + 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 3 + 2 | 0 + + 20 + value ------------- Distribution ------------- count + 0 | 0 + 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 4 + 2 | 0 + + 22 + value ------------- Distribution ------------- count + 0 | 0 + 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 5 + 2 | 0 + + 24 + value ------------- Distribution ------------- count + 0 | 0 + 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 6 + 2 | 0 + + 13 + value ------------- Distribution ------------- count + 0 | 0 + 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 7 + 2 | 0 + + 15 + value ------------- Distribution ------------- count + 0 | 0 + 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 8 + 2 | 0 + + 17 + value ------------- Distribution ------------- count + 0 | 0 + 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 9 + 2 | 0 + + 19 + value ------------- Distribution ------------- count + 0 | 0 + 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 10 + 2 | 0 + + 21 + value ------------- Distribution ------------- count + 0 | 0 + 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 11 + 2 | 0 + + 23 + value ------------- Distribution ------------- count + 0 | 0 + 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 12 + 2 | 0 + + +Ordering of sum() with some negative weights: + + 2 -12 + 4 -11 + 6 -10 + 8 -9 + 10 -8 + 12 -7 + 1 -6 + 3 -5 + 5 -4 + 7 -3 + 9 -2 + 11 -1 + 14 1 + 16 2 + 18 3 + 20 4 + 22 5 + 24 6 + 13 7 + 15 8 + 17 9 + 19 10 + 21 11 + 23 12 + +Ordering of max() with some negative weights: + + 2 -12 + 4 -11 + 6 -10 + 8 -9 + 10 -8 + 12 -7 + 1 -6 + 3 -5 + 5 -4 + 7 -3 + 9 -2 + 11 -1 + 14 1 + 16 2 + 18 3 + 20 4 + 22 5 + 24 6 + 13 7 + 15 8 + 17 9 + 19 10 + 21 11 + 23 12 + +Ordering of min() with some negative weights: + + 2 -12 + 4 -11 + 6 -10 + 8 -9 + 10 -8 + 12 -7 + 1 -6 + 3 -5 + 5 -4 + 7 -3 + 9 -2 + 11 -1 + 14 1 + 16 2 + 18 3 + 20 4 + 22 5 + 24 6 + 13 7 + 15 8 + 17 9 + 19 10 + 21 11 + 23 12 + + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.negquant.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.negquant.d new file mode 100644 index 00000000..bbc7263d --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.negquant.d @@ -0,0 +1,115 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma D option quiet + +BEGIN +{ + @["j-church"] = quantize(1, 100); + @["j-church"] = quantize(1, -99); + @["j-church"] = quantize(1, -1); + val = 123; +} + +BEGIN +{ + @["k-ingleside"] = quantize(1, -val); +} + +BEGIN +{ + @["l-taraval"] = quantize(0, -val); + @["l-taraval"] = quantize(-1, -val); + @["l-taraval"] = quantize(1, val); + @["l-taraval"] = quantize(1, val); +} + +BEGIN +{ + @["m-oceanview"] = quantize(1, (1 << 63) - 1); + @["m-oceanview"] = quantize(1); + @["m-oceanview"] = quantize(2, (1 << 63) - 1); + @["m-oceanview"] = quantize(8, 400000); +} + +BEGIN +{ + @["n-judah"] = quantize(1, val); + @["n-judah"] = quantize(2, val); + @["n-judah"] = quantize(2, val); + @["n-judah"] = quantize(2); +} + +BEGIN +{ + this->i = 1; + this->val = (1 << 63) - 1; + + @["f-market"] = quantize(this->i, this->val); + this->i <<= 1; + this->val >>= 1; + + @["f-market"] = quantize(this->i, this->val); + this->i <<= 1; + this->val >>= 1; + + @["f-market"] = quantize(this->i, this->val); + this->i <<= 1; + this->val >>= 1; + + @["f-market"] = quantize(this->i, this->val); + this->i <<= 1; + this->val >>= 1; +} + +BEGIN +{ + this->i = 1; + this->val = (1 << 63) - 4; + + @["s-castro"] = quantize(this->i, this->val); + this->i <<= 1; + this->val >>= 1; + + @["s-castro"] = quantize(this->i, this->val); + this->i <<= 1; + this->val >>= 1; + + @["s-castro"] = quantize(this->i, this->val); + this->i <<= 1; + this->val >>= 1; + + @["s-castro"] = quantize(this->i, this->val); + this->i <<= 1; + this->val >>= 1; +} + +BEGIN +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.negquant.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.negquant.d.out new file mode 100644 index 00000000..f8466b33 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.negquant.d.out @@ -0,0 +1,55 @@ + + k-ingleside + value ------------- Distribution ------------- count + 0 | 0 + 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -123 + 2 | 0 + + j-church + value ------------- Distribution ------------- count + -1 | 0 + 0 | 0 + 1 | 0 + + l-taraval + value ------------- Distribution ------------- count + -2 | 0 + -1 @@@@@| -123 + 0 @@@@@| -123 + 1 |@@@@@@@@@@ 246 + 2 | 0 + + n-judah + value ------------- Distribution ------------- count + 0 | 0 + 1 |@@@@@@@@@@@@@ 123 + 2 |@@@@@@@@@@@@@@@@@@@@@@@@@@@ 247 + 4 | 0 + + m-oceanview + value ------------- Distribution ------------- count + 0 | 0 + 1 @@@@@@@@@@| -9223372036854775808 + 2 |@@@@@@@@@@ 9223372036854775807 + 4 | 0 + 8 | 400000 + 16 | 0 + + s-castro + value ------------- Distribution ------------- count + 0 | 0 + 1 |@@@@@@@@@@@@@@@@@@@@@ 9223372036854775804 + 2 |@@@@@@@@@@@ 4611686018427387902 + 4 |@@@@@ 2305843009213693951 + 8 |@@@ 1152921504606846975 + 16 | 0 + + f-market + value ------------- Distribution ------------- count + 0 | 0 + 1 |@@@@@@@@@@@@@@@@@@@@@ 9223372036854775807 + 2 |@@@@@@@@@@@ 4611686018427387903 + 4 |@@@@@ 2305843009213693951 + 8 |@@@ 1152921504606846975 + 16 | 0 + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.negtrunc.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.negtrunc.d new file mode 100644 index 00000000..f90eae13 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.negtrunc.d @@ -0,0 +1,49 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma D option quiet + +int i; + +tick-10ms +/i < 100/ +{ + @[i] = sum(i); + i++; +} + +tick-10ms +/i == 100/ +{ + exit(0); +} + +END +{ + trunc(@, -10); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.negtrunc.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.negtrunc.d.out new file mode 100644 index 00000000..c1b07a6d --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.negtrunc.d.out @@ -0,0 +1,11 @@ + + 0 0 + 1 1 + 2 2 + 3 3 + 4 4 + 5 5 + 6 6 + 7 7 + 8 8 + 9 9 diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.negtruncquant.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.negtruncquant.d new file mode 100644 index 00000000..2a13d659 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.negtruncquant.d @@ -0,0 +1,52 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma D option quiet + +int i; + +tick-10ms +/i < 100/ +{ + @[i] = lquantize(i, 0, 150); + @[i] = lquantize(i + 1, 0, 150); + @[i] = lquantize(i + 2, 0, 150); + @[i] = lquantize(i + 3, 0, 150); + i++; +} + +tick-10ms +/i == 100/ +{ + exit(0); +} + +END +{ + trunc(@, -5); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.negtruncquant.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.negtruncquant.d.out new file mode 100644 index 00000000..264aa392 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.negtruncquant.d.out @@ -0,0 +1,46 @@ + + 0 + value ------------- Distribution ------------- count + < 0 | 0 + 0 |@@@@@@@@@@ 1 + 1 |@@@@@@@@@@ 1 + 2 |@@@@@@@@@@ 1 + 3 |@@@@@@@@@@ 1 + 4 | 0 + + 1 + value ------------- Distribution ------------- count + 0 | 0 + 1 |@@@@@@@@@@ 1 + 2 |@@@@@@@@@@ 1 + 3 |@@@@@@@@@@ 1 + 4 |@@@@@@@@@@ 1 + 5 | 0 + + 2 + value ------------- Distribution ------------- count + 1 | 0 + 2 |@@@@@@@@@@ 1 + 3 |@@@@@@@@@@ 1 + 4 |@@@@@@@@@@ 1 + 5 |@@@@@@@@@@ 1 + 6 | 0 + + 3 + value ------------- Distribution ------------- count + 2 | 0 + 3 |@@@@@@@@@@ 1 + 4 |@@@@@@@@@@ 1 + 5 |@@@@@@@@@@ 1 + 6 |@@@@@@@@@@ 1 + 7 | 0 + + 4 + value ------------- Distribution ------------- count + 3 | 0 + 4 |@@@@@@@@@@ 1 + 5 |@@@@@@@@@@ 1 + 6 |@@@@@@@@@@ 1 + 7 |@@@@@@@@@@ 1 + 8 | 0 + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.normalize.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.normalize.d new file mode 100644 index 00000000..0bcc0fe9 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.normalize.d @@ -0,0 +1,60 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Positive test for normalization() + * + * SECTION: Aggregations/Normalization + * + */ + +#pragma D option quiet +#pragma D option aggrate=1ms +#pragma D option switchrate=50ms + +BEGIN +{ + i = 0; + start = timestamp; +} + +tick-100ms +/i < 20/ +{ + @func[i % 5] = sum(i * 100); + i++; +} + +tick-100ms +/i == 20/ +{ + printf("normalized data:\n"); + normalize(@func, 5); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.normalize.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.normalize.d.out new file mode 100644 index 00000000..11193e65 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.normalize.d.out @@ -0,0 +1,7 @@ +normalized data: + + 0 600 + 1 680 + 2 760 + 3 840 + 4 920 diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.order.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.order.d new file mode 100644 index 00000000..13900116 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.order.d @@ -0,0 +1,78 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma D option quiet + +BEGIN +{ + @[8] = sum(1); + @[6] = sum(1); + @[7] = sum(1); + @[5] = sum(1); + @[3] = sum(1); + @[0] = sum(1); + @[9] = sum(1); + + @tour["Ghent"] = sum(1); + @tour["Berlin"] = sum(1); + @tour["London"] = sum(1); + @tour["Dublin"] = sum(1); + @tour["Shanghai"] = sum(1); + @tour["Zurich"] = sum(1); + @tour["Regina"] = sum(1); + @tour["Winnipeg"] = sum(1); + @tour["Edmonton"] = sum(1); + @tour["Calgary"] = sum(1); + + @ate[8, "Rice"] = sum(1); + @ate[8, "Oatmeal"] = sum(1); + @ate[8, "Barley"] = sum(1); + @ate[8, "Carrots"] = sum(1); + @ate[8, "Sweet potato"] = sum(1); + @ate[8, "Asparagus"] = sum(1); + @ate[8, "Squash"] = sum(1); + + @chars['a'] = sum(1); + @chars['s'] = sum(1); + @chars['d'] = sum(1); + @chars['f'] = sum(1); + + printa("%d\n", @); + printf("\n"); + + printa("%s\n", @tour); + printf("\n"); + + printa("%d %s\n", @ate); + printf("\n"); + + printa("%c\n", @chars); + printf("\n"); + + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.order.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.order.d.out new file mode 100644 index 00000000..505b0f32 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.order.d.out @@ -0,0 +1,33 @@ +0 +3 +5 +6 +7 +8 +9 + +Berlin +Calgary +Dublin +Edmonton +Ghent +London +Regina +Shanghai +Winnipeg +Zurich + +8 Asparagus +8 Barley +8 Carrots +8 Oatmeal +8 Rice +8 Squash +8 Sweet potato + +a +d +f +s + + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.quantize.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.quantize.d new file mode 100644 index 00000000..fad472af --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.quantize.d @@ -0,0 +1,57 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Positive quantize() test + * + * SECTION: Aggregations/Aggregations + * + * NOTES: This is verifiable simple positive test of the quantize() function. + * + */ + +#pragma D option quiet + +BEGIN +{ + i = 0; +} + +tick-10ms +/i < 1000/ +{ + @a[i] = quantize(i); + i += 100; +} + +tick-10ms +/i == 1000/ +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.quantize.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.quantize.d.out new file mode 100644 index 00000000..f4882ed2 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.quantize.d.out @@ -0,0 +1,61 @@ + + 0 + value ------------- Distribution ------------- count + -1 | 0 + 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1 + 1 | 0 + + 100 + value ------------- Distribution ------------- count + 32 | 0 + 64 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1 + 128 | 0 + + 200 + value ------------- Distribution ------------- count + 64 | 0 + 128 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1 + 256 | 0 + + 300 + value ------------- Distribution ------------- count + 128 | 0 + 256 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1 + 512 | 0 + + 400 + value ------------- Distribution ------------- count + 128 | 0 + 256 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1 + 512 | 0 + + 500 + value ------------- Distribution ------------- count + 128 | 0 + 256 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1 + 512 | 0 + + 600 + value ------------- Distribution ------------- count + 256 | 0 + 512 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1 + 1024 | 0 + + 700 + value ------------- Distribution ------------- count + 256 | 0 + 512 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1 + 1024 | 0 + + 800 + value ------------- Distribution ------------- count + 256 | 0 + 512 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1 + 1024 | 0 + + 900 + value ------------- Distribution ------------- count + 256 | 0 + 512 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1 + 1024 | 0 + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.quantmany.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.quantmany.d new file mode 100644 index 00000000..e547b1ec --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.quantmany.d @@ -0,0 +1,56 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma D option quiet + +int64_t val, shift; + +tick-1ms +/val == 0/ +{ + val = -(1 << shift); + shift++; +} + +tick-1ms +/shift == 32/ +{ + exit(0); +} + +tick-1ms +/val == -1/ +{ + val = (1 << shift); +} + +tick-1ms +{ + @[shift] = quantize(val, val); + val >>= 1; +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.quantmany.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.quantmany.d.out new file mode 100644 index 00000000..45df2491 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.quantmany.d.out @@ -0,0 +1,1208 @@ + + 1 + value ------------- Distribution ------------- count + 0 | 0 + 1 |@@@@@@@@@@@@@ 1 + 2 |@@@@@@@@@@@@@@@@@@@@@@@@@@@ 2 + 4 | 0 + + 2 + value ------------- Distribution ------------- count + -4 | 0 + -2 @@@@| -2 + -1 | 0 + 0 | 0 + 1 |@@ 1 + 2 |@@@@ 2 + 4 |@@@@@@@@@ 4 + 8 | 0 + + 3 + value ------------- Distribution ------------- count + -8 | 0 + -4 @@@@| -4 + -2 @@| -2 + -1 | 0 + 0 | 0 + 1 |@ 1 + 2 |@@ 2 + 4 |@@@@ 4 + 8 |@@@@@@@@ 8 + 16 | 0 + + 4 + value ------------- Distribution ------------- count + -16 | 0 + -8 @@@@| -8 + -4 @@| -4 + -2 @| -2 + -1 | 0 + 0 | 0 + 1 | 1 + 2 |@ 2 + 4 |@@ 4 + 8 |@@@@ 8 + 16 |@@@@@@@ 16 + 32 | 0 + + 5 + value ------------- Distribution ------------- count + -32 | 0 + -16 @@@| -16 + -8 @@| -8 + -4 @| -4 + -2 | -2 + -1 | 0 + 0 | 0 + 1 | 1 + 2 | 2 + 4 |@ 4 + 8 |@@ 8 + 16 |@@@ 16 + 32 |@@@@@@@ 32 + 64 | 0 + + 6 + value ------------- Distribution ------------- count + -64 | 0 + -32 @@@| -32 + -16 @@| -16 + -8 @| -8 + -4 | -4 + -2 | -2 + -1 | 0 + 0 | 0 + 1 | 1 + 2 | 2 + 4 | 4 + 8 |@ 8 + 16 |@@ 16 + 32 |@@@ 32 + 64 |@@@@@@@ 64 + 128 | 0 + + 7 + value ------------- Distribution ------------- count + -128 | 0 + -64 @@@| -64 + -32 @@| -32 + -16 @| -16 + -8 | -8 + -4 | -4 + -2 | -2 + -1 | 0 + 0 | 0 + 1 | 1 + 2 | 2 + 4 | 4 + 8 | 8 + 16 |@ 16 + 32 |@@ 32 + 64 |@@@ 64 + 128 |@@@@@@@ 128 + 256 | 0 + + 8 + value ------------- Distribution ------------- count + -256 | 0 + -128 @@@| -128 + -64 @@| -64 + -32 @| -32 + -16 | -16 + -8 | -8 + -4 | -4 + -2 | -2 + -1 | 0 + 0 | 0 + 1 | 1 + 2 | 2 + 4 | 4 + 8 | 8 + 16 | 16 + 32 |@ 32 + 64 |@@ 64 + 128 |@@@ 128 + 256 |@@@@@@@ 256 + 512 | 0 + + 9 + value ------------- Distribution ------------- count + -512 | 0 + -256 @@@| -256 + -128 @@| -128 + -64 @| -64 + -32 | -32 + -16 | -16 + -8 | -8 + -4 | -4 + -2 | -2 + -1 | 0 + 0 | 0 + 1 | 1 + 2 | 2 + 4 | 4 + 8 | 8 + 16 | 16 + 32 | 32 + 64 |@ 64 + 128 |@@ 128 + 256 |@@@ 256 + 512 |@@@@@@@ 512 + 1024 | 0 + + 10 + value ------------- Distribution ------------- count + -1024 | 0 + -512 @@@| -512 + -256 @@| -256 + -128 @| -128 + -64 | -64 + -32 | -32 + -16 | -16 + -8 | -8 + -4 | -4 + -2 | -2 + -1 | 0 + 0 | 0 + 1 | 1 + 2 | 2 + 4 | 4 + 8 | 8 + 16 | 16 + 32 | 32 + 64 | 64 + 128 |@ 128 + 256 |@@ 256 + 512 |@@@ 512 + 1024 |@@@@@@@ 1024 + 2048 | 0 + + 11 + value ------------- Distribution ------------- count + -2048 | 0 + -1024 @@@| -1024 + -512 @@| -512 + -256 @| -256 + -128 | -128 + -64 | -64 + -32 | -32 + -16 | -16 + -8 | -8 + -4 | -4 + -2 | -2 + -1 | 0 + 0 | 0 + 1 | 1 + 2 | 2 + 4 | 4 + 8 | 8 + 16 | 16 + 32 | 32 + 64 | 64 + 128 | 128 + 256 |@ 256 + 512 |@@ 512 + 1024 |@@@ 1024 + 2048 |@@@@@@@ 2048 + 4096 | 0 + + 12 + value ------------- Distribution ------------- count + -4096 | 0 + -2048 @@@| -2048 + -1024 @@| -1024 + -512 @| -512 + -256 | -256 + -128 | -128 + -64 | -64 + -32 | -32 + -16 | -16 + -8 | -8 + -4 | -4 + -2 | -2 + -1 | 0 + 0 | 0 + 1 | 1 + 2 | 2 + 4 | 4 + 8 | 8 + 16 | 16 + 32 | 32 + 64 | 64 + 128 | 128 + 256 | 256 + 512 |@ 512 + 1024 |@@ 1024 + 2048 |@@@ 2048 + 4096 |@@@@@@@ 4096 + 8192 | 0 + + 13 + value ------------- Distribution ------------- count + -8192 | 0 + -4096 @@@| -4096 + -2048 @@| -2048 + -1024 @| -1024 + -512 | -512 + -256 | -256 + -128 | -128 + -64 | -64 + -32 | -32 + -16 | -16 + -8 | -8 + -4 | -4 + -2 | -2 + -1 | 0 + 0 | 0 + 1 | 1 + 2 | 2 + 4 | 4 + 8 | 8 + 16 | 16 + 32 | 32 + 64 | 64 + 128 | 128 + 256 | 256 + 512 | 512 + 1024 |@ 1024 + 2048 |@@ 2048 + 4096 |@@@ 4096 + 8192 |@@@@@@@ 8192 + 16384 | 0 + + 14 + value ------------- Distribution ------------- count + -16384 | 0 + -8192 @@@| -8192 + -4096 @@| -4096 + -2048 @| -2048 + -1024 | -1024 + -512 | -512 + -256 | -256 + -128 | -128 + -64 | -64 + -32 | -32 + -16 | -16 + -8 | -8 + -4 | -4 + -2 | -2 + -1 | 0 + 0 | 0 + 1 | 1 + 2 | 2 + 4 | 4 + 8 | 8 + 16 | 16 + 32 | 32 + 64 | 64 + 128 | 128 + 256 | 256 + 512 | 512 + 1024 | 1024 + 2048 |@ 2048 + 4096 |@@ 4096 + 8192 |@@@ 8192 + 16384 |@@@@@@@ 16384 + 32768 | 0 + + 15 + value ------------- Distribution ------------- count + -32768 | 0 + -16384 @@@| -16384 + -8192 @@| -8192 + -4096 @| -4096 + -2048 | -2048 + -1024 | -1024 + -512 | -512 + -256 | -256 + -128 | -128 + -64 | -64 + -32 | -32 + -16 | -16 + -8 | -8 + -4 | -4 + -2 | -2 + -1 | 0 + 0 | 0 + 1 | 1 + 2 | 2 + 4 | 4 + 8 | 8 + 16 | 16 + 32 | 32 + 64 | 64 + 128 | 128 + 256 | 256 + 512 | 512 + 1024 | 1024 + 2048 | 2048 + 4096 |@ 4096 + 8192 |@@ 8192 + 16384 |@@@ 16384 + 32768 |@@@@@@@ 32768 + 65536 | 0 + + 16 + value ------------- Distribution ------------- count + -65536 | 0 + -32768 @@@| -32768 + -16384 @@| -16384 + -8192 @| -8192 + -4096 | -4096 + -2048 | -2048 + -1024 | -1024 + -512 | -512 + -256 | -256 + -128 | -128 + -64 | -64 + -32 | -32 + -16 | -16 + -8 | -8 + -4 | -4 + -2 | -2 + -1 | 0 + 0 | 0 + 1 | 1 + 2 | 2 + 4 | 4 + 8 | 8 + 16 | 16 + 32 | 32 + 64 | 64 + 128 | 128 + 256 | 256 + 512 | 512 + 1024 | 1024 + 2048 | 2048 + 4096 | 4096 + 8192 |@ 8192 + 16384 |@@ 16384 + 32768 |@@@ 32768 + 65536 |@@@@@@@ 65536 + 131072 | 0 + + 17 + value ------------- Distribution ------------- count + -131072 | 0 + -65536 @@@| -65536 + -32768 @@| -32768 + -16384 @| -16384 + -8192 | -8192 + -4096 | -4096 + -2048 | -2048 + -1024 | -1024 + -512 | -512 + -256 | -256 + -128 | -128 + -64 | -64 + -32 | -32 + -16 | -16 + -8 | -8 + -4 | -4 + -2 | -2 + -1 | 0 + 0 | 0 + 1 | 1 + 2 | 2 + 4 | 4 + 8 | 8 + 16 | 16 + 32 | 32 + 64 | 64 + 128 | 128 + 256 | 256 + 512 | 512 + 1024 | 1024 + 2048 | 2048 + 4096 | 4096 + 8192 | 8192 + 16384 |@ 16384 + 32768 |@@ 32768 + 65536 |@@@ 65536 + 131072 |@@@@@@@ 131072 + 262144 | 0 + + 18 + value ------------- Distribution ------------- count + -262144 | 0 + -131072 @@@| -131072 + -65536 @@| -65536 + -32768 @| -32768 + -16384 | -16384 + -8192 | -8192 + -4096 | -4096 + -2048 | -2048 + -1024 | -1024 + -512 | -512 + -256 | -256 + -128 | -128 + -64 | -64 + -32 | -32 + -16 | -16 + -8 | -8 + -4 | -4 + -2 | -2 + -1 | 0 + 0 | 0 + 1 | 1 + 2 | 2 + 4 | 4 + 8 | 8 + 16 | 16 + 32 | 32 + 64 | 64 + 128 | 128 + 256 | 256 + 512 | 512 + 1024 | 1024 + 2048 | 2048 + 4096 | 4096 + 8192 | 8192 + 16384 | 16384 + 32768 |@ 32768 + 65536 |@@ 65536 + 131072 |@@@ 131072 + 262144 |@@@@@@@ 262144 + 524288 | 0 + + 19 + value ------------- Distribution ------------- count + -524288 | 0 + -262144 @@@| -262144 + -131072 @@| -131072 + -65536 @| -65536 + -32768 | -32768 + -16384 | -16384 + -8192 | -8192 + -4096 | -4096 + -2048 | -2048 + -1024 | -1024 + -512 | -512 + -256 | -256 + -128 | -128 + -64 | -64 + -32 | -32 + -16 | -16 + -8 | -8 + -4 | -4 + -2 | -2 + -1 | 0 + 0 | 0 + 1 | 1 + 2 | 2 + 4 | 4 + 8 | 8 + 16 | 16 + 32 | 32 + 64 | 64 + 128 | 128 + 256 | 256 + 512 | 512 + 1024 | 1024 + 2048 | 2048 + 4096 | 4096 + 8192 | 8192 + 16384 | 16384 + 32768 | 32768 + 65536 |@ 65536 + 131072 |@@ 131072 + 262144 |@@@ 262144 + 524288 |@@@@@@@ 524288 + 1048576 | 0 + + 20 + value ------------- Distribution ------------- count + -1048576 | 0 + -524288 @@@| -524288 + -262144 @@| -262144 + -131072 @| -131072 + -65536 | -65536 + -32768 | -32768 + -16384 | -16384 + -8192 | -8192 + -4096 | -4096 + -2048 | -2048 + -1024 | -1024 + -512 | -512 + -256 | -256 + -128 | -128 + -64 | -64 + -32 | -32 + -16 | -16 + -8 | -8 + -4 | -4 + -2 | -2 + -1 | 0 + 0 | 0 + 1 | 1 + 2 | 2 + 4 | 4 + 8 | 8 + 16 | 16 + 32 | 32 + 64 | 64 + 128 | 128 + 256 | 256 + 512 | 512 + 1024 | 1024 + 2048 | 2048 + 4096 | 4096 + 8192 | 8192 + 16384 | 16384 + 32768 | 32768 + 65536 | 65536 + 131072 |@ 131072 + 262144 |@@ 262144 + 524288 |@@@ 524288 + 1048576 |@@@@@@@ 1048576 + 2097152 | 0 + + 21 + value ------------- Distribution ------------- count + -2097152 | 0 + -1048576 @@@| -1048576 + -524288 @@| -524288 + -262144 @| -262144 + -131072 | -131072 + -65536 | -65536 + -32768 | -32768 + -16384 | -16384 + -8192 | -8192 + -4096 | -4096 + -2048 | -2048 + -1024 | -1024 + -512 | -512 + -256 | -256 + -128 | -128 + -64 | -64 + -32 | -32 + -16 | -16 + -8 | -8 + -4 | -4 + -2 | -2 + -1 | 0 + 0 | 0 + 1 | 1 + 2 | 2 + 4 | 4 + 8 | 8 + 16 | 16 + 32 | 32 + 64 | 64 + 128 | 128 + 256 | 256 + 512 | 512 + 1024 | 1024 + 2048 | 2048 + 4096 | 4096 + 8192 | 8192 + 16384 | 16384 + 32768 | 32768 + 65536 | 65536 + 131072 | 131072 + 262144 |@ 262144 + 524288 |@@ 524288 + 1048576 |@@@ 1048576 + 2097152 |@@@@@@@ 2097152 + 4194304 | 0 + + 22 + value ------------- Distribution ------------- count + -4194304 | 0 + -2097152 @@@| -2097152 + -1048576 @@| -1048576 + -524288 @| -524288 + -262144 | -262144 + -131072 | -131072 + -65536 | -65536 + -32768 | -32768 + -16384 | -16384 + -8192 | -8192 + -4096 | -4096 + -2048 | -2048 + -1024 | -1024 + -512 | -512 + -256 | -256 + -128 | -128 + -64 | -64 + -32 | -32 + -16 | -16 + -8 | -8 + -4 | -4 + -2 | -2 + -1 | 0 + 0 | 0 + 1 | 1 + 2 | 2 + 4 | 4 + 8 | 8 + 16 | 16 + 32 | 32 + 64 | 64 + 128 | 128 + 256 | 256 + 512 | 512 + 1024 | 1024 + 2048 | 2048 + 4096 | 4096 + 8192 | 8192 + 16384 | 16384 + 32768 | 32768 + 65536 | 65536 + 131072 | 131072 + 262144 | 262144 + 524288 |@ 524288 + 1048576 |@@ 1048576 + 2097152 |@@@ 2097152 + 4194304 |@@@@@@@ 4194304 + 8388608 | 0 + + 23 + value ------------- Distribution ------------- count + -8388608 | 0 + -4194304 @@@| -4194304 + -2097152 @@| -2097152 + -1048576 @| -1048576 + -524288 | -524288 + -262144 | -262144 + -131072 | -131072 + -65536 | -65536 + -32768 | -32768 + -16384 | -16384 + -8192 | -8192 + -4096 | -4096 + -2048 | -2048 + -1024 | -1024 + -512 | -512 + -256 | -256 + -128 | -128 + -64 | -64 + -32 | -32 + -16 | -16 + -8 | -8 + -4 | -4 + -2 | -2 + -1 | 0 + 0 | 0 + 1 | 1 + 2 | 2 + 4 | 4 + 8 | 8 + 16 | 16 + 32 | 32 + 64 | 64 + 128 | 128 + 256 | 256 + 512 | 512 + 1024 | 1024 + 2048 | 2048 + 4096 | 4096 + 8192 | 8192 + 16384 | 16384 + 32768 | 32768 + 65536 | 65536 + 131072 | 131072 + 262144 | 262144 + 524288 | 524288 + 1048576 |@ 1048576 + 2097152 |@@ 2097152 + 4194304 |@@@ 4194304 + 8388608 |@@@@@@@ 8388608 + 16777216 | 0 + + 24 + value ------------- Distribution ------------- count + -16777216 | 0 + -8388608 @@@| -8388608 + -4194304 @@| -4194304 + -2097152 @| -2097152 + -1048576 | -1048576 + -524288 | -524288 + -262144 | -262144 + -131072 | -131072 + -65536 | -65536 + -32768 | -32768 + -16384 | -16384 + -8192 | -8192 + -4096 | -4096 + -2048 | -2048 + -1024 | -1024 + -512 | -512 + -256 | -256 + -128 | -128 + -64 | -64 + -32 | -32 + -16 | -16 + -8 | -8 + -4 | -4 + -2 | -2 + -1 | 0 + 0 | 0 + 1 | 1 + 2 | 2 + 4 | 4 + 8 | 8 + 16 | 16 + 32 | 32 + 64 | 64 + 128 | 128 + 256 | 256 + 512 | 512 + 1024 | 1024 + 2048 | 2048 + 4096 | 4096 + 8192 | 8192 + 16384 | 16384 + 32768 | 32768 + 65536 | 65536 + 131072 | 131072 + 262144 | 262144 + 524288 | 524288 + 1048576 | 1048576 + 2097152 |@ 2097152 + 4194304 |@@ 4194304 + 8388608 |@@@ 8388608 + 16777216 |@@@@@@@ 16777216 + 33554432 | 0 + + 25 + value ------------- Distribution ------------- count + -33554432 | 0 + -16777216 @@@| -16777216 + -8388608 @@| -8388608 + -4194304 @| -4194304 + -2097152 | -2097152 + -1048576 | -1048576 + -524288 | -524288 + -262144 | -262144 + -131072 | -131072 + -65536 | -65536 + -32768 | -32768 + -16384 | -16384 + -8192 | -8192 + -4096 | -4096 + -2048 | -2048 + -1024 | -1024 + -512 | -512 + -256 | -256 + -128 | -128 + -64 | -64 + -32 | -32 + -16 | -16 + -8 | -8 + -4 | -4 + -2 | -2 + -1 | 0 + 0 | 0 + 1 | 1 + 2 | 2 + 4 | 4 + 8 | 8 + 16 | 16 + 32 | 32 + 64 | 64 + 128 | 128 + 256 | 256 + 512 | 512 + 1024 | 1024 + 2048 | 2048 + 4096 | 4096 + 8192 | 8192 + 16384 | 16384 + 32768 | 32768 + 65536 | 65536 + 131072 | 131072 + 262144 | 262144 + 524288 | 524288 + 1048576 | 1048576 + 2097152 | 2097152 + 4194304 |@ 4194304 + 8388608 |@@ 8388608 + 16777216 |@@@ 16777216 + 33554432 |@@@@@@@ 33554432 + 67108864 | 0 + + 26 + value ------------- Distribution ------------- count + -67108864 | 0 + -33554432 @@@| -33554432 + -16777216 @@| -16777216 + -8388608 @| -8388608 + -4194304 | -4194304 + -2097152 | -2097152 + -1048576 | -1048576 + -524288 | -524288 + -262144 | -262144 + -131072 | -131072 + -65536 | -65536 + -32768 | -32768 + -16384 | -16384 + -8192 | -8192 + -4096 | -4096 + -2048 | -2048 + -1024 | -1024 + -512 | -512 + -256 | -256 + -128 | -128 + -64 | -64 + -32 | -32 + -16 | -16 + -8 | -8 + -4 | -4 + -2 | -2 + -1 | 0 + 0 | 0 + 1 | 1 + 2 | 2 + 4 | 4 + 8 | 8 + 16 | 16 + 32 | 32 + 64 | 64 + 128 | 128 + 256 | 256 + 512 | 512 + 1024 | 1024 + 2048 | 2048 + 4096 | 4096 + 8192 | 8192 + 16384 | 16384 + 32768 | 32768 + 65536 | 65536 + 131072 | 131072 + 262144 | 262144 + 524288 | 524288 + 1048576 | 1048576 + 2097152 | 2097152 + 4194304 | 4194304 + 8388608 |@ 8388608 + 16777216 |@@ 16777216 + 33554432 |@@@ 33554432 + 67108864 |@@@@@@@ 67108864 + 134217728 | 0 + + 27 + value ------------- Distribution ------------- count + -134217728 | 0 + -67108864 @@@| -67108864 + -33554432 @@| -33554432 + -16777216 @| -16777216 + -8388608 | -8388608 + -4194304 | -4194304 + -2097152 | -2097152 + -1048576 | -1048576 + -524288 | -524288 + -262144 | -262144 + -131072 | -131072 + -65536 | -65536 + -32768 | -32768 + -16384 | -16384 + -8192 | -8192 + -4096 | -4096 + -2048 | -2048 + -1024 | -1024 + -512 | -512 + -256 | -256 + -128 | -128 + -64 | -64 + -32 | -32 + -16 | -16 + -8 | -8 + -4 | -4 + -2 | -2 + -1 | 0 + 0 | 0 + 1 | 1 + 2 | 2 + 4 | 4 + 8 | 8 + 16 | 16 + 32 | 32 + 64 | 64 + 128 | 128 + 256 | 256 + 512 | 512 + 1024 | 1024 + 2048 | 2048 + 4096 | 4096 + 8192 | 8192 + 16384 | 16384 + 32768 | 32768 + 65536 | 65536 + 131072 | 131072 + 262144 | 262144 + 524288 | 524288 + 1048576 | 1048576 + 2097152 | 2097152 + 4194304 | 4194304 + 8388608 | 8388608 + 16777216 |@ 16777216 + 33554432 |@@ 33554432 + 67108864 |@@@ 67108864 + 134217728 |@@@@@@@ 134217728 + 268435456 | 0 + + 28 + value ------------- Distribution ------------- count + -268435456 | 0 + -134217728 @@@| -134217728 + -67108864 @@| -67108864 + -33554432 @| -33554432 + -16777216 | -16777216 + -8388608 | -8388608 + -4194304 | -4194304 + -2097152 | -2097152 + -1048576 | -1048576 + -524288 | -524288 + -262144 | -262144 + -131072 | -131072 + -65536 | -65536 + -32768 | -32768 + -16384 | -16384 + -8192 | -8192 + -4096 | -4096 + -2048 | -2048 + -1024 | -1024 + -512 | -512 + -256 | -256 + -128 | -128 + -64 | -64 + -32 | -32 + -16 | -16 + -8 | -8 + -4 | -4 + -2 | -2 + -1 | 0 + 0 | 0 + 1 | 1 + 2 | 2 + 4 | 4 + 8 | 8 + 16 | 16 + 32 | 32 + 64 | 64 + 128 | 128 + 256 | 256 + 512 | 512 + 1024 | 1024 + 2048 | 2048 + 4096 | 4096 + 8192 | 8192 + 16384 | 16384 + 32768 | 32768 + 65536 | 65536 + 131072 | 131072 + 262144 | 262144 + 524288 | 524288 + 1048576 | 1048576 + 2097152 | 2097152 + 4194304 | 4194304 + 8388608 | 8388608 + 16777216 | 16777216 + 33554432 |@ 33554432 + 67108864 |@@ 67108864 + 134217728 |@@@ 134217728 + 268435456 |@@@@@@@ 268435456 + 536870912 | 0 + + 29 + value ------------- Distribution ------------- count + -536870912 | 0 + -268435456 @@@| -268435456 + -134217728 @@| -134217728 + -67108864 @| -67108864 + -33554432 | -33554432 + -16777216 | -16777216 + -8388608 | -8388608 + -4194304 | -4194304 + -2097152 | -2097152 + -1048576 | -1048576 + -524288 | -524288 + -262144 | -262144 + -131072 | -131072 + -65536 | -65536 + -32768 | -32768 + -16384 | -16384 + -8192 | -8192 + -4096 | -4096 + -2048 | -2048 + -1024 | -1024 + -512 | -512 + -256 | -256 + -128 | -128 + -64 | -64 + -32 | -32 + -16 | -16 + -8 | -8 + -4 | -4 + -2 | -2 + -1 | 0 + 0 | 0 + 1 | 1 + 2 | 2 + 4 | 4 + 8 | 8 + 16 | 16 + 32 | 32 + 64 | 64 + 128 | 128 + 256 | 256 + 512 | 512 + 1024 | 1024 + 2048 | 2048 + 4096 | 4096 + 8192 | 8192 + 16384 | 16384 + 32768 | 32768 + 65536 | 65536 + 131072 | 131072 + 262144 | 262144 + 524288 | 524288 + 1048576 | 1048576 + 2097152 | 2097152 + 4194304 | 4194304 + 8388608 | 8388608 + 16777216 | 16777216 + 33554432 | 33554432 + 67108864 |@ 67108864 + 134217728 |@@ 134217728 + 268435456 |@@@ 268435456 + 536870912 |@@@@@@@ 536870912 + 1073741824 | 0 + + 30 + value ------------- Distribution ------------- count + -1073741824 | 0 + -536870912 @@@| -536870912 + -268435456 @@| -268435456 + -134217728 @| -134217728 + -67108864 | -67108864 + -33554432 | -33554432 + -16777216 | -16777216 + -8388608 | -8388608 + -4194304 | -4194304 + -2097152 | -2097152 + -1048576 | -1048576 + -524288 | -524288 + -262144 | -262144 + -131072 | -131072 + -65536 | -65536 + -32768 | -32768 + -16384 | -16384 + -8192 | -8192 + -4096 | -4096 + -2048 | -2048 + -1024 | -1024 + -512 | -512 + -256 | -256 + -128 | -128 + -64 | -64 + -32 | -32 + -16 | -16 + -8 | -8 + -4 | -4 + -2 | -2 + -1 | 0 + 0 | 0 + 1 | 1 + 2 | 2 + 4 | 4 + 8 | 8 + 16 | 16 + 32 | 32 + 64 | 64 + 128 | 128 + 256 | 256 + 512 | 512 + 1024 | 1024 + 2048 | 2048 + 4096 | 4096 + 8192 | 8192 + 16384 | 16384 + 32768 | 32768 + 65536 | 65536 + 131072 | 131072 + 262144 | 262144 + 524288 | 524288 + 1048576 | 1048576 + 2097152 | 2097152 + 4194304 | 4194304 + 8388608 | 8388608 + 16777216 | 16777216 + 33554432 | 33554432 + 67108864 | 67108864 + 134217728 |@ 134217728 + 268435456 |@@ 268435456 + 536870912 |@@@ 536870912 + 1073741824 |@@@@@@@ 1073741824 + 2147483648 | 0 + + 31 + value ------------- Distribution ------------- count + -2147483648 | 0 + -1073741824 @@@| -1073741824 + -536870912 @@| -536870912 + -268435456 @| -268435456 + -134217728 | -134217728 + -67108864 | -67108864 + -33554432 | -33554432 + -16777216 | -16777216 + -8388608 | -8388608 + -4194304 | -4194304 + -2097152 | -2097152 + -1048576 | -1048576 + -524288 | -524288 + -262144 | -262144 + -131072 | -131072 + -65536 | -65536 + -32768 | -32768 + -16384 | -16384 + -8192 | -8192 + -4096 | -4096 + -2048 | -2048 + -1024 | -1024 + -512 | -512 + -256 | -256 + -128 | -128 + -64 | -64 + -32 | -32 + -16 | -16 + -8 | -8 + -4 | -4 + -2 | -2 + -1 | 0 + 0 | 0 + 1 | 1 + 2 | 2 + 4 | 4 + 8 | 8 + 16 | 16 + 32 | 32 + 64 | 64 + 128 | 128 + 256 | 256 + 512 | 512 + 1024 | 1024 + 2048 | 2048 + 4096 | 4096 + 8192 | 8192 + 16384 | 16384 + 32768 | 32768 + 65536 | 65536 + 131072 | 131072 + 262144 | 262144 + 524288 | 524288 + 1048576 | 1048576 + 2097152 | 2097152 + 4194304 | 4194304 + 8388608 | 8388608 + 16777216 | 16777216 + 33554432 | 33554432 + 67108864 | 67108864 + 134217728 | 134217728 + 268435456 |@ 268435456 + 536870912 |@@ 536870912 + 1073741824 |@@@ 1073741824 + 2147483648 |@@@@@@@ 2147483648 + 4294967296 | 0 + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.quantround.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.quantround.d new file mode 100644 index 00000000..c40d69c0 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.quantround.d @@ -0,0 +1,57 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma D option quiet + +/* + * This test verifies that the height of the ASCII quantization bars is + * determined using rounding and not truncated integer arithmetic. + */ +tick-10ms +/i++ >= 27/ +{ + exit(0); +} + +tick-10ms +/i > 8/ +{ + @ = quantize(2); +} + +tick-10ms +/i > 2 && i <= 8/ +{ + @ = quantize(1); +} + +tick-10ms +/i <= 2/ +{ + @ = quantize(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.quantround.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.quantround.d.out new file mode 100644 index 00000000..9b89ec14 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.quantround.d.out @@ -0,0 +1,9 @@ + + + value ------------- Distribution ------------- count + -1 | 0 + 0 |@@@ 2 + 1 |@@@@@@@@@ 6 + 2 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 19 + 4 | 0 + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.quantzero.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.quantzero.d new file mode 100644 index 00000000..bfa633cd --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.quantzero.d @@ -0,0 +1,63 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma D option quiet + + +BEGIN +{ + a = 7; + b = 13; + val = (-a * b) + a; +} + +tick-1ms +{ + incr = val % b; + val += a; +} + +tick-1ms +/val == 0/ +{ + val += a; +} + +tick-1ms +/incr != 0/ +{ + i++; + @[i] = quantize(0, incr); +} + +tick-1ms +/incr == 0/ +{ + printa(@); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.quantzero.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.quantzero.d.out new file mode 100644 index 00000000..c2c1cf02 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.quantzero.d.out @@ -0,0 +1,146 @@ + + 2 + value ------------- Distribution ------------- count + -1 | 0 + 0 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -12 + 1 | 0 + + 4 + value ------------- Distribution ------------- count + -1 | 0 + 0 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -11 + 1 | 0 + + 6 + value ------------- Distribution ------------- count + -1 | 0 + 0 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -10 + 1 | 0 + + 8 + value ------------- Distribution ------------- count + -1 | 0 + 0 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -9 + 1 | 0 + + 10 + value ------------- Distribution ------------- count + -1 | 0 + 0 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -8 + 1 | 0 + + 12 + value ------------- Distribution ------------- count + -1 | 0 + 0 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -7 + 1 | 0 + + 1 + value ------------- Distribution ------------- count + -1 | 0 + 0 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -6 + 1 | 0 + + 3 + value ------------- Distribution ------------- count + -1 | 0 + 0 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -5 + 1 | 0 + + 5 + value ------------- Distribution ------------- count + -1 | 0 + 0 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -4 + 1 | 0 + + 7 + value ------------- Distribution ------------- count + -1 | 0 + 0 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -3 + 1 | 0 + + 9 + value ------------- Distribution ------------- count + -1 | 0 + 0 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -2 + 1 | 0 + + 11 + value ------------- Distribution ------------- count + -1 | 0 + 0 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -1 + 1 | 0 + + 14 + value ------------- Distribution ------------- count + -1 | 0 + 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1 + 1 | 0 + + 16 + value ------------- Distribution ------------- count + -1 | 0 + 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 2 + 1 | 0 + + 18 + value ------------- Distribution ------------- count + -1 | 0 + 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 3 + 1 | 0 + + 20 + value ------------- Distribution ------------- count + -1 | 0 + 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 4 + 1 | 0 + + 22 + value ------------- Distribution ------------- count + -1 | 0 + 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 5 + 1 | 0 + + 24 + value ------------- Distribution ------------- count + -1 | 0 + 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 6 + 1 | 0 + + 13 + value ------------- Distribution ------------- count + -1 | 0 + 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 7 + 1 | 0 + + 15 + value ------------- Distribution ------------- count + -1 | 0 + 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 8 + 1 | 0 + + 17 + value ------------- Distribution ------------- count + -1 | 0 + 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 9 + 1 | 0 + + 19 + value ------------- Distribution ------------- count + -1 | 0 + 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 10 + 1 | 0 + + 21 + value ------------- Distribution ------------- count + -1 | 0 + 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 11 + 1 | 0 + + 23 + value ------------- Distribution ------------- count + -1 | 0 + 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 12 + 1 | 0 + + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.signature.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.signature.d new file mode 100644 index 00000000..baa951a4 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.signature.d @@ -0,0 +1,54 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * This is a simple test to make sure that signature checking works properly + * for the fake-o types. + */ +BEGIN +{ + @stk[ustack()] = count(); + @symmy[sym(0)] = count(); + @usymmy[usym(0)] = count(); + @funky[func(0)] = count(); + @ufunky[ufunc(0)] = count(); + @moddy[mod(0)] = count(); + @umoddy[umod(0)] = count(); +} + +BEGIN +{ + @stk[ustack()] = count(); + @symmy[sym(0)] = count(); + @usymmy[usym(0)] = count(); + @funky[func(0)] = count(); + @ufunky[ufunc(0)] = count(); + @moddy[mod(0)] = count(); + @umoddy[umod(0)] = count(); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.signedkeys.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.signedkeys.d new file mode 100644 index 00000000..ed3d1314 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.signedkeys.d @@ -0,0 +1,120 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * Signed integer keys print and sort as expected. + * + * SECTION: Aggregations, Printing Aggregations + * + * NOTES: DTrace sorts integer keys as unsigned values, yet prints 32- + * and 64-bit integers as signed values. Since the Java DTrace API is + * expected to emulate this behavior, this test was added to ensure that + * the behavior is preserved. Consistency with trace() output is also + * tested. + */ + +#pragma D option quiet +#pragma D option aggsortkey + +BEGIN +{ + trace((char)-2); + trace("\n"); + trace((char)-1); + trace("\n"); + trace((char)0); + trace("\n"); + trace((char)1); + trace("\n"); + trace((char)2); + trace("\n"); + trace("\n"); + + trace((short)-2); + trace("\n"); + trace((short)-1); + trace("\n"); + trace((short)0); + trace("\n"); + trace((short)1); + trace("\n"); + trace((short)2); + trace("\n"); + trace("\n"); + + trace(-2); + trace("\n"); + trace(-1); + trace("\n"); + trace(0); + trace("\n"); + trace(1); + trace("\n"); + trace(2); + trace("\n"); + trace("\n"); + + trace((long long)-2); + trace("\n"); + trace((long long)-1); + trace("\n"); + trace((long long)0); + trace("\n"); + trace((long long)1); + trace("\n"); + trace((long long)2); + trace("\n"); + + @i8[(char)-2] = sum(-2); + @i8[(char)-1] = sum(-1); + @i8[(char)0] = sum(0); + @i8[(char)1] = sum(1); + @i8[(char)2] = sum(2); + + @i16[(short)-2] = sum(-2); + @i16[(short)-1] = sum(-1); + @i16[(short)0] = sum(0); + @i16[(short)1] = sum(1); + @i16[(short)2] = sum(2); + + @i32[-2] = sum(-2); + @i32[-1] = sum(-1); + @i32[0] = sum(0); + @i32[1] = sum(1); + @i32[2] = sum(2); + + @i64[(long long)-2] = sum(-2); + @i64[(long long)-1] = sum(-1); + @i64[(long long)0] = sum(0); + @i64[(long long)1] = sum(1); + @i64[(long long)2] = sum(2); + + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.signedkeys.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.signedkeys.d.out new file mode 100644 index 00000000..42e619e0 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.signedkeys.d.out @@ -0,0 +1,44 @@ +254 +255 +0 +1 +2 + +65534 +65535 +0 +1 +2 + +-2 +-1 +0 +1 +2 + +-2 +-1 +0 +1 +2 + + 0 0 + 1 1 + 2 2 + 254 -2 + 255 -1 + 0 0 + 1 1 + 2 2 + 65534 -2 + 65535 -1 + 0 0 + 1 1 + 2 2 + -2 -2 + -1 -1 + 0 0 + 1 1 + 2 2 + -2 -2 + -1 -1 diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.signedkeyspos.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.signedkeyspos.d new file mode 100644 index 00000000..5836c6a5 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.signedkeyspos.d @@ -0,0 +1,115 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * Signed integer keys print and sort as expected using the + * aggsortkeypos and aggsortrev options + * + * SECTION: Aggregations, Printing Aggregations + * + * NOTES: DTrace sorts integer keys as unsigned values, yet prints 32- + * and 64-bit integers as signed values. Since the Java DTrace API is + * expected to emulate this behavior, this test was added to ensure that + * the behavior is preserved. + */ + +#pragma D option quiet +#pragma D option aggsortkey +#pragma D option aggsortkeypos=1 +#pragma D option aggsortrev + +BEGIN +{ + @i8["cat", (char)-2] = sum(-2); + @i8["dog", (char)-2] = sum(-22); + @i8["mouse", (char)-2] = sum(-222); + @i8["cat", (char)-1] = sum(-1); + @i8["dog", (char)-1] = sum(-11); + @i8["mouse", (char)-1] = sum(-111); + @i8["cat", (char)0] = sum(0); + @i8["dog", (char)0] = sum(10); + @i8["mouse", (char)0] = sum(100); + @i8["cat", (char)1] = sum(1); + @i8["dog", (char)1] = sum(11); + @i8["mouse", (char)1] = sum(111); + @i8["cat", (char)2] = sum(2); + @i8["dog", (char)2] = sum(22); + @i8["mouse", (char)2] = sum(222); + + @i16["mouse", (short)-2] = sum(-2); + @i16["dog", (short)-2] = sum(-22); + @i16["cat", (short)-2] = sum(-222); + @i16["mouse", (short)-1] = sum(-1); + @i16["dog", (short)-1] = sum(-11); + @i16["cat", (short)-1] = sum(-111); + @i16["mouse", (short)0] = sum(0); + @i16["dog", (short)0] = sum(10); + @i16["cat", (short)0] = sum(100); + @i16["mouse", (short)1] = sum(1); + @i16["dog", (short)1] = sum(11); + @i16["cat", (short)1] = sum(111); + @i16["mouse", (short)2] = sum(2); + @i16["dog", (short)2] = sum(22); + @i16["cat", (short)2] = sum(222); + + @i32["mouse", -2] = sum(-2); + @i32["bear", -2] = sum(-22); + @i32["cat", -2] = sum(-222); + @i32["mouse", -1] = sum(-1); + @i32["bear", -1] = sum(-11); + @i32["cat", -1] = sum(-111); + @i32["mouse", 0] = sum(0); + @i32["bear", 0] = sum(10); + @i32["cat", 0] = sum(100); + @i32["mouse", 1] = sum(1); + @i32["bear", 1] = sum(11); + @i32["cat", 1] = sum(111); + @i32["mouse", 2] = sum(2); + @i32["bear", 2] = sum(22); + @i32["cat", 2] = sum(222); + + @i64["cat", (long long)-2] = sum(-2); + @i64["bear", (long long)-2] = sum(-22); + @i64["dog", (long long)-2] = sum(-222); + @i64["cat", (long long)-1] = sum(-1); + @i64["bear", (long long)-1] = sum(-11); + @i64["dog", (long long)-1] = sum(-111); + @i64["cat", (long long)0] = sum(0); + @i64["bear", (long long)0] = sum(10); + @i64["dog", (long long)0] = sum(100); + @i64["cat", (long long)1] = sum(1); + @i64["bear", (long long)1] = sum(11); + @i64["dog", (long long)1] = sum(111); + @i64["cat", (long long)2] = sum(2); + @i64["bear", (long long)2] = sum(22); + @i64["dog", (long long)2] = sum(222); + + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.signedkeyspos.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.signedkeyspos.d.out new file mode 100644 index 00000000..28e95ac3 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.signedkeyspos.d.out @@ -0,0 +1,61 @@ + + dog -1 -111 + cat -1 -1 + bear -1 -11 + dog -2 -222 + cat -2 -2 + bear -2 -22 + dog 2 222 + cat 2 2 + bear 2 22 + dog 1 111 + cat 1 1 + bear 1 11 + dog 0 100 + cat 0 0 + bear 0 10 + mouse -1 -1 + cat -1 -111 + bear -1 -11 + mouse -2 -2 + cat -2 -222 + bear -2 -22 + mouse 2 2 + cat 2 222 + bear 2 22 + mouse 1 1 + cat 1 111 + bear 1 11 + mouse 0 0 + cat 0 100 + bear 0 10 + mouse 65535 -1 + dog 65535 -11 + cat 65535 -111 + mouse 65534 -2 + dog 65534 -22 + cat 65534 -222 + mouse 2 2 + dog 2 22 + cat 2 222 + mouse 1 1 + dog 1 11 + cat 1 111 + mouse 0 0 + dog 0 10 + cat 0 100 + mouse 255 -111 + dog 255 -11 + cat 255 -1 + mouse 254 -222 + dog 254 -22 + cat 254 -2 + mouse 2 222 + dog 2 22 + cat 2 2 + mouse 1 111 + dog 1 11 + cat 1 1 + mouse 0 100 + dog 0 10 + cat 0 0 diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.stddev.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.stddev.d new file mode 100644 index 00000000..041b8207 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.stddev.d @@ -0,0 +1,64 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +/* + * ASSERTION: + * Positive stddev() test + * + * SECTION: Aggregations/Aggregations + * + * NOTES: This is a simple verifiable positive test of the stddev() function. + * printa() for one aggregation, default printing behavior for the other + * so that we exercise both code paths. + */ + +#pragma D option quiet + +BEGIN +{ + @a = stddev(5000000000); + @a = stddev(5000000100); + @a = stddev(5000000200); + @a = stddev(5000000300); + @a = stddev(5000000400); + @a = stddev(5000000500); + @a = stddev(5000000600); + @a = stddev(5000000700); + @a = stddev(5000000800); + @a = stddev(5000000900); + @b = stddev(-5000000000); + @b = stddev(-5000000100); + @b = stddev(-5000000200); + @b = stddev(-5000000300); + @b = stddev(-5000000400); + @b = stddev(-5000000500); + @b = stddev(-5000000600); + @b = stddev(-5000000700); + @b = stddev(-5000000800); + @b = stddev(-5000000900); + printa("%@d\n", @a); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.stddev.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.stddev.d.out new file mode 100644 index 00000000..0c02852e --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.stddev.d.out @@ -0,0 +1,3 @@ +287 + + 287 diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.subr.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.subr.d new file mode 100644 index 00000000..5ca1f1ef --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.subr.d @@ -0,0 +1,112 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#include + +#define INTFUNC(x) \ + BEGIN \ + /*DSTYLED*/ \ + { \ + subr++; \ + @[(long)x] = sum(1); \ + /*DSTYLED*/ \ + } + +#define STRFUNC(x) \ + BEGIN \ + /*DSTYLED*/ \ + { \ + subr++; \ + @str[x] = sum(1); \ + /*DSTYLED*/ \ + } + +#define VOIDFUNC(x) \ + BEGIN \ + /*DSTYLED*/ \ + { \ + subr++; \ + /*DSTYLED*/ \ + } + +INTFUNC(rand()) +INTFUNC(mutex_owned(&`cpu_lock)) +INTFUNC(mutex_owner(&`cpu_lock)) +INTFUNC(mutex_type_adaptive(&`cpu_lock)) +INTFUNC(mutex_type_spin(&`cpu_lock)) +INTFUNC(rw_read_held(&`vfssw_lock)) +INTFUNC(rw_write_held(&`vfssw_lock)) +INTFUNC(rw_iswriter(&`vfssw_lock)) +INTFUNC(copyin(NULL, 1)) +STRFUNC(copyinstr(NULL, 1)) +INTFUNC(speculation()) +INTFUNC(progenyof($pid)) +INTFUNC(strlen("fooey")) +VOIDFUNC(copyout) +VOIDFUNC(copyoutstr) +INTFUNC(alloca(10)) +VOIDFUNC(bcopy) +VOIDFUNC(copyinto) +INTFUNC(msgdsize(NULL)) +INTFUNC(msgsize(NULL)) +INTFUNC(getmajor(0)) +INTFUNC(getminor(0)) +STRFUNC(ddi_pathname(NULL, 0)) +STRFUNC(strjoin("foo", "bar")) +STRFUNC(lltostr(12373)) +STRFUNC(basename("/var/crash/systemtap")) +STRFUNC(dirname("/var/crash/systemtap")) +STRFUNC(cleanpath("/var/crash/systemtap")) +STRFUNC(strchr("The SystemTap, The.", 't')) +STRFUNC(strrchr("The SystemTap, The.", 't')) +STRFUNC(strstr("The SystemTap, The.", "The")) +STRFUNC(strtok("The SystemTap, The.", "T")) +STRFUNC(substr("The SystemTap, The.", 0)) +INTFUNC(index("The SystemTap, The.", "The")) +INTFUNC(rindex("The SystemTap, The.", "The")) +INTFUNC(htons(0x1234)) +INTFUNC(htonl(0x12345678)) +INTFUNC(htonll(0x1234567890abcdefL)) +INTFUNC(ntohs(0x1234)) +INTFUNC(ntohl(0x12345678)) +INTFUNC(ntohll(0x1234567890abcdefL)) +STRFUNC(inet_ntoa((ipaddr_t *)alloca(sizeof (ipaddr_t)))) +STRFUNC(inet_ntoa6((in6_addr_t *)alloca(sizeof (in6_addr_t)))) +STRFUNC(inet_ntop(AF_INET, (void *)alloca(sizeof (ipaddr_t)))) + +BEGIN +/subr == DIF_SUBR_MAX + 1/ +{ + exit(0); +} + +BEGIN +{ + printf("found %d subroutines, expected %d\n", subr, DIF_SUBR_MAX + 1); + exit(1); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.sum.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.sum.d new file mode 100644 index 00000000..1b9025af --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.sum.d @@ -0,0 +1,57 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * Positive sum() test + * + * SECTION: Aggregations/Aggregations + * + * NOTES: This is verifiable simple positive test of the sum() function. + */ + +#pragma D option quiet + +BEGIN +{ + i = 0; +} + +tick-10ms +/i < 1000/ +{ + @a = sum(i); + i += 100; +} + +tick-10ms +/i == 1000/ +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.sum.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.sum.d.out new file mode 100644 index 00000000..5d8b37b8 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.sum.d.out @@ -0,0 +1,2 @@ + + 4500 diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.trunc.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.trunc.d new file mode 100644 index 00000000..d1c1b3cc --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.trunc.d @@ -0,0 +1,49 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma D option quiet + +int i; + +tick-10ms +/i < 100/ +{ + @[i] = sum(i); + i++; +} + +tick-10ms +/i == 100/ +{ + exit(0); +} + +END +{ + trunc(@, 10); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.trunc.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.trunc.d.out new file mode 100644 index 00000000..2e18ef8b --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.trunc.d.out @@ -0,0 +1,11 @@ + + 90 90 + 91 91 + 92 92 + 93 93 + 94 94 + 95 95 + 96 96 + 97 97 + 98 98 + 99 99 diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.trunc0.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.trunc0.d new file mode 100644 index 00000000..5c31069d --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.trunc0.d @@ -0,0 +1,57 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma D option quiet +#pragma D option aggrate=1ms +#pragma D option switchrate=50ms + +int i; + +tick-100ms +/i < 10/ +{ + @[i] = sum(10 - i); + i++; +} + +tick-100ms +/i == 5/ +{ + trunc(@); +} + +tick-100ms +/i == 10/ +{ + exit(0); +} + +END +{ + printa(@); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.trunc0.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.trunc0.d.out new file mode 100644 index 00000000..70dc7a02 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.trunc0.d.out @@ -0,0 +1,7 @@ + + 9 1 + 8 2 + 7 3 + 6 4 + 5 5 + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.truncquant.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.truncquant.d new file mode 100644 index 00000000..8baa56ab --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.truncquant.d @@ -0,0 +1,52 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma D option quiet + +int i; + +tick-10ms +/i < 100/ +{ + @[i] = lquantize(i, 0, 150); + @[i] = lquantize(i + 1, 0, 150); + @[i] = lquantize(i + 2, 0, 150); + @[i] = lquantize(i + 3, 0, 150); + i++; +} + +tick-10ms +/i == 100/ +{ + exit(0); +} + +END +{ + trunc(@, 5); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.truncquant.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.truncquant.d.out new file mode 100644 index 00000000..86975af3 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.truncquant.d.out @@ -0,0 +1,46 @@ + + 95 + value ------------- Distribution ------------- count + 94 | 0 + 95 |@@@@@@@@@@ 1 + 96 |@@@@@@@@@@ 1 + 97 |@@@@@@@@@@ 1 + 98 |@@@@@@@@@@ 1 + 99 | 0 + + 96 + value ------------- Distribution ------------- count + 95 | 0 + 96 |@@@@@@@@@@ 1 + 97 |@@@@@@@@@@ 1 + 98 |@@@@@@@@@@ 1 + 99 |@@@@@@@@@@ 1 + 100 | 0 + + 97 + value ------------- Distribution ------------- count + 96 | 0 + 97 |@@@@@@@@@@ 1 + 98 |@@@@@@@@@@ 1 + 99 |@@@@@@@@@@ 1 + 100 |@@@@@@@@@@ 1 + 101 | 0 + + 98 + value ------------- Distribution ------------- count + 97 | 0 + 98 |@@@@@@@@@@ 1 + 99 |@@@@@@@@@@ 1 + 100 |@@@@@@@@@@ 1 + 101 |@@@@@@@@@@ 1 + 102 | 0 + + 99 + value ------------- Distribution ------------- count + 98 | 0 + 99 |@@@@@@@@@@ 1 + 100 |@@@@@@@@@@ 1 + 101 |@@@@@@@@@@ 1 + 102 |@@@@@@@@@@ 1 + 103 | 0 + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.valsortkeypos.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.valsortkeypos.d new file mode 100644 index 00000000..ec0bee32 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.valsortkeypos.d @@ -0,0 +1,49 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * aggsortkeypos option works when sorting by values, values are + * equal, and keys are compared to break the tie + * + * SECTION: Aggregations, Printing Aggregations + * + */ + +#pragma D option quiet +#pragma D option aggsortkeypos=1 + +BEGIN +{ + @[1, 3] = sum(0); + @[2, 2] = sum(0); + @[3, 1] = sum(0); + + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.valsortkeypos.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.valsortkeypos.d.out new file mode 100644 index 00000000..9b0acf92 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/aggs/tst.valsortkeypos.d.out @@ -0,0 +1,4 @@ + + 3 1 0 + 2 2 0 + 1 3 0 diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arithmetic/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arithmetic/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arithmetic/err.D_DIV_ZERO.divby0.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arithmetic/err.D_DIV_ZERO.divby0.d new file mode 100644 index 00000000..0b7b6610 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arithmetic/err.D_DIV_ZERO.divby0.d @@ -0,0 +1,43 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Verify that divide by 0 errors are caught + * + * SECTION: + * Types, Operators, and Expressions/Arithmetic Operators + */ + + +BEGIN +{ + c = 123/0; + exit(0); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arithmetic/err.D_DIV_ZERO.divby0_1.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arithmetic/err.D_DIV_ZERO.divby0_1.d new file mode 100644 index 00000000..11017951 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arithmetic/err.D_DIV_ZERO.divby0_1.d @@ -0,0 +1,45 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Verify that computed divide by 0 errors are caught + * + * SECTION: + * Types, Operators, and Expressions/Arithmetic Operators + */ + + + + +BEGIN +{ + c = 123/(7-7); + exit(0); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arithmetic/err.D_DIV_ZERO.divby0_2.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arithmetic/err.D_DIV_ZERO.divby0_2.d new file mode 100644 index 00000000..45469614 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arithmetic/err.D_DIV_ZERO.divby0_2.d @@ -0,0 +1,46 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Verify that computed divide by 0 errors are caught + * + * SECTION: + * Types, Operators, and Expressions/Arithmetic Operators + */ + + + + + +BEGIN +{ + c = 123/((7-7) * 999); + exit(0); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arithmetic/err.D_DIV_ZERO.modby0.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arithmetic/err.D_DIV_ZERO.modby0.d new file mode 100644 index 00000000..b2bf1462 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arithmetic/err.D_DIV_ZERO.modby0.d @@ -0,0 +1,44 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Verify that mod by 0 errors are caught + * + * SECTION: + * Types, Operators, and Expressions/Arithmetic Operators + */ + + + +BEGIN +{ + c = 123%0; + exit(0); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arithmetic/err.D_SYNTAX.addmin.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arithmetic/err.D_SYNTAX.addmin.d new file mode 100644 index 00000000..f20339c1 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arithmetic/err.D_SYNTAX.addmin.d @@ -0,0 +1,47 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Call invalid / impossible arithmetic operations and make sure + * Test gives compilation error. + * + * SECTION: Types, Operators, and Expressions/Arithmetic Operators + * + */ + +#pragma D option quiet + +BEGIN +{ + i = 0; + i+-; + printf("The value of i is %d\n", i); + exit (0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arithmetic/err.D_SYNTAX.divmin.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arithmetic/err.D_SYNTAX.divmin.d new file mode 100644 index 00000000..c11e64fd --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arithmetic/err.D_SYNTAX.divmin.d @@ -0,0 +1,46 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Call invalid / impossible arithmetic operations and make sure + * Test gives compilation error. + * + * SECTION: Types, Operators, and Expressions/Arithmetic Operators + * + */ + +#pragma D option quiet + +BEGIN +{ + i = 1; + i /-= i; + printf("The value of i is %d\n", i); + exit (0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arithmetic/err.D_SYNTAX.muladd.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arithmetic/err.D_SYNTAX.muladd.d new file mode 100644 index 00000000..bb107fb3 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arithmetic/err.D_SYNTAX.muladd.d @@ -0,0 +1,46 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Call invalid / impossible arithmetic operations and make sure + * Test gives compilation error. + * + * SECTION: Types, Operators, and Expressions/Arithmetic Operators + * + */ + +#pragma D option quiet + +BEGIN +{ + i = 1; + i *+= i; + printf("The value of i is %d\n", i); + exit (0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arithmetic/err.D_SYNTAX.muldiv.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arithmetic/err.D_SYNTAX.muldiv.d new file mode 100644 index 00000000..7d44b6c7 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arithmetic/err.D_SYNTAX.muldiv.d @@ -0,0 +1,46 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Call invalid / impossible arithmetic operations and make sure + * Test gives compilation error. + * + * SECTION: Types, Operators, and Expressions/Arithmetic Operators + * + */ + +#pragma D option quiet + +BEGIN +{ + i = 1; + i */= i; + printf("The value of i is %d\n", i); + exit (0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arithmetic/tst.basics.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arithmetic/tst.basics.d new file mode 100644 index 00000000..435f09f6 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arithmetic/tst.basics.d @@ -0,0 +1,66 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Simple Arithmetic expressions. + * Call simple expressions and make sure test succeeds. + * Match expected output in tst.basics.d.out + * + * SECTION: Types, Operators, and Expressions/Arithmetic Operators + * + */ + +#pragma D option quiet + +BEGIN +{ + i = 0; + i = 1 + 2 + 3; + printf("The value of i is %d\n", i); + + i = i * 3; + printf("The value of i is %d\n", i); + + i = (i * 3) + i; + printf("The value of i is %d\n", i); + + i = (i + (i * 3) + i) * i; + printf("The value of i is %d\n", i); + + i = i - (i + (i * 3) + i) * i / i * i; + printf("The value of i is %d\n", i); + + i = i * (i - 3 + 5 / i * i ) / i * 6; + printf("The value of i is %d\n", i); + + i = i ^ 5; + printf("The value of i is %d\n", i); + + exit (0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arithmetic/tst.complex.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arithmetic/tst.complex.d new file mode 100644 index 00000000..2db1b635 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arithmetic/tst.complex.d @@ -0,0 +1,57 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Complex expressions. + * Call complex expressions and make sure test succeeds. + * Match expected output in tst.complex.d.out + * + * SECTION: Types, Operators, and Expressions/Arithmetic Operators + * + */ + +#pragma D option quiet + +BEGIN +{ + i = 0; + i = i++ + ++i; + printf("The value of i is %d\n", i); + i = i-- - --i; + printf("The value of i is %d\n", i); + i = i-- + ++i; + printf("The value of i is %d\n", i); + i += i++ + -- i + ++i - ++i * i ; + printf("The value of i is %d\n", i); + i -= i++ * 3; + printf("The value of i is %d\n", i); + i = i++/i--+i++-++i-++i; + printf("The value of i is %d\n", i); + exit (0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arrays/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arrays/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arrays/err.D_ARR_BADREF.bad.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arrays/err.D_ARR_BADREF.bad.d new file mode 100644 index 00000000..d31b1f64 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arrays/err.D_ARR_BADREF.bad.d @@ -0,0 +1,42 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Tuples can not be used in non-associative arrays. + * + * SECTION: Pointers and Arrays/Array Declarations and Storage + */ + +int x[5]; + +BEGIN +{ + x[1, 2] = 1; +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arrays/err.D_DECL_ARRBIG.toobig.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arrays/err.D_DECL_ARRBIG.toobig.d new file mode 100644 index 00000000..80422e88 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arrays/err.D_DECL_ARRBIG.toobig.d @@ -0,0 +1,45 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Array declarations with indexs over INT_MAX return a + * D_DECL_ARRBIG errtag. + * + * SECTION: + * Pointers and Arrays/Array Declarations and Storage + */ + +int x[88294967295]; + +BEGIN +{ + exit(1); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arrays/err.D_DECL_ARRNULL.bad.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arrays/err.D_DECL_ARRNULL.bad.d new file mode 100644 index 00000000..6e7a34ff --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arrays/err.D_DECL_ARRNULL.bad.d @@ -0,0 +1,42 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Arrays must have array dimensions + * + * SECTION: Pointers and Arrays/Array Declarations and Storage + */ + +int a[]; + +BEGIN +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arrays/err.D_DECL_ARRSUB.bad.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arrays/err.D_DECL_ARRSUB.bad.d new file mode 100644 index 00000000..f4403677 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arrays/err.D_DECL_ARRSUB.bad.d @@ -0,0 +1,42 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Arrays declarations must have a positive constant as a + * subscription. + * + * SECTION: Pointers and Arrays/Array Declarations and Storage + */ + +int a[-7]; + +BEGIN +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arrays/err.D_DECL_PROTO_TYPE.badtuple.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arrays/err.D_DECL_PROTO_TYPE.badtuple.d new file mode 100644 index 00000000..7e879dc6 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arrays/err.D_DECL_PROTO_TYPE.badtuple.d @@ -0,0 +1,44 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Invalid tuple types result in a DT_DECL_ARRTYPE error. + * + * SECTION: + * Pointers and Arrays/Array Declarations and Storage + */ + + +int x[void, char]; + +BEGIN +{ + x[trace(), 'a'] = 456; +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arrays/err.D_IDENT_UNDEF.badureg.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arrays/err.D_IDENT_UNDEF.badureg.d new file mode 100644 index 00000000..e48541b6 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arrays/err.D_IDENT_UNDEF.badureg.d @@ -0,0 +1,42 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Arrays declarations must have a positive constant as a + * subscription. + * + * SECTION: User Process Tracing/uregs Array + */ + +BEGIN +{ + printf("FOO = 0x%x\n", uregs[FOO]); + exit(1); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arrays/tst.basic1.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arrays/tst.basic1.d new file mode 100644 index 00000000..ba5b2cf0 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arrays/tst.basic1.d @@ -0,0 +1,56 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Simple array test + * + * SECTION: Pointers and Arrays/Array Declarations and Storage + * + */ + + +#pragma D option quiet + +BEGIN +{ + a[1] = 0; +} + +tick-1 +/a[1] == 0/ +{ + exit(0); +} + +tick-1 +/a[1] != 0/ +{ + printf("Expected 0, got %d\n", a[1]); + exit(1); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arrays/tst.basic2.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arrays/tst.basic2.d new file mode 100644 index 00000000..14e1c5cf --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arrays/tst.basic2.d @@ -0,0 +1,57 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Simple array test + * + * SECTION: Pointers and Arrays/Array Declarations and Storage + * + */ + + +#pragma D option quiet + +BEGIN +{ + a[1] = 0; + a[1]++; +} + +tick-1 +/a[1] == 1/ +{ + exit(0); +} + +tick-1 +/a[1] != 1/ +{ + printf("Expected 1, got %d\n", a[1]); + exit(1); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arrays/tst.basic3.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arrays/tst.basic3.d new file mode 100644 index 00000000..897a12f2 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arrays/tst.basic3.d @@ -0,0 +1,56 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Simple array test + * + * SECTION: Pointers and Arrays/Array Declarations and Storage + * + */ + + +#pragma D option quiet + +BEGIN +{ + a[1] = 0; + ++a[1]; +} + +tick-1 +/a[1] == 1/ +{ + exit(0); +} + +tick-1 +/a[1] != 1/ +{ + printf("Expected 1, got %d\n", a[1]); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arrays/tst.basic4.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arrays/tst.basic4.d new file mode 100644 index 00000000..3635a42d --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arrays/tst.basic4.d @@ -0,0 +1,56 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Simple array test + * + * SECTION: Pointers and Arrays/Array Declarations and Storage + * + */ + + +#pragma D option quiet + +BEGIN +{ + a["test"] = 0; +} + +tick-1 +/a["test"] == 0/ +{ + exit(0); +} + +tick-1 +/a["test"] != 0/ +{ + printf("Expected 0, got %d\n", a["test"]); + exit(1); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arrays/tst.basic5.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arrays/tst.basic5.d new file mode 100644 index 00000000..866a8c39 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arrays/tst.basic5.d @@ -0,0 +1,59 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Simple array test + * + * SECTION: Pointers and Arrays/Array Declarations and Storage + * + */ + + +#pragma D option quiet + +BEGIN +{ + a["test"] = 0; + b = ++a["test"]; +} + +tick-1 +/b == 1/ +{ + exit(0); +} + +tick-1 +/b != 1/ +{ + printf("Expected b = 1, got %d\n", b); + exit(1); +} + + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arrays/tst.basic6.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arrays/tst.basic6.d new file mode 100644 index 00000000..0371db30 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arrays/tst.basic6.d @@ -0,0 +1,58 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Simple array test + * + * SECTION: Pointers and Arrays/Array Declarations and Storage + * + */ + + +#pragma D option quiet + +BEGIN +{ + a["test", "test"] = 0; + b = ++a["test", "test"]; +} + +tick-1 +/b == 1/ +{ + exit(0); +} + +tick-1 +/b != 1/ +{ + printf("Expected b = 1, got %d\n", b); + exit(1); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arrays/tst.uregsarray.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arrays/tst.uregsarray.d new file mode 100644 index 00000000..b3fba0ca --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/arrays/tst.uregsarray.d @@ -0,0 +1,51 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * Positive test to make sure that we can invoke common + * ureg[] aliases. + * + * SECTION: User Process Tracing/uregs Array + * + * NOTES: This test does no verification - the value of the output + * is not deterministic. + */ + +#pragma D option quiet + +BEGIN +{ + printf("R_PC = 0x%x\n", uregs[R_PC]); + printf("R_SP = 0x%x\n", uregs[R_SP]); + printf("R_R0 = 0x%x\n", uregs[R_R0]); + printf("R_R1 = 0x%x\n", uregs[R_R1]); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/err.D_OP_INCOMPAT.dupgtype.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/err.D_OP_INCOMPAT.dupgtype.d new file mode 100644 index 00000000..6c4d0251 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/err.D_OP_INCOMPAT.dupgtype.d @@ -0,0 +1,42 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Test assigning a variable two different incompatible types. This should + * result in a compile-time error. + * + * SECTION: Variables/Associative Arrays + * + */ + +BEGIN +{ + x[123] = `kmem_flags; + x[456] = *`rootvp; +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/err.D_OP_INCOMPAT.dupttype.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/err.D_OP_INCOMPAT.dupttype.d new file mode 100644 index 00000000..e1f17cbb --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/err.D_OP_INCOMPAT.dupttype.d @@ -0,0 +1,42 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Test assigning a variable two different incompatible types. This should + * result in a compile-time error. + * + * SECTION: Variables/Associative Arrays + * + */ + +BEGIN +{ + self->x[123] = `kmem_flags; + self->x[456] = *`rootvp; +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/err.D_OP_INCOMPAT.this.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/err.D_OP_INCOMPAT.this.d new file mode 100644 index 00000000..2af07ca5 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/err.D_OP_INCOMPAT.this.d @@ -0,0 +1,48 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * + * Declare 'this int' variable and assign inappropriate data type. + * + * SECTION: Variables/Associative Arrays + * + * + */ + +#pragma D option quiet + +this int x; + +BEGIN +{ + this->x = "dummy"; + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/err.D_PROTO_ARG.badsig.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/err.D_PROTO_ARG.badsig.d new file mode 100644 index 00000000..d682fc68 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/err.D_PROTO_ARG.badsig.d @@ -0,0 +1,46 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Test an associative array reference that is invalid because of a type + * signature mismatch -- this should produce a syntax error at compile time. + * + * SECTION: Variables/Associative Arrays + * + */ + +BEGIN +{ + x[123, "foo"] = timestamp; +} + +END +{ + x[123, 456] = timestamp; +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/err.D_PROTO_LEN.toofew.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/err.D_PROTO_LEN.toofew.d new file mode 100644 index 00000000..b4e82b85 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/err.D_PROTO_LEN.toofew.d @@ -0,0 +1,46 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Test an associative array reference that is invalid because of too few + * arguments -- this should produce a syntax error at compile time. + * + * SECTION: Variables/Associative Arrays + * + */ + +BEGIN +{ + x[123, 456] = timestamp; +} + +END +{ + x[123] = timestamp; +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/err.D_PROTO_LEN.toomany.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/err.D_PROTO_LEN.toomany.d new file mode 100644 index 00000000..3dc5f7dd --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/err.D_PROTO_LEN.toomany.d @@ -0,0 +1,46 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Test an associative array reference that is invalid because of too many + * arguments -- this should produce a syntax error at compile time. + * + * SECTION: Variables/Associative Arrays + * + */ + +BEGIN +{ + x[123, 456] = timestamp; +} + +END +{ + x[123, 456, 789] = timestamp; +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/err.D_SYNTAX.errassign.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/err.D_SYNTAX.errassign.d new file mode 100644 index 00000000..f31b66f1 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/err.D_SYNTAX.errassign.d @@ -0,0 +1,45 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * + * Assign one to 10 elements; make sure fails to compile. + * + * SECTION: Variables/Associative Arrays + * + */ + +BEGIN +{ + x[10]=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; +} + +END +{ +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/err.tupoflow.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/err.tupoflow.d new file mode 100644 index 00000000..81042026 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/err.tupoflow.d @@ -0,0 +1,41 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Generates an associative array reference that should overflow the tuple + * register stack. We should detect and report this at compile time. + * + * SECTION: Variables/Associative Arrays + * + */ + +BEGIN +{ + a[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] = 0; +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/tst.cpyarray.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/tst.cpyarray.d new file mode 100644 index 00000000..ca31cc35 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/tst.cpyarray.d @@ -0,0 +1,65 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * + * Copy value from associative arrays to local variables. + * + * SECTION: Variables/Associative Arrays + * + * + */ + +#pragma D option quiet + +this int x; + +BEGIN +{ + a["abc", 123] = 123; +} + +tick-10ms +{ + this->x = a["abc", 123]++; + printf("The value of x is %d\n", this->x); +} + +tick-10ms +{ + this->x = a["abc", 123]++; + printf("The value of x is %d\n", this->x); +} + +tick-10ms +{ + this->x = a["abc", 123]++; + printf("The value of x is %d\n", this->x); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/tst.diffprofile.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/tst.diffprofile.d new file mode 100644 index 00000000..ad5fb377 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/tst.diffprofile.d @@ -0,0 +1,62 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * + * To test Clause Local Variables ' this' across different profiles. + * + * SECTION: Variables/Associative Arrays + * + * + */ + +#pragma D option quiet + +this int x; +this char c; + +tick-10ms +{ + this->x = 123; + this->c = 'D'; + printf("The value of x is %d\n", this->x); +} + +tick-10ms +{ + this->x = 235; + printf("The value of x is %d\n", this->x); +} + +tick-10ms +{ + this->x = 456; + printf("The value of x is %d\n", this->x); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/tst.initialize.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/tst.initialize.d new file mode 100644 index 00000000..1ab222b1 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/tst.initialize.d @@ -0,0 +1,47 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * + * Clause local variables are not initialized to zero. + * + * SECTION: Variables/Associative Arrays + * + * + */ + +#pragma D option quiet + +this int x; + +BEGIN +{ + printf("the value of x is %d\n", this->x); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/tst.invalidref.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/tst.invalidref.d new file mode 100644 index 00000000..446acfad --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/tst.invalidref.d @@ -0,0 +1,75 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * Test to ensure that invalid stores to a global associative array + * are caught correctly. + */ + +#pragma D option quiet + +int last_cmds[int][4]; + +BEGIN +{ + errors = 0; + forward = 0; + backward = 0; +} + +tick-1s +/!forward/ +{ + forward = 1; + last_cmds[1][4] = 0xdeadbeef; +} + +tick-1s +/!backward/ +{ + backward = 1; + last_cmds[1][-5] = 0xdeadbeef; +} + +tick-1s +/errors > 1/ +{ + exit(0); +} + +tick-1s +/n++ > 5/ +{ + exit(1); +} + +ERROR +/arg4 == DTRACEFLT_BADADDR/ +{ + errors++; +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/tst.misc.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/tst.misc.d new file mode 100644 index 00000000..43147dec --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/tst.misc.d @@ -0,0 +1,69 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Test the different kinds of associative scalar references. + * + * SECTION: Variables/Associative Arrays + * + * NOTES: + * In particular, we test accessing a DTrace associative array + * defined with scalar type (first ref that forces creation as both global + * and TLS), and DTrace associative array scalar subsequent references + * (both global and TLS). + * + */ + +#pragma D option quiet + +BEGIN +{ + i = 0; +} + +tick-10ms +/i != 5/ +{ + x[123, "foo"] = 123; + self->x[456, "bar"] = 456; + i++; +} + +tick-10ms +/i != 5/ +{ + printf("x[] = %d\n", x[123, "foo"]); + printf("self->x[] = %d\n", self->x[456, "bar"]); +} + +tick-10ms +/i == 5/ +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/tst.orthogonality.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/tst.orthogonality.d new file mode 100644 index 00000000..f474a572 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/tst.orthogonality.d @@ -0,0 +1,51 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * This test confirms the orthogonality of associative arrays and thread-local + * variables by intentionally deriving a matching key signature (based on + * t_did). + */ +uint64_t b[uint64_t]; + +BEGIN +{ + self->a = 0xbad; +} + +BEGIN +/b[curthread->t_did] == 0/ +{ + exit(0); +} + +BEGIN +{ + printf("value should be 0; value is %x!", b[curthread->t_did]); + exit(1); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/tst.this.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/tst.this.d new file mode 100644 index 00000000..c4d01fa3 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/tst.this.d @@ -0,0 +1,49 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * + * To test Clause Local Variables ' this'. + * + * SECTION: Variables/Associative Arrays + * + * + */ + +#pragma D option quiet + +this int x; +this char c; + +BEGIN +{ + this->x = 123; + this->c = 'D'; + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/tst.valassign.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/tst.valassign.d.out new file mode 100644 index 00000000..948d82e9 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/assocs/tst.valassign.d.out @@ -0,0 +1,2 @@ +The value of i is 123 + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/begin/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/begin/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/begin/err.D_PDESC_ZERO.begin.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/begin/err.D_PDESC_ZERO.begin.d new file mode 100644 index 00000000..c2a60889 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/begin/err.D_PDESC_ZERO.begin.d @@ -0,0 +1,44 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Arguments to BEGIN provider not allowed. + * + * SECTION: dtrace Provider + * + */ + + +#pragma D option quiet + +BEGIN::read:entry +{ + printf("Begin fired first\n"); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/begin/err.D_PDESC_ZERO.tick.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/begin/err.D_PDESC_ZERO.tick.d new file mode 100644 index 00000000..44a363f8 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/begin/err.D_PDESC_ZERO.tick.d @@ -0,0 +1,45 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * concat of providers not allowed with BEGIN + * + * SECTION: dtrace Provider + * + */ + + +#pragma D option quiet + + +BEGIN:tick-1 +{ + printf("Begin fired first\n"); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/begin/tst.begin.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/begin/tst.begin.d new file mode 100644 index 00000000..43e7744e --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/begin/tst.begin.d @@ -0,0 +1,55 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Order of provider flow, Begin, tick profile, and END. + * + * SECTION: dtrace Provider + * + */ + + +#pragma D option quiet + +END +{ + printf("End fired after exit\n"); +} + +BEGIN +{ + printf("Begin fired first\n"); +} + +tick-1ms +{ + printf("tick fired second\n"); + printf("Call exit\n"); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/begin/tst.begin.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/begin/tst.begin.d.out new file mode 100644 index 00000000..a9d8ee1e --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/begin/tst.begin.d.out @@ -0,0 +1,5 @@ +Begin fired first +tick fired second +Call exit +End fired after exit + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/begin/tst.multibegin.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/begin/tst.multibegin.d new file mode 100644 index 00000000..3d5fd124 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/begin/tst.multibegin.d @@ -0,0 +1,60 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Multiple BEGIN providers + * + * SECTION: dtrace Provider + * + */ + + +#pragma D option quiet + +BEGIN +{ + printf("Begin fired first\n"); +} +BEGIN +{ + printf("Begin fired second\n"); +} +BEGIN +{ + printf("Begin fired third\n"); +} +BEGIN +{ + printf("Begin fired fourth\n"); +} +BEGIN +{ + printf("Begin fired fifth\n"); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/begin/tst.multibegin.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/begin/tst.multibegin.d.out new file mode 100644 index 00000000..e5bb9966 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/begin/tst.multibegin.d.out @@ -0,0 +1,6 @@ +Begin fired first +Begin fired second +Begin fired third +Begin fired fourth +Begin fired fifth + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/bitfields/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/bitfields/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/bitfields/err.D_ADDROF_BITFIELD.BitfieldAddress.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/bitfields/err.D_ADDROF_BITFIELD.BitfieldAddress.d new file mode 100644 index 00000000..9c5aca4c --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/bitfields/err.D_ADDROF_BITFIELD.BitfieldAddress.d @@ -0,0 +1,50 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: Cannot take the address of a bit-field member using the & + * operator. + * + * SECTION: Structs and Unions/Bit-Fields + */ + +#pragma D option quiet + +struct bitRecord{ + int a : 1; + int b : 3; + int c : 12; +} var; + +BEGIN +{ + printf("address of a: %d\naddress of b: %d\naddress of c: %dn", + &var.a, &var.b, &var.c); + + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/bitfields/err.D_DECL_BFCONST.NegBitField.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/bitfields/err.D_DECL_BFCONST.NegBitField.d new file mode 100644 index 00000000..acb296f4 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/bitfields/err.D_DECL_BFCONST.NegBitField.d @@ -0,0 +1,46 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: Bit-field width must be positive. + * + * SECTION: Structs and Unions/Bit-Fields + */ + +#pragma D option quiet + +struct bitRecord{ + int a : 1; + int b : -3; + int c : 12; +} var; + +BEGIN +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/bitfields/err.D_DECL_BFCONST.ZeroBitField.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/bitfields/err.D_DECL_BFCONST.ZeroBitField.d new file mode 100644 index 00000000..dfe24c59 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/bitfields/err.D_DECL_BFCONST.ZeroBitField.d @@ -0,0 +1,46 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: Bit-fields must be positive and non-zero. + * + * SECTION: Structs and Unions/Bit-Fields + */ + +#pragma D option quiet + +struct bitRecord{ + int a : 1; + int b : 0; + int c : 12; +} var; + +BEGIN +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/bitfields/err.D_DECL_BFSIZE.ExceedBaseType.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/bitfields/err.D_DECL_BFSIZE.ExceedBaseType.d new file mode 100644 index 00000000..d9abfd13 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/bitfields/err.D_DECL_BFSIZE.ExceedBaseType.d @@ -0,0 +1,53 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: Bit-field width must be of a number of bits not larger than + * that of the corresponding base type. + * + * SECTION: Structs and Unions/Bit-Fields + */ + +#pragma D option quiet + +struct bitRecord1{ + char a : 10; +} var1; + +struct bitRecord2{ + short a : 33; +} var2; + +struct bitRecord3{ + long long a : 65; +} var3; + +BEGIN +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/bitfields/err.D_DECL_BFSIZE.GreaterThan64.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/bitfields/err.D_DECL_BFSIZE.GreaterThan64.d new file mode 100644 index 00000000..c1e359ed --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/bitfields/err.D_DECL_BFSIZE.GreaterThan64.d @@ -0,0 +1,46 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: Bit-field width cannot be greater than 64 bits in D. + * + * SECTION: Structs and Unions/Bit-Fields + */ + +#pragma D option quiet + +struct bitRecord{ + int a : 1; + int b : 65; + int c : 12; +} var; + +BEGIN +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/bitfields/err.D_DECL_BFTYPE.badtype.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/bitfields/err.D_DECL_BFTYPE.badtype.d new file mode 100644 index 00000000..5e7b5233 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/bitfields/err.D_DECL_BFTYPE.badtype.d @@ -0,0 +1,47 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Non-integer types used for bitfields will result in a D_DECL_BFTYPE + * error. + * + * SECTION: Structs and Unions/Bit-Fields + */ + +#pragma D option quiet + +struct bits { + float : 1; +} xyz; + +BEGIN +{ + exit(1); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/bitfields/err.D_OFFSETOF_BITFIELD.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/bitfields/err.D_OFFSETOF_BITFIELD.d new file mode 100644 index 00000000..402a209d --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/bitfields/err.D_OFFSETOF_BITFIELD.d @@ -0,0 +1,53 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: Cannot apply offsetof operator to a bit-field member. + * + * SECTION: Structs and Unions/Bit-Fields + * + */ +#pragma D option quiet + +struct bitRecord{ + int a : 17; + int b : 3; + int c : 12; +} var; + +BEGIN +{ + printf("offsetof(struct bitRecord, a): %d\n", + offsetof(struct bitRecord, a)); + printf("offsetof(struct bitRecord, b): %d\n", + offsetof(struct bitRecord, b)); + printf("offsetof(struct bitRecord, c): %d\n", + offsetof(struct bitRecord, c)); + + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/bitfields/err.D_SIZEOF_BITFIELD.SizeofBitfield.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/bitfields/err.D_SIZEOF_BITFIELD.SizeofBitfield.d new file mode 100644 index 00000000..70c28340 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/bitfields/err.D_SIZEOF_BITFIELD.SizeofBitfield.d @@ -0,0 +1,49 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: Cannot apply sizeof operator to a bit-field member. + * + * SECTION: Structs and Unions/Bit-Fields + */ + +#pragma D option quiet + +struct bitRecord{ + int a : 1; + int b : 3; + int c : 12; +} var; + +BEGIN +{ + printf("sizeof (a): %d\nsizeof (b): %d\nsizeof (c): %n", + sizeof (var.a), sizeof (var.b), sizeof (var.c)); + + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/bitfields/tst.BitFieldPromotion.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/bitfields/tst.BitFieldPromotion.d new file mode 100644 index 00000000..07ec728b --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/bitfields/tst.BitFieldPromotion.d @@ -0,0 +1,60 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: Bit-field will be automatically promoted to the next largest + * integer type for use in any expression and then the value assigned will + * warp around the maximum number assignable to the data type. + * + * SECTION: Structs and Unions/Bit-Fields + */ + +#pragma D option quiet + +struct bitRecord{ + int a : 1; + int b : 15; + int c : 31; +} var; + +BEGIN +{ + var.a = 256; + var.b = 65536; + var.c = 4294967296; + + printf("bitRecord.a: %d\nbitRecord.b: %d\nbitRecord.c: %d\n", + var.a, var.b, var.c); + exit(0); +} + +END +/(0 != var.a) || (0 != var.b) || (0 != var.c)/ +{ + exit(1); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/bitfields/tst.SizeofBitField.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/bitfields/tst.SizeofBitField.d new file mode 100644 index 00000000..ce307de6 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/bitfields/tst.SizeofBitField.d @@ -0,0 +1,109 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: C and D compilers try to pack bits as efficiently as possible. + * + * SECTION: Structs and Unions/Bit-Fields + */ + +#pragma D option quiet + +struct bitRecord1 { + int a : 1; +} var1; + +struct bitRecord2 { + int a : 1; + int b : 3; +} var2; + +struct bitRecord3 { + int a : 1; + int b : 3; + int c : 3; +} var3; + +struct bitRecord4 { + int a : 1; + int b : 3; + int c : 3; + int d : 3; +} var4; + +struct bitRecord5 { + int c : 12; + int a : 10; + int b : 3; +} var5; + +struct bitRecord6 { + int a : 20; + int b : 3; + int c : 12; +} var6; + +struct bitRecord7 { + long c : 32; + long long d: 9; + int e: 1; +} var7; + +struct bitRecord8 { + char a : 2; + short b : 12; + long c : 32; +} var8; + +struct bitRecord12 { + int a : 30; + int b : 30; + int c : 32; +} var12; + +BEGIN +{ + printf("sizeof (bitRecord1): %d\n", sizeof (var1)); + printf("sizeof (bitRecord2): %d\n", sizeof (var2)); + printf("sizeof (bitRecord3): %d\n", sizeof (var3)); + printf("sizeof (bitRecord4): %d\n", sizeof (var4)); + printf("sizeof (bitRecord5): %d\n", sizeof (var5)); + printf("sizeof (bitRecord6): %d\n", sizeof (var6)); + printf("sizeof (bitRecord7): %d\n", sizeof (var7)); + printf("sizeof (bitRecord8): %d\n", sizeof (var8)); + printf("sizeof (bitRecord12): %d\n", sizeof (var12)); + exit(0); +} + +END +/(1 != sizeof (var1)) || (2 != sizeof (var2)) || (3 != sizeof (var3)) || + (4 != sizeof (var4)) || (5 != sizeof (var5)) || (6 != sizeof (var6)) + || (7 != sizeof (var7)) || (8 != sizeof (var8)) || (12 != sizeof (var12))/ +{ + exit(1); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/err.end.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/err.end.d new file mode 100644 index 00000000..a480d67a --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/err.end.d @@ -0,0 +1,54 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Checks that buffer space for an END enabling is always reserved in a + * fill buffer. This will fail because the size of the END enabling + * (64 bytes) exceeds the size of the buffer (32 bytes). + * + * SECTION: Buffers and Buffering/fill Policy; + * Buffers and Buffering/Buffer Sizes; + * Options and Tunables/bufpolicy; + * Options and Tunables/bufsize; + * Options and Tunables/strsize + */ + +#pragma D option bufpolicy=fill +#pragma D option bufsize=32 +#pragma D option strsize=64 + +BEGIN +{ + exit(0); +} + +END +{ + trace(execname); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/err.resize1.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/err.resize1.d new file mode 100644 index 00000000..4731bd1f --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/err.resize1.d @@ -0,0 +1,46 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Checks that setting "bufresize" to "manual" will cause buffer + * allocation to fail for large principal buffer sizes. + * + * SECTION: Buffers and Buffering/Buffer Resizing Policy; + * Options and Tunables/bufsize; + * Options and Tunables/bufresize + * + */ + +#pragma D option bufresize=manual +#pragma D option bufsize=100t + +BEGIN +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/err.resize2.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/err.resize2.d new file mode 100644 index 00000000..4dfe6b65 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/err.resize2.d @@ -0,0 +1,47 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Checks that setting "bufresize" to "manual" will cause buffer + * allocation to fail for large aggregation buffer sizes. + * + * SECTION: Buffers and Buffering/Buffer Resizing Policy; + * Options and Tunables/bufresize; + * Options and Tunables/aggsize + * + */ + +#pragma D option bufresize=manual +#pragma D option aggsize=100t + +BEGIN +{ + @a[probeprov] = count(); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/err.resize3.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/err.resize3.d new file mode 100644 index 00000000..866a56c6 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/err.resize3.d @@ -0,0 +1,62 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Checks that setting "bufresize" to "manual" will cause buffer + * allocation to fail for large speculative buffer sizes. + * + * SECTION: Buffers and Buffering/Buffer Resizing Policy; + * Options and Tunables/bufresize; + * Options and Tunables/specsize + * + */ + +#pragma D option bufresize=manual +#pragma D option specsize=100t + +BEGIN +{ + spec = speculation(); +} + +BEGIN +{ + speculate(spec); + trace(epid); +} + +BEGIN +{ + commit(spec); +} + +BEGIN +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/err.zerobuf.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/err.zerobuf.d new file mode 100644 index 00000000..a2e44350 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/err.zerobuf.d @@ -0,0 +1,43 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Test with a bufsize of 0 - should return an error. + * + * SECTION: + * Buffers and Buffering/Buffer Sizes; + * Options and Tunables/bufsize + */ + +#pragma D option bufsize=0 + +BEGIN +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.alignring.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.alignring.d new file mode 100644 index 00000000..152acb61 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.alignring.d @@ -0,0 +1,81 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Positive test for ring buffer policy. + * + * SECTION: Buffers and Buffering/ring Policy; + * Buffers and Buffering/Buffer Sizes; + * Options and Tunables/bufsize; + * Options and Tunables/bufpolicy + */ + +#pragma D option bufpolicy=ring +#pragma D option bufsize=4k + +profile:::profile-1009hz +{ + printf("%x %x\n", (int)0xaaaa, (int)0xbbbb); +} + +profile:::profile-1237hz +{ + printf("%x %x %x %x %x %x\n", + (int)0xcccc, + (int)0xdddd, + (int)0xeeee, + (int)0xffff, + (int)0xabab, + (int)0xacac); + printf("%x %x\n", + (uint64_t)0xaabbaabbaabbaabb, + (int)0xadad); +} + +profile:::profile-1789hz +{ + printf("%x %x %x %x %x\n", + (int)0xaeae, + (int)0xafaf, + (unsigned char)0xaa, + (int)0xbcbc, + (int)0xbdbd); +} + +profile-1543hz +{} + +profile-1361hz +{} + +tick-1sec +/i++ >= 10/ +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.cputime.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.cputime.ksh new file mode 100644 index 00000000..6ac0fa9e --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.cputime.ksh @@ -0,0 +1,90 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +#ident "%Z%%M% %I% %E% SMI" + +script() +{ + $dtrace -s /dev/stdin -x bufpolicy=$1 $1 <on = vtimestamp; + } + + sched:::off-cpu + /self->on/ + { + total += vtimestamp - self->on; + } + + tick-1sec + /i++ == 10/ + { + exit(0); + } + + END + /((total * 100) / (timestamp - start)) > thresh/ + { + printf("'%s' buffering policy took %d%% of CPU; ", + \$\$1, ((total * 100) / (timestamp - start))); + printf("expected no more than %d%%!\n", thresh); + exit(1); + } +EOF +} + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +for policy in "fill ring switch"; do + script $policy + + status=$? + + if [ "$status" -ne 0 ]; then + exit $status + fi +done + +exit 0 diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.dynvarsize.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.dynvarsize.d new file mode 100644 index 00000000..c8a07400 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.dynvarsize.d @@ -0,0 +1,67 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Positive test for dynamic variable size. + * + * SECTION: Buffers and Buffering/switch Policy; + * Buffers and Buffering/Buffer Sizes; + * Options and Tunables/bufsize; + * Options and Tunables/bufpolicy; + * Options and Tunables/switchrate + */ + +#pragma D option dynvarsize=100 +#pragma D option quiet + +int n; + +tick-10ms +/n++ < 100/ +{ + a[n] = 1; +} + +tick-10ms +/n == 100/ +{ + exit(2); +} + +END +/a[99]/ +{ + exit(1); +} + +END +/!a[99]/ +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.fill1.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.fill1.d new file mode 100644 index 00000000..143ed641 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.fill1.d @@ -0,0 +1,115 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Positive test for fill buffer policy. + * + * SECTION: Buffers and Buffering/fill Policy; + * Buffers and Buffering/Buffer Sizes; + * Options and Tunables/bufsize; + * Options and Tunables/bufpolicy; + * Options and Tunables/statusrate + */ +/* + * This is a brute-force way of testing fill buffers. We assume that each + * printf() stores 8 bytes. Because each fill buffer is per-CPU, we must + * fill up our buffer in one series of enablings on a single CPU. + */ +#pragma D option bufpolicy=fill +#pragma D option bufsize=64 +#pragma D option statusrate=10ms +#pragma D option quiet + +int i; + +tick-10ms +{ + printf("%d\n", i++); +} + +tick-10ms +{ + printf("%d\n", i++); +} + +tick-10ms +{ + printf("%d\n", i++); +} + +tick-10ms +{ + printf("%d\n", i++); +} + +tick-10ms +{ + printf("%d\n", i++); +} + +tick-10ms +{ + printf("%d\n", i++); +} + +tick-10ms +{ + printf("%d\n", i++); +} + +tick-10ms +{ + printf("%d\n", i++); +} + +tick-10ms +{ + printf("%d\n", i++); +} + +tick-10ms +{ + printf("%d\n", i++); +} + +tick-10ms +{ + printf("%d\n", i++); +} + +tick-10ms +{ + printf("%d\n", i++); +} + +tick-10ms +/i >= 100/ +{ + exit(1); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.fill1.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.fill1.d.out new file mode 100644 index 00000000..fd8abec1 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.fill1.d.out @@ -0,0 +1,9 @@ +0 +1 +2 +3 +4 +5 +6 +7 + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.resize1.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.resize1.d new file mode 100644 index 00000000..396a8081 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.resize1.d @@ -0,0 +1,51 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Checks that setting "bufresize" to "auto" will cause buffer + * allocation to succeed, even for large principal buffer sizes. + * + * SECTION: Buffers and Buffering/Buffer Resizing Policy; + * Options and Tunables/bufsize; + * Options and Tunables/bufresize + * + * NOTES: + * We use the undocumented "preallocate" option to make sure dtrace(1M) + * has enough space in its heap to allocate a buffer as large as the + * kernel's trace buffer. + */ + +#pragma D option preallocate=100t +#pragma D option bufresize=auto +#pragma D option bufsize=100t + +BEGIN +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.resize2.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.resize2.d new file mode 100644 index 00000000..50b814b1 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.resize2.d @@ -0,0 +1,52 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Checks that setting "bufresize" to "auto" will cause buffer + * allocation to succeed, even for large aggregation buffer sizes. + * + * SECTION: Buffers and Buffering/Buffer Resizing Policy; + * Options and Tunables/aggsize; + * Options and Tunables/bufresize + * + * NOTES: + * We use the undocumented "preallocate" option to make sure dtrace(1M) + * has enough space in its heap to allocate a buffer as large as the + * kernel's trace buffer. + */ + +#pragma D option preallocate=100t +#pragma D option bufresize=auto +#pragma D option aggsize=100t + +BEGIN +{ + @a[probeprov] = count(); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.resize3.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.resize3.d new file mode 100644 index 00000000..eb362fb3 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.resize3.d @@ -0,0 +1,73 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Checks that setting "bufresize" to "auto" will cause buffer + * allocation to succeed, even for large speculative buffer sizes. + * + * SECTION: Buffers and Buffering/Buffer Resizing Policy; + * Options and Tunables/specsize; + * Options and Tunables/bufresize + * + * NOTES: + * On some small memory machines, this test may consume so much memory + * that it induces memory allocation failure in the dtrace library. This + * will manifest itself as an error like one of the following: + * + * dtrace: processing aborted: Memory allocation failure + * dtrace: could not enable tracing: Memory allocation failure + * + * These actually indicate that the test performed as expected; failures + * of the above nature should therefore be ignored. + * + */ + +#pragma D option bufresize=auto +#pragma D option specsize=100t + +BEGIN +{ + spec = speculation(); +} + +BEGIN +{ + speculate(spec); + trace(epid); +} + +BEGIN +{ + commit(spec); +} + +BEGIN +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.ring1.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.ring1.d new file mode 100644 index 00000000..67e7b875 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.ring1.d @@ -0,0 +1,75 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Positive test for ring buffer policy. + * + * SECTION: Buffers and Buffering/ring Policy; + * Buffers and Buffering/Buffer Sizes; + * Options and Tunables/bufsize; + * Options and Tunables/bufpolicy; + * Options and Tunables/switchrate + */ + +/* + * We assume that a trace() of an integer stores at least 8 bytes. If ring + * buffering is not working properly, this trace() will induce a drop, and the + * counter won't be incremented. We set the switchrate to one second just to + * sure that a high switchrate doesn't mask broken ring buffers. + */ +#pragma D option bufpolicy=ring +#pragma D option bufsize=50 +#pragma D option switchrate=1sec + +int n; +int i; + +tick-10msec +/n < 300/ +{ + trace(i); + i++; +} + +tick-10msec +/n < 300/ +{ + n++; +} + +tick-10msec +/n == 300/ +{ + exit(2); +} + +END +{ + exit(i == 300 ? 0 : 1); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.ring2.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.ring2.d new file mode 100644 index 00000000..cbf48f2b --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.ring2.d @@ -0,0 +1,53 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Positive test for ring buffer policy. + * + * SECTION: Buffers and Buffering/ring Policy; + * SECTION: Buffers and Buffering/Buffer Sizes; + * Options and Tunables/bufsize; + * Options and Tunables/bufpolicy + */ + +#pragma D option bufpolicy=ring +#pragma D option bufsize=512k +#pragma D option quiet + +tick-1sec +/n < 5/ +{ + printf("%d\n", n++); +} + +tick-1sec +/n == 5/ +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.ring2.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.ring2.d.out new file mode 100644 index 00000000..cc4d41aa --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.ring2.d.out @@ -0,0 +1,6 @@ +0 +1 +2 +3 +4 + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.ring3.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.ring3.d new file mode 100644 index 00000000..68e35889 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.ring3.d @@ -0,0 +1,78 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Positive test for ring buffer policy. + * + * SECTION: Buffers and Buffering/ring Policy; + * Buffers and Buffering/Buffer Sizes; + * Options and Tunables/bufsize; + * Options and Tunables/bufpolicy + */ + +/* + * We make some regrettable assumptions about the implementation in this test. + * First, we assume that each entry for the printf() of an int takes _exactly_ + * eight bytes (four bytes for the EPID, four bytes for the payload). Second, + * we assume that by allocating storage for n + 1 records, we will get exactly + * n. Here is why: the final predicate that evaluates to false will reserve + * space that it won't use. This act of reservation will advance the wrapped + * offset. That record won't be subsequently used, but the wrapped offset has + * advanced. (And in this case, that old record is clobbered by the exit() + * anyway.) Thirdly: we rely on t_cpu/cpu_id. Finally: we rely on being + * able to run on the CPU that we first ran on. + */ +#pragma D option bufpolicy=ring +#pragma D option bufsize=40 +#pragma D option quiet + +int n; + +BEGIN +{ + cpuid = -1; +} + +tick-10msec +/cpuid == -1/ +{ + cpuid = curthread->t_cpu->cpu_id; +} + +tick-10msec +/curthread->t_cpu->cpu_id == cpuid && n < 100/ +{ + printf("%d\n", n++); +} + +tick-10msec +/n == 100/ +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.ring3.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.ring3.d.out new file mode 100644 index 00000000..99fd231e --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.ring3.d.out @@ -0,0 +1,5 @@ +96 +97 +98 +99 + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.smallring.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.smallring.d new file mode 100644 index 00000000..2134a0b7 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.smallring.d @@ -0,0 +1,57 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Positive test for ring buffer policy. + * + * SECTION: Buffers and Buffering/ring Policy; + * Buffers and Buffering/Buffer Sizes; + * Options and Tunables/bufsize; + * Options and Tunables/bufpolicy + */ + +#pragma D option bufpolicy=ring +#pragma D option bufsize=16 + +tick-10ms +{ + trace(0xbadbaddefec8d); +} + +tick-10ms +/0/ +{ + trace((int)1); +} + +tick-100ms +/i++ > 2/ +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.switch1.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.switch1.d new file mode 100644 index 00000000..2840feef --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.switch1.d @@ -0,0 +1,69 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Positive test for switch buffer policy. + * + * SECTION: Buffers and Buffering/switch Policy; + * Buffers and Buffering/Buffer Sizes; + * Options and Tunables/bufsize; + * Options and Tunables/bufpolicy; + * Options and Tunables/switchrate + */ + +/* + * We assume that a printf() of an integer stores at least 8 bytes, and no more + * than 16 bytes. + */ +#pragma D option bufpolicy=switch +#pragma D option bufsize=32 +#pragma D option switchrate=500msec +#pragma D option quiet + +int n; +int i; + +tick-1sec +/n < 10/ +{ + printf("%d\n", i); + i++; +} + +tick-1sec +/n < 10/ +{ + n++; +} + +tick-1sec +/n == 10/ +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.switch1.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.switch1.d.out new file mode 100644 index 00000000..ce6c2bcb --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/buffering/tst.switch1.d.out @@ -0,0 +1,11 @@ +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/err.D_XLATE_NOCONV.cpuusage.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/err.D_XLATE_NOCONV.cpuusage.d new file mode 100644 index 00000000..e1e0dd83 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/err.D_XLATE_NOCONV.cpuusage.d @@ -0,0 +1,42 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * print non assigned value and make sure it fails. + * + * SECTION: Variables/Built-in Variables + */ + +#pragma D option quiet + +BEGIN +{ + printf("The cpuusage = %d\n", curlwpsinfo->pr_cpu); + exit (0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/err.D_XLATE_NOCONV.nice.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/err.D_XLATE_NOCONV.nice.d new file mode 100644 index 00000000..c7a4ad21 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/err.D_XLATE_NOCONV.nice.d @@ -0,0 +1,45 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * print non assigned value and make sure it fails. + * + * SECTION: Variables/Built-in Variables + * + * + */ + +#pragma D option quiet + +BEGIN +{ + printf("The nice for cpu usage %c\n", curlwpsinfo->pr_nice); + exit (0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/err.D_XLATE_NOCONV.priority.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/err.D_XLATE_NOCONV.priority.d new file mode 100644 index 00000000..6ebb3dfa --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/err.D_XLATE_NOCONV.priority.d @@ -0,0 +1,43 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Print non assigned variables and make sure it fails. + * + * SECTION: Variables/Built-in Variables + */ + +#pragma D option quiet + +BEGIN +{ + printf("The low value is high priority field = %d\n", + curlwpsinfo->pr_nice); + exit (0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/err.D_XLATE_NOCONV.prsize.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/err.D_XLATE_NOCONV.prsize.d new file mode 100644 index 00000000..f467f192 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/err.D_XLATE_NOCONV.prsize.d @@ -0,0 +1,42 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * print non assigned variables and make sure it fails. + * + * SECTION: Variables/Built-in Variables + */ + +#pragma D option quiet + +BEGIN +{ + printf("Size of process image in kbytes = %ld\n", curpsinfo->pr_size); + exit (0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/err.D_XLATE_NOCONV.rssize.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/err.D_XLATE_NOCONV.rssize.d new file mode 100644 index 00000000..48057e14 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/err.D_XLATE_NOCONV.rssize.d @@ -0,0 +1,42 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * print non assigned variables and make sure it fails. + * + * SECTION: Variables/Built-in Variables + */ + +#pragma D option quiet + +BEGIN +{ + printf("Size of process image in kbytes = %ld\n", curpsinfo->pr_rssize); + exit (0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.arg0.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.arg0.d new file mode 100644 index 00000000..ec3c277f --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.arg0.d @@ -0,0 +1,42 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * print arg0 and make sure it succeeds. + * + * SECTION: Variables/Built-in Variables + */ + +#pragma D option quiet + +BEGIN +{ + printf("The argument is %u\n", arg0); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.arg0clause.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.arg0clause.d new file mode 100644 index 00000000..4c782f83 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.arg0clause.d @@ -0,0 +1,47 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * print arg0 from a profile and make sure it succeeds + * + * SECTION: Variables/Built-in Variables + */ + +#pragma D option quiet + +BEGIN +{ + printf("Call probe read\n"); +} + +syscall:::entry +{ + printf("The argument is %u", arg0); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.arg1.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.arg1.d new file mode 100644 index 00000000..993a3765 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.arg1.d @@ -0,0 +1,42 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * print arg1 and make sure it succeeds. + * + * SECTION: Variables/Built-in Variables + */ + +#pragma D option quiet + +BEGIN +{ + printf("The argument is %u\n", arg1); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.arg1to8.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.arg1to8.d new file mode 100644 index 00000000..b696d7c2 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.arg1to8.d @@ -0,0 +1,43 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * print arg1 to arg8 and make sure it succeeds. + * + * SECTION: Variables/Built-in Variables + */ + +#pragma D option quiet + +BEGIN +{ + printf("The argument is %u %u %u %u %u %u %u %u\n", arg1, arg2, + arg3, arg4, arg5, arg6, arg7, arg8); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.arg1to8clause.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.arg1to8clause.d new file mode 100644 index 00000000..fa62b03b --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.arg1to8clause.d @@ -0,0 +1,47 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * print arg1 to arg8 from a profile and make sure it succeeds + * + * SECTION: Variables/Built-in Variables + */ + +#pragma D option quiet + +BEGIN +{ +} + +syscall:::entry +{ + printf("The argument is %u %u %u %u %u %u %u %u\n", arg1, arg2, + arg3, arg4, arg5, arg6, arg7, arg8); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.caller.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.caller.d new file mode 100644 index 00000000..db1eabce --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.caller.d @@ -0,0 +1,42 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * print 'caller' and make sure it succeeds. + * + * SECTION: Variables/Built-in Variables + */ + +#pragma D option quiet + +BEGIN +{ + printf("The caller is %u\n", caller); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.caller1.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.caller1.d new file mode 100644 index 00000000..f1bfeedf --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.caller1.d @@ -0,0 +1,46 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * To print caller form profile and make sure it succeeds. + * + * SECTION: Variables/Built-in Variables + */ + +#pragma D option quiet + +BEGIN +{ +} + +tick-10ms +{ + printf("The caller is %u\n", caller); + exit (0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.epid.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.epid.d new file mode 100644 index 00000000..4f04c656 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.epid.d @@ -0,0 +1,46 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * To print 'epid'from profile and make sure it succeeds + * + * SECTION: Variables/Built-in Variables + */ + +#pragma D option quiet + +BEGIN +{ +} + +tick-10ms +{ + printf("epid of this probe = %d\n", epid); + exit (0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.epid1.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.epid1.d new file mode 100644 index 00000000..4cba65e6 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.epid1.d @@ -0,0 +1,43 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * print epid and make sure it succeeds. + * + * SECTION: Variables/Built-in Variables + */ + +#pragma D option quiet + +BEGIN +{ + printf("epid of this probe = %d\n", epid); + exit (0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.errno.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.errno.d new file mode 100644 index 00000000..4d7a4ffc --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.errno.d @@ -0,0 +1,47 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * To print errno from profile and make sure it succeeds. + * + * SECTION: Variables/Built-in Variables + */ + +#pragma D option quiet + +BEGIN +{ +} + +tick-10ms +{ + printf("epid of this probe = %d\n", epid); + printf("the errno = %d\n", errno); + exit (0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.errno1.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.errno1.d new file mode 100644 index 00000000..ed233bf0 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.errno1.d @@ -0,0 +1,43 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * To print errno and make sure it succeeds. + * + * SECTION: Variables/Built-in Variables + */ + +#pragma D option quiet + +BEGIN +{ + printf("epid of this probe = %d\n", epid); + printf("the errno = %d\n", errno); + exit (0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.execname.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.execname.d new file mode 100644 index 00000000..b3007de3 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.execname.d @@ -0,0 +1,49 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * To print execname and make sure it succeeds. + * + * SECTION: Variables/Built-in Variables + */ + +#pragma D option quiet + +BEGIN +/execname == "dtrace" || execname == "java"/ +{ + trace("execname matched"); + exit(0); +} + +BEGIN +{ + trace("execname didn't match"); + exit(1); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.hpriority.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.hpriority.d new file mode 100644 index 00000000..a0d88367 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.hpriority.d @@ -0,0 +1,42 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * To print hpriority and make sure it succeeds + * + * SECTION: Variables/Built-in Variables + */ + +#pragma D option quiet + +BEGIN +{ + printf("The high priority = %d\n", curlwpsinfo->pr_pri); + exit (0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.id.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.id.d new file mode 100644 index 00000000..291d91d9 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.id.d @@ -0,0 +1,46 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * To print 'id' from profile. + * + * SECTION: Variables/Built-in Variables + */ + +#pragma D option quiet + +BEGIN +{ +} + +tick-10ms +{ + printf("id of this probe = %d\n", id); + exit (0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.id1.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.id1.d new file mode 100644 index 00000000..068cff65 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.id1.d @@ -0,0 +1,42 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * To print id and make sure it succeeds. + * + * SECTION: Variables/Built-in Variables + */ + +#pragma D option quiet + +BEGIN +{ + printf("id of this probe = %d\n", id); + exit (0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.ipl.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.ipl.d new file mode 100644 index 00000000..2e6f349d --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.ipl.d @@ -0,0 +1,46 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * To print variable ipl + * + * SECTION: Variables/Built-in Variables + */ + +#pragma D option quiet + +BEGIN +{ +} + +tick-10ms +{ + printf("The interrupt priority level = %u\n", ipl); + exit (0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.ipl1.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.ipl1.d new file mode 100644 index 00000000..ef9278d1 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.ipl1.d @@ -0,0 +1,42 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * To print ipl and make sure it succeeds + * + * SECTION: Variables/Built-in Variables + */ + +#pragma D option quiet + +BEGIN +{ + printf("The interrupt priority level = %u\n", ipl); + exit (0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.lwpsinfo.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.lwpsinfo.d new file mode 100644 index 00000000..f0e9d460 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.lwpsinfo.d @@ -0,0 +1,55 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * To print lwpsinfo_t structure values. + * + * SECTION: Variables/Built-in Variables + */ + +#pragma D option quiet + +BEGIN +{ +} + +tick-10ms +{ + printf("The current thread's pr_flag is %d\n", curlwpsinfo->pr_flag); + printf("The current threads lwpid is %d\n", curlwpsinfo->pr_lwpid); + printf("The current thread's internal address is %u\n", + curlwpsinfo->pr_addr); + printf("The current thread's wait addr for sleeping lwp is %u\n", + curlwpsinfo->pr_wchan); + printf("The current lwp stat is %d\n", curlwpsinfo->pr_state); + printf("The printable character for pr_state %c\n", + curlwpsinfo->pr_sname); + printf("The syscall number = %d\n", curlwpsinfo->pr_syscall); + exit (0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.lwpsinfo1.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.lwpsinfo1.d new file mode 100644 index 00000000..aa11b07d --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.lwpsinfo1.d @@ -0,0 +1,51 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * To print lwpsinfo_t variables and make sure it succeeds + * + * SECTION: Variables/Built-in Variables + */ + +#pragma D option quiet + +BEGIN +{ + printf("The current thread's pr_flag is %d\n", curlwpsinfo->pr_flag); + printf("The current threads lwpid is %d\n", curlwpsinfo->pr_lwpid); + printf("The current thread's internal address is %u\n", + curlwpsinfo->pr_addr); + printf("The current thread's wait addr for sleeping lwp is %u\n", + curlwpsinfo->pr_wchan); + printf("The current lwp stat is %d\n", curlwpsinfo->pr_state); + printf("The printable character for pr_state %c\n", + curlwpsinfo->pr_sname); + printf("The syscall number = %d\n", curlwpsinfo->pr_syscall); + exit (0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.pid.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.pid.d new file mode 100644 index 00000000..2dd80d71 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.pid.d @@ -0,0 +1,46 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * To print 'pid' from profile. + * + * SECTION: Variables/Built-in Variables + */ + +#pragma D option quiet + +BEGIN +{ +} + +tick-10ms +{ + printf("process id = %d \n", pid); + exit (0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.pid1.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.pid1.d new file mode 100644 index 00000000..5cee07c5 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.pid1.d @@ -0,0 +1,42 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * To print 'pid' and make sure it succeeds. + * + * SECTION: Variables/Built-in Variables + */ + +#pragma D option quiet + +BEGIN +{ + printf("process id = %d \n", pid); + exit (0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.psinfo.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.psinfo.d new file mode 100644 index 00000000..c90f6e93 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.psinfo.d @@ -0,0 +1,55 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * To print psinfo structure values from profile. + * + * SECTION: Variables/Built-in Variables + */ + +#pragma D option quiet + +BEGIN +{ +} + +tick-10ms +{ + printf("number of lwps in process = %d\n", curpsinfo->pr_nlwp); + printf("unique process id = %d\n", curpsinfo->pr_pid); + printf("process id of parent = %d\n", curpsinfo->pr_ppid); + printf("pid of process group leader = %d\n", curpsinfo->pr_pgid); + printf("session id = %d\n", curpsinfo->pr_sid); + printf("real user id = %d\n", curpsinfo->pr_uid); + printf("effective user id = %d\n", curpsinfo->pr_euid); + printf("real group id = %d\n", curpsinfo->pr_gid); + printf("effective group id = %d\n", curpsinfo->pr_egid); + printf("address of process = %u\n", curpsinfo->pr_addr); + exit (0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.psinfo1.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.psinfo1.d new file mode 100644 index 00000000..098f38b6 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.psinfo1.d @@ -0,0 +1,51 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * To print psinfo structure values. + * + * SECTION: Variables/Built-in Variables + */ + +#pragma D option quiet + +BEGIN +{ + printf("number of lwps in process = %d\n", curpsinfo->pr_nlwp); + printf("unique process id = %d\n", curpsinfo->pr_pid); + printf("process id of parent = %d\n", curpsinfo->pr_ppid); + printf("pid of process group leader = %d\n", curpsinfo->pr_pgid); + printf("session id = %d\n", curpsinfo->pr_sid); + printf("real user id = %d\n", curpsinfo->pr_uid); + printf("effective user id = %d\n", curpsinfo->pr_euid); + printf("real group id = %d\n", curpsinfo->pr_gid); + printf("effective group id = %d\n", curpsinfo->pr_egid); + printf("address of process = %u\n", curpsinfo->pr_addr); + exit (0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.tid.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.tid.d new file mode 100644 index 00000000..1b16c8bb --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.tid.d @@ -0,0 +1,46 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * To print tid from profile + * + * SECTION: Variables/Built-in Variables + */ + +#pragma D option quiet + +BEGIN +{ +} + +tick-10ms +{ + printf("Thread id = %d \n", tid); + exit (0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.tid1.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.tid1.d new file mode 100644 index 00000000..a0567e70 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.tid1.d @@ -0,0 +1,43 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * To print tid and make sure it succeeds. + * + * SECTION: Variables/Built-in Variables + */ + +#pragma D option quiet + +BEGIN +{ + printf("Thread id = %d \n", tid); + exit (0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.timestamp.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.timestamp.d new file mode 100644 index 00000000..cd94eac8 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.timestamp.d @@ -0,0 +1,43 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * To print build-in variable 'timestamp' + * + * SECTION: Variables/Built-in Variables + */ + +#pragma D option quiet + +BEGIN +{ + self->t = timestamp; + printf("The difftime = %d\n", timestamp - self->t); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.vtimestamp.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.vtimestamp.d new file mode 100644 index 00000000..cdbecfc7 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/builtinvar/tst.vtimestamp.d @@ -0,0 +1,43 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * To print build-in variable 'vtimestamp' + * + * SECTION: Variables/Built-in Variables + */ + +#pragma D option quiet + +BEGIN +{ + self->t = vtimestamp; + printf("The difftime = %d\n", vtimestamp - self->t); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/clauses/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/clauses/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/clauses/err.D_IDENT_UNDEF.aggfun.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/clauses/err.D_IDENT_UNDEF.aggfun.d new file mode 100644 index 00000000..f6877174 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/clauses/err.D_IDENT_UNDEF.aggfun.d @@ -0,0 +1,40 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: Test a clause where an unknown identifier appears in a predicated + * clause inside an aggregating function. + * SECTION: Program Structure / Probe Clauses and Declarations + * + */ + +BEGIN +/1/ +{ + @a = max(x); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/clauses/err.D_IDENT_UNDEF.aggtup.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/clauses/err.D_IDENT_UNDEF.aggtup.d new file mode 100644 index 00000000..1fa49747 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/clauses/err.D_IDENT_UNDEF.aggtup.d @@ -0,0 +1,40 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: Test a clause where an unknown identifier appears in a predicated + * clause inside an aggregation tuple. + * SECTION: Program Structure / Probe Clauses and Declarations + * + */ + +BEGIN +/1/ +{ + @a[x] = count(); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/clauses/err.D_IDENT_UNDEF.arrtup.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/clauses/err.D_IDENT_UNDEF.arrtup.d new file mode 100644 index 00000000..6c1cdffb --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/clauses/err.D_IDENT_UNDEF.arrtup.d @@ -0,0 +1,40 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: Test a clause where an unknown identifier appears in a predicated + * clause inside an associate array tuple. + * SECTION: Program Structure / Probe Clauses and Declarations + * + */ + +BEGIN +/1/ +{ + a[x]++; +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/clauses/err.D_IDENT_UNDEF.body.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/clauses/err.D_IDENT_UNDEF.body.d new file mode 100644 index 00000000..da499cb5 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/clauses/err.D_IDENT_UNDEF.body.d @@ -0,0 +1,38 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: Test a clause where an unknown identifier appears in a clause. + * SECTION: Program Structure / Probe Clauses and Declarations + * + */ + +BEGIN +{ + exit(x); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/clauses/err.D_IDENT_UNDEF.both.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/clauses/err.D_IDENT_UNDEF.both.d new file mode 100644 index 00000000..00708273 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/clauses/err.D_IDENT_UNDEF.both.d @@ -0,0 +1,41 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: Test a clause where an unknown identifier appears in a predicate + * and in a clause body. + * + * SECTION: Program Structure / Probe Clauses and Declarations + * + */ + +BEGIN +/x != 0/ +{ + exit(x); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/clauses/err.D_IDENT_UNDEF.pred.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/clauses/err.D_IDENT_UNDEF.pred.d new file mode 100644 index 00000000..0bfc86f4 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/clauses/err.D_IDENT_UNDEF.pred.d @@ -0,0 +1,39 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: Test a clause where an unknown identifier appears in a predicate. + * SECTION: Program Structure / Probe Clauses and Declarations + * + */ + +BEGIN +/x != 0/ +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/clauses/tst.nopred.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/clauses/tst.nopred.d new file mode 100644 index 00000000..44d11675 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/clauses/tst.nopred.d @@ -0,0 +1,38 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: Test a clause that has a body but no predicate. + * SECTION: Program Structure / Probe Clauses and Declarations + * + */ + +BEGIN +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/clauses/tst.pred.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/clauses/tst.pred.d new file mode 100644 index 00000000..43bfedd8 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/clauses/tst.pred.d @@ -0,0 +1,39 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: Test a clause that has a body and a predicate. + * SECTION: Program Structure / Probe Clauses and Declarations + * + */ + +BEGIN +/$pid != 0/ +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/clauses/tst.predfirst.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/clauses/tst.predfirst.d new file mode 100644 index 00000000..c7f0b4eb --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/clauses/tst.predfirst.d @@ -0,0 +1,41 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: Test a clause that has a body and a predicate where the + * predicate must be cooked first because it creates a variable. + * + * SECTION: Program Structure / Probe Clauses and Declarations + * + */ + +BEGIN +/x++ == 0/ +{ + exit(x - 1); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/clauses/tst.predlast.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/clauses/tst.predlast.d new file mode 100644 index 00000000..9ed904f7 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/clauses/tst.predlast.d @@ -0,0 +1,42 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: Test a clause that has a body and a predicate where the + * predicate must be cooked last because the clause creates + * a variable which is referenced in the predicate. + * + * SECTION: Program Structure / Probe Clauses and Declarations + * + */ + +BEGIN +/x == 0/ +{ + exit(x++); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/cpc/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/cpc/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/cpc/err.D_PDESC_ZERO.lowfrequency.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/cpc/err.D_PDESC_ZERO.lowfrequency.d new file mode 100644 index 00000000..1015a251 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/cpc/err.D_PDESC_ZERO.lowfrequency.d @@ -0,0 +1,45 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +/* + * Test to check that attempting to enable a valid event with a frequency + * lower than the default platform limit will fail. + * + * This test will fail if: + * 1) The system under test does not define the 'PAPI_tot_ins' event. + * 2) The 'dcpc-min-overflow' variable in dcpc.conf has been modified. + */ + +#pragma D option quiet + +BEGIN +{ + exit(0); +} + +cpc:::PAPI_tot_ins-all-100 +{ +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/cpc/err.D_PDESC_ZERO.malformedoverflow.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/cpc/err.D_PDESC_ZERO.malformedoverflow.d new file mode 100644 index 00000000..f9b78094 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/cpc/err.D_PDESC_ZERO.malformedoverflow.d @@ -0,0 +1,40 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +/* + * Tests that specifying an overflow value containing extraneous characters + * (only digits are allowed) will fail. + */ + +BEGIN +{ + exit(0); +} + +cpc:::PAPI_tot_ins-all-10000bonehead +{ + @[probename] = count(); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/cpc/err.D_PDESC_ZERO.nonexistentevent.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/cpc/err.D_PDESC_ZERO.nonexistentevent.d new file mode 100644 index 00000000..73f9575f --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/cpc/err.D_PDESC_ZERO.nonexistentevent.d @@ -0,0 +1,40 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +/* + * Tests that attempting to enable a probe containing a non existent event + * will fail. + */ + +BEGIN +{ + exit(0); +} + +cpc:::PAPI_cpc_bad-all-10000 +{ + @[probename] = count(); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/cpc/err.cpcvscpustatpart1.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/cpc/err.cpcvscpustatpart1.ksh new file mode 100755 index 00000000..767d493a --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/cpc/err.cpcvscpustatpart1.ksh @@ -0,0 +1,78 @@ +#!/bin/ksh +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2009 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + + +# +# This tests that cpustat(1) should fail to start if the cpc provider +# is already calling the shots. +# +# This script will fail if: +# 1) The system under test does not define the 'PAPI_tot_ins' +# generic event. + +script() +{ + $dtrace -o $dtraceout -s /dev/stdin <' + exit 2 +fi + +dtrace=$1 +dtraceout=/tmp/dtrace.out.$$ +script 2>/dev/null & +timeout=15 + +# +# Sleep while the above script fires into life. To guard against dtrace dying +# and us sleeping forever we allow 15 secs for this to happen. This should be +# enough for even the slowest systems. +# +while [ ! -f $dtraceout ]; do + sleep 1 + timeout=$(($timeout-1)) + if [ $timeout -eq 0 ]; then + echo "dtrace failed to start. Exiting." + exit 1 + fi +done + +cpustat -c PAPI_tot_ins 1 5 +status=$? + +rm $dtraceout + +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/cpc/err.cpcvscpustatpart2.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/cpc/err.cpcvscpustatpart2.ksh new file mode 100755 index 00000000..584469c3 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/cpc/err.cpcvscpustatpart2.ksh @@ -0,0 +1,70 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2009 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + + +# +# This tests that enablings from the cpc provider will fail if cpustat(1) is +# already master of the universe. +# +# This script will fail if: +# 1) The system under test does not define the 'PAPI_tot_ins' +# generic event. + +script() +{ + $dtrace -s /dev/stdin <' + exit 2 +fi + +dtrace=$1 +dtraceout=/tmp/dtrace.out.$$ + +cpustat -c PAPI_tot_ins 1 20 & +pid=$! +sleep 5 +script 2>/dev/null + +status=$? + +kill $pid +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/cpc/err.cputrackfailtostart.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/cpc/err.cputrackfailtostart.ksh new file mode 100755 index 00000000..f62b83d5 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/cpc/err.cputrackfailtostart.ksh @@ -0,0 +1,77 @@ +#!/bin/ksh +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2009 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. + +# +# This script ensures that cputrack(1M) will fail to start when the cpc +# provider has active enablings. +# +# The script will fail if: +# 1) The system under test does not define the 'PAPI_tot_ins' event. +# + +script() +{ + $dtrace -o $dtraceout -s /dev/stdin <' + exit 2 +fi + +dtrace=$1 +dtraceout=/tmp/dtrace.out.$$ +script 2>/dev/null & +timeout=15 + +# +# Sleep while the above script fires into life. To guard against dtrace dying +# and us sleeping forever we allow 15 secs for this to happen. This should be +# enough for even the slowest systems. +# +while [ ! -f $dtraceout ]; do + sleep 1 + timeout=$(($timeout-1)) + if [ $timeout -eq 0 ]; then + echo "dtrace failed to start. Exiting." + exit 1 + fi +done + +cputrack -c PAPI_tot_ins sleep 10 +status=$? + +rm $dtraceout + +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/cpc/err.cputrackterminates.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/cpc/err.cputrackterminates.ksh new file mode 100755 index 00000000..58d1e798 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/cpc/err.cputrackterminates.ksh @@ -0,0 +1,70 @@ +#!/bin/ksh +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2009 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. + +# +# This script ensures that cputrack(1) will terminate when the cpc provider +# kicks into life. +# +# The script will fail if: +# 1) The system under test does not define the 'PAPI_tot_ins' event. +# + +script() +{ + $dtrace -s /dev/stdin < 10/ + { + exit(0); + } +EOF +} + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +cputrack -c PAPI_tot_ins sleep 20 & +cputrack_pid=$! +sleep 5 +script 2>/dev/null & + +wait $cputrack_pid +status=$? + +rm $dtraceout + +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/cpc/err.toomanyenablings.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/cpc/err.toomanyenablings.d new file mode 100644 index 00000000..a50bd71a --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/cpc/err.toomanyenablings.d @@ -0,0 +1,55 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +/* + * Test to check that attempting to enable too many probes will fail. + * + * This test will fail if: + * 1) We ever execute on a platform which is capable of programming 10 + * 'PAPI_tot_ins' events simultaneously (which no current platforms are + * capable of doing). + * 2) The system under test does not define the 'PAPI_tot_ins' event. + */ + +#pragma D option quiet + +BEGIN +{ + exit(0); +} + +cpc:::PAPI_tot_ins-all-10000, +cpc:::PAPI_tot_ins-all-10001, +cpc:::PAPI_tot_ins-all-10002, +cpc:::PAPI_tot_ins-all-10003, +cpc:::PAPI_tot_ins-all-10004, +cpc:::PAPI_tot_ins-all-10005, +cpc:::PAPI_tot_ins-all-10006, +cpc:::PAPI_tot_ins-all-10007, +cpc:::PAPI_tot_ins-all-10008, +cpc:::PAPI_tot_ins-all-10009 +{ +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/cpc/tst.allcpus.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/cpc/tst.allcpus.ksh new file mode 100755 index 00000000..7f026c9e --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/cpc/tst.allcpus.ksh @@ -0,0 +1,107 @@ +#!/bin/ksh +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2009 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +# +# This script verifies that we can fire a probe on each CPU that is in +# an online state. +# +# The script will fail if: +# 1) The system under test does not define the 'PAPI_tot_ins' event. +# + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 +numproc=`psrinfo | tail -1 | cut -f1` +cpu=0 +dtraceout=/var/tmp/dtrace.out.$$ +scriptout=/var/tmp/script.out.$$ + +spin() +{ + while [ 1 ]; do + : + done +} + +script() +{ + $dtrace -o $dtraceout -s /dev/stdin < 10/ + { + printa(@a); + exit(0); + } +EOF +} + +echo "" > $scriptout +while [ $cpu -le $numproc ] +do + if [ "`psrinfo -s $cpu 2> /dev/null`" -eq 1 ]; then + printf "%9d %16d\n" $cpu 1 >> $scriptout + spin & + allpids[$cpu]=$! + pbind -b $cpu $! + fi + cpu=$(($cpu+1)) +done +echo "" >> $scriptout + +script + +diff $dtraceout $scriptout >/dev/null 2>&1 +status=$? + +# kill off the spinner processes +cpu=0 +while [ $cpu -le $numproc ] +do + if [ "`psrinfo -s $cpu 2> /dev/null`" -eq 1 ]; then + kill ${allpids[$cpu]} + fi + cpu=$(($cpu+1)) +done + +rm $dtraceout +rm $scriptout + +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/cpc/tst.genericevent.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/cpc/tst.genericevent.d new file mode 100644 index 00000000..7ebf844e --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/cpc/tst.genericevent.d @@ -0,0 +1,48 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +/* + * Test that we can successfully enable a probe using a generic event. + * Currently, all platforms implement 'PAPI_tot_ins' so we'll use that. + * Note that this test will fail if the system under test does not + * implement that event. + * + * This test will fail if: + * 1) The system under test does not define the 'PAPI_tot_ins' event. + */ + +#pragma D option quiet +#pragma D option bufsize=128k + +cpc:::PAPI_tot_ins-all-10000 +{ + @[probename] = count(); +} + +tick-1s +/n++ > 10/ +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/cpc/tst.platformevent.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/cpc/tst.platformevent.ksh new file mode 100755 index 00000000..96d1ab8c --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/cpc/tst.platformevent.ksh @@ -0,0 +1,81 @@ +#!/bin/ksh +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2009 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +# +# This script ensures that we can enable a probe which specifies a platform +# specific event. +# + +if [ $# != 1 ]; then + print -u2 "expected one argument: " + exit 2 +fi + +dtrace=$1 + +get_event() +{ + perl /dev/stdin /dev/stdout << EOF + open CPUSTAT, '/usr/sbin/cpustat -h |' + or die "Couldn't run cpustat: \$!\n"; + while () { + if (/(\s+)event\[*[0-9]-*[0-9]*\]*:/ && !/PAPI/) { + @a = split(/ /, \$_); + \$event = \$a[\$#a-1]; + } + } + + close CPUSTAT; + print "\$event\n"; +EOF +} + +script() +{ + $dtrace -s /dev/stdin << EOD + #pragma D option quiet + #pragma D option bufsize=128k + + cpc:::$1-all-10000 + { + @[probename] = count(); + } + + tick-1s + /n++ > 5/ + { + exit(0); + } +EOD +} + +event=$(get_event) +script $event + +status=$? + +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/err.D_DECL_LOCASSC.NonLocalAssoc.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/err.D_DECL_LOCASSC.NonLocalAssoc.d new file mode 100644 index 00000000..4c8ee508 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/err.D_DECL_LOCASSC.NonLocalAssoc.d @@ -0,0 +1,49 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * associative arrays may not be declared as local variables + * + * SECTION: Errtags/D_DECL_LOCASSC + * + */ + +#pragma D option quiet + +this int a[int]; + +BEGIN +{ + exit(0); +} + +ERROR +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/err.D_DECL_LONGINT.LongStruct.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/err.D_DECL_LONGINT.LongStruct.d new file mode 100644 index 00000000..2c92bfdb --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/err.D_DECL_LONGINT.LongStruct.d @@ -0,0 +1,52 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * long and long long may only be used with integer or floating-point type + * + * SECTION: Errtags/D_DECL_LONGINT + * + */ + +#pragma D option quiet + +long struct mystruct +{ + int i; +}; + +BEGIN +{ + exit(0); +} + +ERROR +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/err.D_DECL_PARMCLASS.BadStorageClass.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/err.D_DECL_PARMCLASS.BadStorageClass.d new file mode 100644 index 00000000..8278747e --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/err.D_DECL_PARMCLASS.BadStorageClass.d @@ -0,0 +1,51 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * inappropriate storage class for function or associative array parameter + * throws a D_DECL_PARMCLASS + * + * SECTION: Errtags/D_DECL_PARMCLASS + * + */ + +#pragma D option quiet + + +int foo(static int); + +BEGIN +{ + exit(0); +} + +ERROR +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/err.D_DECL_PROTO_NAME.VoidName.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/err.D_DECL_PROTO_NAME.VoidName.d new file mode 100644 index 00000000..3676c21c --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/err.D_DECL_PROTO_NAME.VoidName.d @@ -0,0 +1,40 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * Assert that a void parameter in a declaration where void is permitted + * may not have a parameter formal name associated with it. + */ + +int a(void v); + +BEGIN, +ERROR +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/err.D_DECL_PROTO_TYPE.Dyn.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/err.D_DECL_PROTO_TYPE.Dyn.d new file mode 100644 index 00000000..aecf5499 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/err.D_DECL_PROTO_TYPE.Dyn.d @@ -0,0 +1,40 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * Assert that a function parameter in a declaration may not use a dynamic + * DTrace type such as an associative array type. + */ + +int a(int a[int]); + +BEGIN, +ERROR +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/err.D_DECL_PROTO_VARARGS.VarLenArgs.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/err.D_DECL_PROTO_VARARGS.VarLenArgs.d new file mode 100644 index 00000000..22dbbe9b --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/err.D_DECL_PROTO_VARARGS.VarLenArgs.d @@ -0,0 +1,50 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * array tuples may not use variable-length argument lists + * + * SECTION: Errtags/ D_DECL_ARRVA + * + */ + +#pragma D option quiet + + +int a[...]; + +BEGIN +{ + exit(0); +} + +ERROR +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/err.D_DECL_PROTO_VOID.NonSoleVoid.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/err.D_DECL_PROTO_VOID.NonSoleVoid.d new file mode 100644 index 00000000..620f0d7c --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/err.D_DECL_PROTO_VOID.NonSoleVoid.d @@ -0,0 +1,49 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * void must be sole parameter in a function declaration. + * + * SECTION: Errtags/D_DECL_FUNCVOID + * + */ + +#pragma D option quiet + +int foo(int, void); + +BEGIN +{ + exit(0); +} + +ERROR +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/err.D_DECL_SIGNINT.UnsignedStruct.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/err.D_DECL_SIGNINT.UnsignedStruct.d new file mode 100644 index 00000000..db2e4510 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/err.D_DECL_SIGNINT.UnsignedStruct.d @@ -0,0 +1,52 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * signed and unsigned may only be used with integer type + * + * SECTION: Errtags/D_DECL_SIGNINT + * + */ + +#pragma D option quiet + +/*DSTYLED*/ +unsigned struct mystruct { + int i; +}; + +BEGIN +{ + exit(0); +} + +ERROR +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/err.D_DECL_VOIDATTR.ShortVoidDecl.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/err.D_DECL_VOIDATTR.ShortVoidDecl.d new file mode 100644 index 00000000..81f90814 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/err.D_DECL_VOIDATTR.ShortVoidDecl.d @@ -0,0 +1,49 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Attributes may not be used with void type. + * + * SECTION: Errtags/D_DECL_VOIDATTR + * + */ + +#pragma D option quiet + +short void ptr; + +BEGIN +{ + exit(0); +} + +ERROR +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/tst.arrays.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/tst.arrays.d new file mode 100644 index 00000000..34ddd5fc --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/tst.arrays.d @@ -0,0 +1,51 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * Test various kinds of array declarations. + * + * SECTION: Program Structure/Probe Clauses and Declarations + * + */ + +extern int a1[]; + +extern int a2[1]; + +extern int a3[123][456]; + +extern int a4[123][456][789]; + +extern int a5[5], a6[6][6], a7[7][7][7]; + +BEGIN +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/tst.basics.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/tst.basics.d new file mode 100644 index 00000000..4c1483e2 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/tst.basics.d @@ -0,0 +1,67 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * Test a variety of extern declarations that exercise the different + * kinds of declarations that we can process. + * + * SECTION: Program Structure/Probe Clauses and Declarations + * + */ + +extern void *e1; +extern char e2; +extern signed char e3; +extern unsigned char e4; +extern short e5; +extern signed short e6; +extern unsigned short e7; +extern int e8; +extern e9; +extern signed int e10; +extern unsigned int e11; +extern long e12; +extern signed long e13; +extern unsigned long e14; +extern long long e15; +extern signed long long e16; +extern unsigned long long e17; +extern float e18; +extern double e19; +extern long double e20; +extern vnode_t e21; +extern struct vnode e22; +extern union sigval e23; +extern enum uio_rw e24; + +BEGIN +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/tst.funcs.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/tst.funcs.d new file mode 100644 index 00000000..3b691eb2 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/tst.funcs.d @@ -0,0 +1,49 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * Test various kinds of function declarations. + * + * SECTION: Program Structure/Probe Clauses and Declarations + */ + +extern int getint(void); +extern int *getptr(void); +extern int *(*funcptr)(void); +extern int **(**funcptrptr)(void); + +extern int noparms(); +extern int oneparm(int); +extern int twoparms(int, int); + +BEGIN +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/tst.pointers.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/tst.pointers.d new file mode 100644 index 00000000..d0ab6087 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/tst.pointers.d @@ -0,0 +1,43 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * Test multiple extern declarations in a single list which build + * up a chain of pointers to pointers to pointers ... + * + * SECTION: Program Structure/Probe Clauses and Declarations + */ + +extern int e0, *e1, **e2, ***e3, ****e4, *****e5; + +BEGIN +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/tst.varargsfuncs.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/tst.varargsfuncs.d new file mode 100644 index 00000000..c12363fb --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/decls/tst.varargsfuncs.d @@ -0,0 +1,45 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * Test functions declarations with varargs + * + * SECTION: Program Structure/Probe Clauses and Declarations + */ + +#pragma D option quiet + +extern int varargs1(...); +extern int varargs2(int, ...); + +BEGIN +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/badptr.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/badptr.d new file mode 100644 index 00000000..c48c7294 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/badptr.d @@ -0,0 +1,42 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Verify doc example 5-1 + * + * SECTION: + * DocExamples/badptr + */ + +BEGIN +{ + x = (int *)NULL; + y = *x; + trace(y); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/countdown.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/countdown.d new file mode 100644 index 00000000..56b98815 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/countdown.d @@ -0,0 +1,53 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Verify doc example + * + * SECTION: + * DocExamples/other + */ + +dtrace:::BEGIN +{ + i = 10; +} + +profile:::tick-1sec +/i > 0/ +{ + trace(i--); +} + +profile:::tick-1000 +/i == 0/ +{ + trace("blastoff!"); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/counter.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/counter.d new file mode 100644 index 00000000..8b7b1b3b --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/counter.d @@ -0,0 +1,52 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Verify doc + * + * SECTION: + * DocExamples/other + */ + + +dtrace:::BEGIN +{ + i = 0; +} + +profile:::tick-1sec +{ + i = i + 1; + trace(i); +} + +dtrace:::END +{ + trace(i); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/errorpath.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/errorpath.d new file mode 100644 index 00000000..76fd07c2 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/errorpath.d @@ -0,0 +1,47 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Verify doc example 17-1 + * + * SECTION: + * DocExamples/errorpath + */ + + +BEGIN +{ + *(char *)NULL; +} + +ERROR +{ + printf("Hit an error!"); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/hello.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/hello.d new file mode 100644 index 00000000..8e1ef8f7 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/hello.d @@ -0,0 +1,42 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Verify doc example 1-1 + * + * SECTION: + * DocExamples/hello + */ + + +BEGIN +{ + trace("hello, world"); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/kstat.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/kstat.d new file mode 100644 index 00000000..49871497 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/kstat.d @@ -0,0 +1,57 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Verify doc example 7-3 + * + * SECTION: + * DocExamples/kstat + */ + + +#pragma D option quiet + +pid$1:libkstat:kstat_data_lookup:entry +{ + self->ksname = arg1; +} + +pid$1:libkstat:kstat_data_lookup:return +/self->ksname != NULL && arg1 != NULL/ +{ + this->str = copyinstr(self->ksname); + this->ksp = (kstat_named_t *)copyin(arg1, sizeof (kstat_named_t)); + printf("%s has ui64 value %u\n", this->str, this->ksp->value.ui64); +} + +pid$1:libkstat:kstat_data_lookup:return +/self->ksname != NULL && arg1 == NULL/ +{ + self->ksname = NULL; +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/ksyms.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/ksyms.d new file mode 100644 index 00000000..932262b0 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/ksyms.d @@ -0,0 +1,63 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Verify doc example 7-2 + * + * SECTION: + * DocExamples/ksyms + */ + + +/* Must run "strings -a /dev/ksyms in another shell on the system */ + + +#pragma D option quiet + +syscall::read:entry +/curpsinfo->pr_psargs == "strings -a /dev/ksyms"/ +{ + printf("read %u bytes to user address %x\n", arg2, arg1); + self->watched = 1; +} + +syscall::read:return +/self->watched/ +{ + self->watched = 0; +} + +fbt::uiomove:entry +/self->watched/ +{ + this->iov = args[3]->uio_iov; + + printf("uiomove %u bytes to %p in pid %d\n", this->iov->iov_len, + this->iov->iov_base, pid); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/renormalize.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/renormalize.d new file mode 100644 index 00000000..7d2c6af7 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/renormalize.d @@ -0,0 +1,55 @@ + +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * Verify doc example 9-1 + * + * SECTION: + * DocExamples/renormalize + */ + +#pragma D option quiet + +BEGIN +{ + start = timestamp; +} + +syscall:::entry +{ + @func[execname] = count(); +} + +tick-10sec +{ + normalize(@func, (timestamp - start) / 1000000000); + printa(@func); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/rtime.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/rtime.d new file mode 100644 index 00000000..087e8193 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/rtime.d @@ -0,0 +1,50 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Verify doc example 3-1 + * + * SECTION: + * DocExamples/rtime + */ + + +#pragma D option quiet + +syscall::read:entry +{ + self->t = timestamp; +} + +syscall::read:return +/self->t != 0/ +{ + printf("%d/%d spent %d nsecs in read(2)\n", pid, + tid, timestamp - self->t); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/rw.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/rw.d new file mode 100644 index 00000000..6358a7dc --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/rw.d @@ -0,0 +1,42 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Verify doc example + * + * SECTION: + * DocExamples/other + */ + + +syscall::read:entry, +syscall::write:entry +/pid == 102429/ +{ +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/rwinfo.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/rwinfo.d new file mode 100644 index 00000000..60f2b12a --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/rwinfo.d @@ -0,0 +1,74 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Verify doc example 7-1 + * + * SECTION: + * DocExamples/rwinfo + */ + + +#pragma D option quiet + +struct callinfo { + uint64_t ts; + uint64_t elapsed; + uint64_t calls; + size_t maxbytes; +}; + +struct callinfo i[string]; + +syscall::read:entry, +syscall::write:entry +/pid == 100551/ +{ + i[probefunc].ts = timestamp; + i[probefunc].calls++; + i[probefunc].maxbytes = arg2 > i[probefunc].maxbytes ? + arg2 : i[probefunc].maxbytes; +} + +syscall::read:return, +syscall::write:return +/i[probefunc].ts != 0 && pid == 100551/ +{ + i[probefunc].elapsed += timestamp - i[probefunc].ts; +} + +END +{ + printf(" calls max bytes elapsed nsecs\n"); + printf("----- ----- --------- -------------\n"); + printf(" read %5d %9d %d\n", i["read"].calls, + i["read"].maxbytes, i["read"].elapsed); + printf(" write %5d %9d %d\n", i["write"].calls, + i["write"].maxbytes, i["write"].elapsed); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/rwtime.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/rwtime.d new file mode 100644 index 00000000..2edffb90 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/rwtime.d @@ -0,0 +1,50 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Verify doc example 7-1 + * + * SECTION: + * DocExamples/rwinfo + */ + + +syscall::read:entry, +syscall::write:entry +/pid == 100551/ +{ + ts[probefunc] = timestamp; +} + +syscall::read:return, +syscall::write:return +/(ts[probefunc] != 0) && (pid == 100551)/ +{ + printf("%d nsecs\n", timestamp - ts[probefunc]); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/specopen.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/specopen.d new file mode 100755 index 00000000..dff3e622 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/specopen.d @@ -0,0 +1,79 @@ +#!/usr/sbin/dtrace -Fs + + +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Verify doc example 13-1 + * + * SECTION: + * DocExamples/specopen + */ + +syscall::open:entry, +syscall::open64:entry +{ + self->spec = speculation(); + speculate(self->spec); + + printf("%s", stringof(copyinstr(arg0))); +} + +fbt::: +/self->spec/ +{ + speculate(self->spec); +} + +syscall::open:return, +syscall::open64:return +/self->spec/ +{ + speculate(self->spec); + trace(errno); +} + +syscall::open:return, +syscall::open64:return +/self->spec && errno != 0/ +{ + commit(self->spec); + self->spec = 0; +} + +syscall::open:return, +syscall::open64:return +/self->spec && errno == 0/ +{ + discard(self->spec); + self->spec = 0; +} + + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/truss.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/truss.d new file mode 100644 index 00000000..b7925205 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/truss.d @@ -0,0 +1,55 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Verify doc + * + * SECTION: + * DocExamples/truss + */ + + + +dtrace:::BEGIN +{ + var = 30; + self->vaa = 24; +} + +syscall::read:entry +/pid == 102473/ +{ + printf("var: %d, self->vaa: %d", var++, self->vaa++); +} + +syscall::write:entry +/pid == 102473/ +{ + printf("var: %d, self->vaa: %d", var++, self->vaa++); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/trussrw.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/trussrw.d new file mode 100644 index 00000000..9eb9bced --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/trussrw.d @@ -0,0 +1,52 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Verify doc example 1-2 + * + * SECTION: + * DocExamples/trussrw + */ + + +#pragma D option quiet + +syscall::read:entry, +syscall::write:entry +/pid == 100551/ +{ + printf("%s(%d, 0x%x, %4d)", probefunc, arg0, arg1, arg2); +} + +syscall::read:return, +syscall::write:return +/pid == 100551/ +{ + printf("\t\t = %d\n", arg1); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/userfunc.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/userfunc.d new file mode 100755 index 00000000..0d83465d --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/docsExamples/userfunc.d @@ -0,0 +1,61 @@ +#!/usr/sbin/dtrace -s + +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Verifying doc example 21-1 + * + * SECTION: + * DocExamples/userfunc + * + */ + +pid$1::$2:entry +{ + self->trace = 1; +} + +pid$1::$2:return +/self->trace/ +{ + self->trace = 0; +} + +pid$1:::entry, +pid$1:::return +/self->trace/ +{ +} + + + + + + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/drops/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/drops/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/drops/drp.DTRACEDROP_AGGREGATION.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/drops/drp.DTRACEDROP_AGGREGATION.d new file mode 100644 index 00000000..02b32438 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/drops/drp.DTRACEDROP_AGGREGATION.d @@ -0,0 +1,44 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma D option quiet +#pragma D option strsize=1024 +#pragma D option aggsize=512 + +BEGIN +{ + @["Harding"] = count(); + @["Hoover"] = count(); + @["Nixon"] = count(); + @["Bush"] = count(); +} + +BEGIN +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/drops/drp.DTRACEDROP_DBLERROR.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/drops/drp.DTRACEDROP_DBLERROR.d new file mode 100644 index 00000000..face4c8c --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/drops/drp.DTRACEDROP_DBLERROR.d @@ -0,0 +1,42 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +BEGIN +{ + trace(*(int *)NULL); +} + +ERROR +{ + trace(*(int *)NULL); +} + +BEGIN +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/drops/drp.DTRACEDROP_DYNAMIC.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/drops/drp.DTRACEDROP_DYNAMIC.d new file mode 100644 index 00000000..f8a90f06 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/drops/drp.DTRACEDROP_DYNAMIC.d @@ -0,0 +1,43 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma D option strsize=1024 +#pragma D option dynvarsize=512 + +BEGIN +{ + a["Harding"] = 1; + a["Hoover"] = 1; + a["Nixon"] = 1; + a["Bush"] = 1; +} + +BEGIN +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/drops/drp.DTRACEDROP_PRINCIPAL.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/drops/drp.DTRACEDROP_PRINCIPAL.d new file mode 100644 index 00000000..8389ce02 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/drops/drp.DTRACEDROP_PRINCIPAL.d @@ -0,0 +1,43 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma D option strsize=1024 +#pragma D option bufsize=512 + +BEGIN +{ + trace("Harding"); + trace("Hoover"); + trace("Nixon"); + trace("Bush"); +} + +BEGIN +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/drops/drp.DTRACEDROP_PRINCIPAL.end.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/drops/drp.DTRACEDROP_PRINCIPAL.end.d new file mode 100644 index 00000000..a723019f --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/drops/drp.DTRACEDROP_PRINCIPAL.end.d @@ -0,0 +1,43 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma D option strsize=1024 +#pragma D option bufsize=512 + +BEGIN +{ + exit(0); +} + +END +{ + trace("Harding"); + trace("Hoover"); + trace("Nixon"); + trace("Bush"); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/drops/drp.DTRACEDROP_SPEC.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/drops/drp.DTRACEDROP_SPEC.d new file mode 100644 index 00000000..8f6df3c0 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/drops/drp.DTRACEDROP_SPEC.d @@ -0,0 +1,48 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma D option nspec=1 +#pragma D option specsize=32 +#pragma D option strsize=512 + +BEGIN +{ + spec = speculation(); + speculate(spec); + trace("The, SystemTap, The."); +} + +BEGIN +{ + commit(spec); +} + +BEGIN +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/drops/drp.DTRACEDROP_SPECUNAVAIL.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/drops/drp.DTRACEDROP_SPECUNAVAIL.d new file mode 100644 index 00000000..1fd39748 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/drops/drp.DTRACEDROP_SPECUNAVAIL.d @@ -0,0 +1,42 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma D option nspec=1 + +BEGIN, +BEGIN, +BEGIN, +BEGIN +{ + spec = speculation(); +} + +BEGIN +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/drops/drp.DTRACEDROP_STKSTROVERFLOW.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/drops/drp.DTRACEDROP_STKSTROVERFLOW.d new file mode 100644 index 00000000..f5d6416b --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/drops/drp.DTRACEDROP_STKSTROVERFLOW.d @@ -0,0 +1,53 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma D option destructive +#pragma D option jstackstrsize=1 +#pragma D option quiet + +BEGIN +{ + system("java -version"); +} + +syscall:::entry +{ + @[jstack()] = count(); +} + +proc:::exit +/progenyof($pid) && execname == "java"/ +{ + exit(0); +} + +END +{ + printa("\r", @); + printf("\n"); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/err.D_PDESC_ZERO.InvalidDescription1.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/err.D_PDESC_ZERO.InvalidDescription1.d new file mode 100644 index 00000000..a0d17676 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/err.D_PDESC_ZERO.InvalidDescription1.d @@ -0,0 +1,42 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: An invalid probe description throws a D_PDESC_ZERO error. + * + * SECTION: Errtags/D_PDESC_ZERO + * + */ + +#pragma D option quiet + +fbt:bippity:boppity:boo +{ + exit(0); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.APIVersion.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.APIVersion.d new file mode 100644 index 00000000..21564897 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.APIVersion.d @@ -0,0 +1,37 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* Assertion: + * Use the -V option to printout API version. + * + * SECTION: + * dtrace Utility/-V Option + * + * NOTES: + * Use /usr/sbin/dtrace -V on command line. + */ diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.AddSearchPath.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.AddSearchPath.d new file mode 100644 index 00000000..53fe67af --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.AddSearchPath.d @@ -0,0 +1,55 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * The -I option can be used to search path for #include files when used + * in conjunction with the -C option. The specified directory is inserted into + * the search path adhead of the default directory list. + * + * SECTION: dtrace Utility/-C Option; + * dtrace Utility/-I Option + * + * NOTES: + * Create a file and define the variable VALUE in it. Move it a + * directory different from the current directory. Change the value + * of appropriately in the code below. + * Invoke: dtrace -C -I -s man.AddSearchPath.d + * Verify VALUE. + */ + + +#pragma D option quiet + +#include "filename" + +BEGIN +{ + printf("Value of VALUE: %d\n", VALUE); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.CoalesceTrace.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.CoalesceTrace.d new file mode 100755 index 00000000..3cd9d02a --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.CoalesceTrace.d @@ -0,0 +1,67 @@ +#!/bin/ksh -p + +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * + * ASSERTION: + * Testing -F option with several probes. + * + * SECTION: dtrace Utility/-F Option + * + * NOTES: Manually verify using: + * "/usr/sbin/dtrace -F -s man.CoalesceTrace.d" on command line. + * + * Verify that the for the indent characters are -> <- for non-syscall + * entry/return pairs (e.g. fbt ones) and => <= for syscall ones and + * | for profile ones. + * + */ + +BEGIN +{ + i = 0; + j = 0; + k = 0; +} + +syscall::read: +{ + printf("syscall: %d\n", i++); +} + +fbt:genunix:read: +{ + printf("fbt: %d\n", j++); +} + +profile:::tick-10sec +{ + printf("profile: %d\n", k++); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.ELFGeneration.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.ELFGeneration.d new file mode 100644 index 00000000..a30a140e --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.ELFGeneration.d @@ -0,0 +1,48 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Using -G option with dtrace utility produces an ELF file containing a + * DTrace program. If the filename used with the -s option does ends + * with .d, and the -o option is not used, then the output ELF file is + * in filename.o + * + * SECTION: dtrace Utility/-G Option + * + * NOTES: Use this file as + * /usr/sbin/dtrace -G -s man.ELFGeneration.d + * Delete the file man.ELFGeneration.d.o + * + */ + +BEGIN +{ + printf("This test should compile.\n"); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.IncludedFilePath.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.IncludedFilePath.d new file mode 100644 index 00000000..f4e4e4e1 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.IncludedFilePath.d @@ -0,0 +1,48 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Using the -CH option with dtrace invocation displays the list of + * pathnames of included files one per line to the stderr. + * + * SECTION: dtrace Utility/-C Option; + * dtrace Utility/-H Option + * + * NOTES: Use this file as + * /usr/sbin/dtrace -qCH -s man.IncludedFilePath.d + * + */ + +#include "stdio.h" + +BEGIN +{ + printf("This test should compile.\n"); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.ListProbesWithFunctions b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.ListProbesWithFunctions new file mode 100644 index 00000000..e3db1270 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.ListProbesWithFunctions @@ -0,0 +1,99 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Using -l option with -f option. + * + * SECTION: dtrace Utility/-l Option; + * dtrace Utility/-f Option + * + * NOTES: Manually check: + * + * 1) + * /usr/sbin/dtrace -lf profile + * RESULT: Silent output without any probes listed. + * + * 2) + * /usr/sbin/dtrace -lf genunix + * RESULT: Silent output without any probes listed. + * + * 3) + * /usr/sbin/dtrace -lf read + * RESULT: matching list of probes with function read. + * + * 4) + * /usr/sbin/dtrace -lf genunix:read + * RESULT: matching list of probes with module genunix and + * function read. + * + * 5) + * /usr/sbin/dtrace -lf sysinfo:genunix:read + * RESULT: matching list of probes with provider sysinfo, module + * genunix and function read. + * + * 6) + * /usr/sbin/dtrace -lf :genunix:: + * RESULT: Silent output without any probes listed. + * + * 7) + * /usr/sbin/dtrace -lf ::read: + * RESULT: Silent output without any probes listed. + * + * 8) + * /usr/sbin/dtrace -lf profile:::profile-97 + * RESULT: not a valid probe description. + * + * 9) + * /usr/sbin/dtrace -lf read -lf write + * RESULT: matching list of both read and write probes. + * + * 10) + * /usr/sbin/dtrace -lf read -lm fight + * RESULT: List of only read probes. + * + * 11) + * /usr/sbin/dtrace -lf fight -lf write + * RESULT: List of only write probes. + * + * 12) Has been automated. + * /usr/sbin/dtrace -lf fbt:des:des3_crunch_block:return + * RESULT: not a valid probe description. + * + * 13) + * /usr/sbin/dtrace -lf read'{printf("FOUND");}' + * RESULT: Silent output without any probes listed. + * + * 14) + * /usr/sbin/dtrace -lf read '{printf("FOUND");}' + * RESULT: List of only read probes. + * + * 15) + * /usr/sbin/dtrace -lf read'/probename == "entry"/{printf("FOUND");}' + * RESULT: Silent output without any probes listed. + */ diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.ListProbesWithIDs b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.ListProbesWithIDs new file mode 100644 index 00000000..2b46ce34 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.ListProbesWithIDs @@ -0,0 +1,77 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Using -l option with -i option. + * + * SECTION: dtrace Utility/-l Option; + * dtrace Utility/-i Option + * + * NOTES: Manually check: + * + * 1) + * /usr/sbin/dtrace -l + * RESULT: List of all available probes. + * + * 2) + * /usr/sbin/dtrace -li 0 + * RESULT: invalid probe identifier 0. + * + * 3) automated in tst.InvalidId1.d.ksh + * /usr/sbin/dtrace -li -3 + * RESULT: not a valid id range + * + * 4) + * /usr/sbin/dtrace -li 0-2 + * RESULT: List of probes including 1 and 2 or error. + * + * 5) automated in tst.InvalidId2.d.ksh + * /usr/sbin/dtrace -li 4-2 + * RESULT: not a valid id range + * + * 6) automated in tst.InvalidId3.d.ksh + * /usr/sbin/dtrace -li 2-2 + * RESULT: not a valid id range + * + * 7) + * /usr/sbin/dtrace -li 1 2 3 4 + * RESULT: only the first probe id is listed and other extraneous + * charaters are not considered. + * + * 8) + * /usr/sbin/dtrace -li 0 - 2 + * RESULT: only the first probe id is listed and other extraneous + * charaters are not considered. + * + * 9) + * /usr/sbin/dtrace -li 1 -li 2-4 -li 4 -li 5 + * RESULT: Probe descriptions listed for all ids specified. Once + * for each specification on the command line. + * + */ diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.ListProbesWithModules b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.ListProbesWithModules new file mode 100644 index 00000000..167c72a0 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.ListProbesWithModules @@ -0,0 +1,91 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Using -l option with -m option. + * + * SECTION: dtrace Utility/-l Option; + * dtrace Utility/-m Option + * + * NOTES: Manually check: + * + * 1) + * /usr/sbin/dtrace -lm profile + * RESULT: Silent output without any probes listed. + * + * 2) + * /usr/sbin/dtrace -lm genunix + * RESULT: matching list of probes with module name genunix. + * + * 3) + * /usr/sbin/dtrace -lm vtrace:genunix + * RESULT: matching list of probes with provider vtrace and module + * genunix. + * + * 4) automated in tst.InvalidModule1.d.ksh + * /usr/sbin/dtrace -lm :genunix:: + * RESULT: not a valid probe description + * + * 5) automated in tst.InvalidModule2.d.ksh + * /usr/sbin/dtrace -lm profile:::profile-97 + * RESULT: not a valid probe description. + * + * 6) + * /usr/sbin/dtrace -lm genunix -lm unix + * RESULT: matching list of both genunix and unix probes. + * + * 7) + * /usr/sbin/dtrace -lm genunix -lm foounix + * RESULT: List of only genunix probes. + * + * 8) + * /usr/sbin/dtrace -lm foounix -lm unix + * RESULT: List of only unix probes. + * + * 9) automated in tst.InvalidModule3.d.ksh + * /usr/sbin/dtrace -lm fbt:des:des3_crunch_block:return + * RESULT: not a valid probe description. + * + * 10) + * /usr/sbin/dtrace -lm fbt:genunix'{printf("FOUND");}' + * RESULT: Silent output without any probes listed. + * + * 11) + * /usr/sbin/dtrace -lm genunix'{printf("FOUND");}' + * RESULT: Silent output without any probes listed. + * + * 12) + * /usr/sbin/dtrace -lm unix '{printf("FOUND");}' + * RESULT: List of only unix probes. + * + * 13) automated in tst.InvalidModule4.d.ksh + * /usr/sbin/dtrace -lm + * unix'/probefunc == "preempt"/{printf("FOUND");}' + * RESULT: not a valid probe description. + */ diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.ListProbesWithNames b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.ListProbesWithNames new file mode 100644 index 00000000..aabf1b2d --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.ListProbesWithNames @@ -0,0 +1,128 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Using -l option with -n option. + * + * SECTION: dtrace Utility/-l Option; + * dtrace Utility/-n Option + * + * NOTES: Manually check: + * + * 1) + * /usr/sbin/dtrace -ln profile + * RESULT: Silent output without any probes listed. + * + * 2) + * /usr/sbin/dtrace -ln genunix + * RESULT: Silent output without any probes listed. + * + * 3) + * /usr/sbin/dtrace -ln read + * RESULT: Silent output without any probes listed. + * + * 4) + * /usr/sbin/dtrace -ln BEGIN + * RESULT: list of one probe with name BEGIN. + * + * 5) + * /usr/sbin/dtrace -ln begin + * RESULT: Silent output without any probes listed. + * + * 6) + * /usr/sbin/dtrace -ln genunix:read + * RESULT: Silent output without any probes listed. + * + * 7) + * /usr/sbin/dtrace -ln genunix:read: + * RESULT: matching list of probes with module genunix and + * function read. + * + * 8) + * /usr/sbin/dtrace -ln sysinfo:genunix:read + * RESULT: Silent output without any probes listed. + * + * 9) + * /usr/sbin/dtrace -ln sysinfo:genunix:read: + * RESULT: matching list of probes with provider sysinfo, module + * genunix and function read. + * + * 10) /usr/sbin/dtrace -ln :genunix:: + * RESULT: matching list of probes with module genunix + * + * 11) + * /usr/sbin/dtrace -ln :genunix: + * RESULT: Silent output without any probes listed. + * + * 12) + * /usr/sbin/dtrace -ln ::read: + * RESULT: matching list of probes with and function read. + * + * 13) + * /usr/sbin/dtrace -ln profile:::profile-97 + * RESULT: matching list of probes with provider profile and function + * profile-97 + * + * 14) + * /usr/sbin/dtrace -ln read: -ln write: + * RESULT: matching list of both read and write probes. + * + * 15) + * /usr/sbin/dtrace -ln read: -ln fight: + * RESULT: List of only read probes. + * + * 16) + * /usr/sbin/dtrace -ln fight: -ln write: + * RESULT: List of only write probes. + * + * 17) + * /usr/sbin/dtrace -ln fbt:des:des3_crunch_block:return + * RESULT: Silent output of only the header. + * + * 18) + * /usr/sbin/dtrace -ln read:'{printf("FOUND");}' + * RESULT: Silent output without any probes listed. + * + * 19) + * /usr/sbin/dtrace -ln read:entry'{printf("FOUND");}' + * RESULT: Silent output without any probes listed. + * + * 20) + * /usr/sbin/dtrace -ln BEGIN'{Printf("FOUND");}' + * RESULT: Silent output without any probes listed. + * + * 21) + * /usr/sbin/dtrace -ln BEGIN '{printf("FOUND");}' + * RESULT: List of only BEGIN probe. + * + * 22) + * /usr/sbin/dtrace -ln + * BEGIN'/probename == "entry"/{printf("FOUND");}' + * RESULT: Silent output without any probes listed. + */ diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.ListProbesWithProviders b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.ListProbesWithProviders new file mode 100644 index 00000000..961d4096 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.ListProbesWithProviders @@ -0,0 +1,82 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Using -l option with -P option. + * + * SECTION: dtrace Utility/-l Option; + * dtrace Utility/-P Option + * + * NOTES: Manually check: + * + * 1) + * /usr/sbin/dtrace -lP profile + * RESULT: List of only profile probes. + * + * 2) + * /usr/sbin/dtrace -lP foofile + * RESULT: Silent output without any probes listed. + * + * 3) automated in tst.InvalidProvider2.d.ksh + * /usr/sbin/dtrace -lP profile::: + * RESULT: not a valid probe description + * + * 4) automated in tst.InvalidProvider1.d.ksh + * /usr/sbin/dtrace -lP profile:::profile-97 + * RESULT: not a valid probe description. + * + * 5) + * /usr/sbin/dtrace -lP profile -lP syscall + * RESULT: matching list of both profile and syscall probes. + * + * 6) + * /usr/sbin/dtrace -lP profile -lP foofile + * RESULT: List of only profile probes. + * + * 7) + * /usr/sbin/dtrace -lP foofile -lP profile + * RESULT: List of only profile probes. + * + * 8) authomated in tst.InvalidProvider3.d.ksh + * /usr/sbin/dtrace -lP fbt:des:des3_crunch_block:return + * RESULT: not a valid probe description. + * + * 9) + * /usr/sbin/dtrace -lP profile'{printf("FOUND");}' + * RESULT: Silent output without any probes listed. + * + * 10) + * /usr/sbin/dtrace -lP profile '{printf("FOUND");}' + * RESULT: List of only profile probes. + * + * 11) automated in tst.InvalidProvider4.d.ksh + * /usr/sbin/dtrace -lP + * profile'/probename == "profile-199"/{printf("FOUND");}' + * RESULT: not a valid probe description. + */ diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.ShowCompilerCode.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.ShowCompilerCode.d new file mode 100644 index 00000000..556811d2 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.ShowCompilerCode.d @@ -0,0 +1,44 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Using -S option with dtrace utility shows the intermediate compiler code. + * + * SECTION: dtrace Utility/-S Option + * + * NOTES: Use this file as + * /usr/sbin/dtrace -qSs man.ShowCompilerCode.d + * + */ + +BEGIN +{ + printf("This test should compile %d\n", 1); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.TraceFunctions b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.TraceFunctions new file mode 100644 index 00000000..4c9c1c56 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.TraceFunctions @@ -0,0 +1,115 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Using -f option. + * + * SECTION: dtrace Utility/-f Option + * + * NOTES: Manually check: + * + * 1) automated in tst.InvalidTraceFunc1.d.ksh + * /usr/sbin/dtrace -f profile + * RESULT: invalid probe specifier + * + * 2) automated in tst.InvalidTraceFunc2.d.ksh + * /usr/sbin/dtrace -f genunix + * RESULT: invalid probe specifier + * + * 3) + * /usr/sbin/dtrace -f read + * RESULT: tracing of matching list of probes with function read. + * + * 4) automated in tst.InvalidTraceFunc3.d.ksh + * /usr/sbin/dtrace -f read: + * RESULT: invalid probe specifier + * + * 5) + * /usr/sbin/dtrace -f ::read + * RESULT: tracing of matching list of probes with function read. + * + * 6) automated in tst.InvalidTraceFunc4.d.ksh + * /usr/sbin/dtrace -f ::read: + * RESULT: invalid probe specifier + * + * 7) + * /usr/sbin/dtrace -f genunix:read + * RESULT: tracing of probes with module genunix and function read. + * + * 8) + * /usr/sbin/dtrace -f sysinfo:genunix:read + * RESULT: tracing of probes with provider sysinfo, module genunix + * and function read. + * + * 9) + * /usr/sbin/dtrace -f sysinfo::read + * RESULT: tracing of probes with provider sysinfo and function read. + * + * 10) automated in tst.InvalidTraceFunc5.d.ksh + * /usr/sbin/dtrace -f :genunix:: + * RESULT: invalid probe specifier + * + * 11) automated in tst.InvalidTraceFunc6.d.ksh + * /usr/sbin/dtrace -f profile:::profile-97 + * RESULT: invalid probe specifier. + * + * 12) + * /usr/sbin/dtrace -f read -f write + * RESULT: tracing of both read and write probes. + * + * 13) + * /usr/sbin/dtrace -f read -f fight + * RESULT: Count of matching read probes and invalid probe specifier + * for fight + * + * 14) automated in tst.InvalidTraceFunc8.d.ksh + * /usr/sbin/dtrace -f fight -f write + * RESULT: invalid probe specifier. + * + * 15) automated in tst.InvalidTraceFunc7.d.ksh + * /usr/sbin/dtrace -f fbt:des:des3_crunch_block:return + * RESULT: invalid probe specifier. + * + * 16) + * /usr/sbin/dtrace -f read'{printf("FOUND");}' + * RESULT: tracing of probes with function read and with message FOUND + * + * 17) + * /usr/sbin/dtrace -f ::read'{printf("FOUND");}' + * RESULT: tracing of probes with function read and with message FOUND + * + * 18) automated in tst.InvalidTraceFunc9.d.ksh + * /usr/sbin/dtrace -f read '{printf("FOUND");}' + * RESULT: invalid probe specifier. + * + * 19) + * /usr/sbin/dtrace -f read'/probename == "entry"/{printf("FOUND");}' + * RESULT: tracing of probes with function read, name entry and with + * message FOUND + */ diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.TraceIDs b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.TraceIDs new file mode 100644 index 00000000..d9615b5a --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.TraceIDs @@ -0,0 +1,70 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Using -l option with -i option. + * + * SECTION: dtrace Utility/-l Option; + * dtrace Utility/-i Option + * + * NOTES: Manually check: + * + * 1) automated in tst.InvalidTraceID1.d.ksh + * /usr/sbin/dtrace -i 0 + * RESULT: invalid probe specifier. + * + * 2) automated in tst.InvalidTraceID2.d.ksh + * /usr/sbin/dtrace -i -3 + * RESULT: not a valid id range + * + * 3) automated in tst.InvalidTraceID3.d.ksh + * /usr/sbin/dtrace -i 0-2 + * RESULT: not a valid id range + * + * 4) automated in tst.InvalidTraceID4.d.ksh + * /usr/sbin/dtrace -i 4-2 + * RESULT: not a valid id range + * + * 5) automated in tst.InvalidTraceID5.d.ksh + * /usr/sbin/dtrace -i 2-2 + * RESULT: not a valid id range + * + * 6) automated in tst.InvalidTraceID6.d.ksh + * /usr/sbin/dtrace -i 1 2 3 4 + * RESULT: invalid probe specifier. + * + * 7) automated in tst.InvalidTraceID7.d.ksh + * /usr/sbin/dtrace -i 0 - 2 + * RESULT: invalid probe specifier. + * + * 8) + * /usr/sbin/dtrace -i 1 -i 2-4 -i 4 -i 5 + * RESULT: Only the BEGIN probe is traced and the others are not. + * + */ diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.TraceModule b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.TraceModule new file mode 100644 index 00000000..9c4401ea --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.TraceModule @@ -0,0 +1,114 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Tracing a module using the -m option. + * + * SECTION: dtrace Utility/-m Option + * + * NOTES: Manually check: + * + * 1) automated in tst.InvalidTraceModule1.d.ksh + * /usr/sbin/dtrace -m profile + * RESULT: invalid probe specifier + * + * 2) + * /usr/sbin/dtrace -m genunix + * RESULT: trace of all probes with module genunix. + * + * 3) + * /usr/sbin/dtrace -m vtrace:genunix + * RESULT: trace of probes with provider vtrace and module genunix. + * + * 4) automated in tst.InvalidTraceModule2.d.ksh + * /usr/sbin/dtrace -m :genunix:: + * RESULT: invalid probe specifier + * + * 5) + * /usr/sbin/dtrace -m :genunix + * RESULT: trace of all probes with module genunix. + * + * 6) automated in tst.InvalidTraceModule3.d.ksh + * /usr/sbin/dtrace -m genunix:: + * RESULT: invalid probe specifier + * + * 7) automated in tst.InvalidTraceModule4.d.ksh + * /usr/sbin/dtrace -m profile:::profile-97 + * RESULT: not a valid probe description. + * + * 8) + * /usr/sbin/dtrace -m genunix -m unix + * RESULT: tracing of both genunix and unix probes. + * + * 9) + * /usr/sbin/dtrace -m genunix -m foounix + * RESULT: Number of probes matching the description genunix + * and an invalid probe specifier for foounix. + * + * 10) automated in tst.InvalidTraceModule5.d.ksh + * /usr/sbin/dtrace -m foounix -m unix + * RESULT: invalid probe specifier for foounix. + * + * 11) automated in tst.InvalidTraceModule6.d.ksh + * /usr/sbin/dtrace -m fbt:des:des3_crunch_block:return + * RESULT: invalid probe description. + * + * 12) + * /usr/sbin/dtrace -m fbt:genunix'{printf("FOUND");}' + * RESULT: tracing of all the probes matching provider fbt and module + * genunix. + * + * 13) + * /usr/sbin/dtrace -m genunix'{printf("FOUND");}' + * RESULT: tracing of all the probes matching module genunix with + * message FOUND + * + * 14) + * /usr/sbin/dtrace -m :genunix'{printf("FOUND");}' + * RESULT: tracing of all the probes matching module genunix with + * message FOUND + * + * 15) automated in tst.InvalidTraceModule7.d.ksh + * /usr/sbin/dtrace -m genunix::'{printf("FOUND");}' + * RESULT: invalid probe specifier. + * + * 16) automated in tst.InvalidTraceModule8.d.ksh + * /usr/sbin/dtrace -m genunix:'{printf("FOUND");}' + * RESULT: invalid probe specifier. + * + * 17) + * /usr/sbin/dtrace -m unix '{printf("FOUND");}' + * RESULT: invalid probe specifier. + * + * 18) + * /usr/sbin/dtrace -m + * unix'/probefunc == "preempt"/{printf("FOUND");}' + * RESULT: tracing of all the probes matching module genunix, + * probe function preempt with message FOUND. + */ diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.TraceNames b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.TraceNames new file mode 100644 index 00000000..c3e75554 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.TraceNames @@ -0,0 +1,129 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Using -n option. + * + * SECTION: dtrace Utility/-n Option + * + * NOTES: Manually check: + * + * 1) automated in tst.InvalidTraceName1.d.ksh + * /usr/sbin/dtrace -n profile + * RESULT: invalid probe specifier + * + * 2) automated in tst.InvalidTraceName2.d.ksh + * /usr/sbin/dtrace -n genunix + * RESULT: invalid probe specifier + * + * 3) automated in tst.InvalidTraceName3.d.ksh + * /usr/sbin/dtrace -n read + * RESULT: invalid probe specifier + * + * 4) + * /usr/sbin/dtrace -n BEGIN + * RESULT: trace of one probe with name BEGIN. + * + * 5) automated in tst.InvalidTraceName4.d.ksh + * /usr/sbin/dtrace -n begin + * RESULT: invalid probe specifier + * + * 6) automated in tst.InvalidTraceName5.d.ksh + * /usr/sbin/dtrace -n genunix:read + * RESULT: invalid probe specifier + * + * 7) + * /usr/sbin/dtrace -n genunix:read: + * RESULT: trace of probes with module genunix and function read. + * + * 8) automated in tst.InvalidTraceName6.d.ksh + * /usr/sbin/dtrace -n sysinfo:genunix:read + * RESULT: invalid probe specifier + * + * 9) + * /usr/sbin/dtrace -n sysinfo:genunix:read: + * RESULT: tracing of probes with provider sysinfo, module genunix + * and function read. + * + * 10) + * /usr/sbin/dtrace -n :genunix:: + * RESULT: tracing of probes with module genunix + * + * 11) automated in tst.InvalidTraceName7.d.ksh + * /usr/sbin/dtrace -n :genunix: + * RESULT: invalid probe specifier + * + * 12) + * /usr/sbin/dtrace -n ::read: + * RESULT: tracing of probes with function read. + * + * 13) + * /usr/sbin/dtrace -n profile:::profile-97 + * RESULT: tracing of probes with provider profile and name + * profile-97 + * + * 14) + * /usr/sbin/dtrace -n read: -n write: + * RESULT: tracing of both read and write probes. + * + * 15) + * /usr/sbin/dtrace -n read: -n fight: + * RESULT: Count of mathching read probes and invalid probe specifier + * for fight: + * + * 16) automated in tst.InvalidTraceName8.d.ksh + * /usr/sbin/dtrace -n fight: -n write: + * RESULT: invalid probe specifier + * + * 17) + * /usr/sbin/dtrace -n fbt:des:des3_crunch_block:return + * RESULT: trace of the specified probe. + * + * 18) + * /usr/sbin/dtrace -n read:'{printf("FOUND");}' + * RESULT: Trace of all the probes with module read and a message + * saying FOUND. + * + * 19) + * /usr/sbin/dtrace -n read:entry'{printf("FOUND");}' + * RESULT: Trace of all the probes with module read, name entry.Output + * of a message saying FOUND. + * + * 20) + * /usr/sbin/dtrace -n BEGIN'{printf("FOUND");}' + * RESULT: Trace of the BEGIN probe with the message FOUND. + * + * 21) automated in tst.InvalidTraceName9.d.ksh + * /usr/sbin/dtrace -n BEGIN '{printf("FOUND");}' + * RESULT: invalid probe specifier + * + * 22) + * /usr/sbin/dtrace -n BEGIN'/probename == "entry"/{printf("FOUND");}' + * RESULT: Tracing of BEGIN function but no message FOUND. + */ diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.TraceProvider b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.TraceProvider new file mode 100644 index 00000000..f52f395c --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.TraceProvider @@ -0,0 +1,83 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Using -P option to trace all the probes provided by the particular + * provider. + * + * SECTION: dtrace Utility/-P Option + * + * NOTES: Manually check: + * + * 1) + * /usr/sbin/dtrace -P profile + * RESULT: Trace of all profile probes. + * + * 2) automated in tst.InvalidTraceProvider1.d.ksh + * /usr/sbin/dtrace -P foofile + * RESULT: invalid probe specifier + * + * 3) automated in tst.InvalidTraceProvider2.d.ksh + * /usr/sbin/dtrace -P profile::: + * RESULT: invalid probe specifier + * + * 4) automated in tst.InvalidTraceProvider3.d.ksh + * /usr/sbin/dtrace -P profile:::profile-97 + * RESULT: invalid probe specifier + * + * 5) + * /usr/sbin/dtrace -P profile -P syscall + * RESULT: matching traces of both profile and syscall probes. + * + * 6) + * /usr/sbin/dtrace -P profile -P foofile + * RESULT: Count of profile probes that matched and invalid + * probe specifier for foofile and no tracing. + * + * 7) automated in tst.InvalidTraceProvider4.d.ksh + * /usr/sbin/dtrace -P fbt:des:des3_crunch_block:return + * RESULT: invalid probe specifier + * + * 8) + * /usr/sbin/dtrace -P profile'{printf("FOUND");}' + * RESULT: Traces of all the matching profile probes with the + * FOUND message. + * + * 9) automated in tst.InvalidTraceProvider5.d.ksh + * /usr/sbin/dtrace -P profile '{printf("FOUND");}' + * RESULT: invalid probe specifier + * + * 10) + * /usr/sbin/dtrace -P + * profile'/probename == "profile-199"/{printf("FOUND");}' + * RESULT: Traces of the matching profile probe with the + * FOUND message. + * + * + */ diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.VerboseStabilityReport.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.VerboseStabilityReport.d new file mode 100644 index 00000000..23742284 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/man.VerboseStabilityReport.d @@ -0,0 +1,47 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Using -v option with dtrace utility produces a program stability report + * showing the minimum interface stability and dependency level for + * the specified D programs. + * + * SECTION: dtrace Utility/-s Option; + * dtrace Utility/-v Option + * + * NOTES: Use this file as + * /usr/sbin/dtrace -vs man.VerboseStabilityReport.d + * + */ + +BEGIN +{ + printf("This test should compile: %d\n", 2); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.AddSearchPath.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.AddSearchPath.d.ksh new file mode 100755 index 00000000..2f49f733 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.AddSearchPath.d.ksh @@ -0,0 +1,82 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# The -I option can be used to search path for #include files when used +# in conjunction with the -C option. The specified directory is inserted into +# the search path adhead of the default directory list. +# +# SECTION: dtrace Utility/-C Option +# SECTION: dtrace Utility/-I Option +# +## + +script() +{ + $dtrace -C -I /tmp -s /dev/stdin <' + exit 2 +fi + +tempfile=/tmp/test.h +echo "#define VALUE 1520" > $tempfile + +dtrace=$1 +script +status=$? + +if [ "$status" -ne 0 ]; then + echo $tst: dtrace failed + exit $status +fi + +/usr/bin/rm -f $tempfile +exit 0 diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.BufsizeGiga.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.BufsizeGiga.d.ksh new file mode 100644 index 00000000..2f0c5673 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.BufsizeGiga.d.ksh @@ -0,0 +1,45 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +# ident "%Z%%M% %I% %E% SMI" + +# +# ASSERTION: +# The trace buffer size can include any of the size suffixes k, m, g or t +# +# SECTION: dtrace Utility/-b Option +# + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -b 1g -b 2g -e + +exit $? diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.BufsizeKilo.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.BufsizeKilo.d.ksh new file mode 100644 index 00000000..d969b481 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.BufsizeKilo.d.ksh @@ -0,0 +1,45 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +# ident "%Z%%M% %I% %E% SMI" + +# +# ASSERTION: +# The trace buffer size can include any of the size suffixes k, m, g or t +# +# SECTION: dtrace Utility/-b Option +# + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -b 1k -b 2k -e + +exit $? diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.BufsizeMega.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.BufsizeMega.d.ksh new file mode 100644 index 00000000..a08327a3 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.BufsizeMega.d.ksh @@ -0,0 +1,45 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +# ident "%Z%%M% %I% %E% SMI" + +# +# ASSERTION: +# The trace buffer size can include any of the size suffixes k, m, g or t +# +# SECTION: dtrace Utility/-b Option +# + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -b 1m -b 2m -e + +exit $? diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.BufsizeTera.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.BufsizeTera.d.ksh new file mode 100644 index 00000000..00f2c662 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.BufsizeTera.d.ksh @@ -0,0 +1,45 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +# ident "%Z%%M% %I% %E% SMI" + +# +# ASSERTION: +# The trace buffer size can include any of the size suffixes k, m, g or t +# +# SECTION: dtrace Utility/-b Option +# + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -b 1t -b 2t -e + +exit $? diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DataModel32.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DataModel32.d.ksh new file mode 100755 index 00000000..e4ef38db --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DataModel32.d.ksh @@ -0,0 +1,73 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# If the -32 option is specified, dtrace will force the D compiler to +# compile a program using the 32-bit data model. +# +# SECTION: dtrace Utility/-32 Option +# +## + +script() +{ + $dtrace -32 -s /dev/stdin <' + exit 2 +fi + +dtrace=$1 + +script +status=$? + +if [ "$status" -ne 0 ]; then + echo $tst: dtrace failed +fi + +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DataModel64.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DataModel64.d.ksh new file mode 100755 index 00000000..8a9de0c8 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DataModel64.d.ksh @@ -0,0 +1,74 @@ +#!/bin/ksh + +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# If the -64 option is specified, dtrace will force the D compiler to +# compile a program using the 64-bit data model. +# +# SECTION: dtrace Utility/-64 Option +# +## + +script() +{ + $dtrace -64 -s /dev/stdin <' + exit 2 +fi + +dtrace=$1 + +script +status=$? + +if [ "$status" -ne 0 ]; then + echo $tst: dtrace failed +fi + +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DefineNameWithCPP.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DefineNameWithCPP.d.ksh new file mode 100755 index 00000000..9be2b291 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DefineNameWithCPP.d.ksh @@ -0,0 +1,68 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# The -D option can be used to define a name when used in conjunction +# with the -C option. +# +# SECTION: dtrace Utility/-C Option; +# dtrace Utility/-D Option +# +## + +script() +{ + $dtrace -C -D VALUE=40 -s /dev/stdin <' + exit 2 +fi + +dtrace=$1 + +script +status=$? + +if [ "$status" -ne 0 ]; then + echo $tst: dtrace failed +fi + +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DefineNameWithCPP.d.ksh.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DefineNameWithCPP.d.ksh.out new file mode 100644 index 00000000..5f91ad16 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DefineNameWithCPP.d.ksh.out @@ -0,0 +1,2 @@ +Value of VALUE: 40 + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithFunction.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithFunction.d.ksh new file mode 100755 index 00000000..0259db36 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithFunction.d.ksh @@ -0,0 +1,56 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# The -w option can be used to permit destructive actions in D programs. +# +# SECTION: dtrace Utility/-w Option; +# dtrace Utility/-f Option +# +## + + + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -qwf read'{chill(15); printf("Done chilling"); exit(0);}' +status=$? + +if [ "$status" -ne 0 ]; then + echo $tst: dtrace failed +fi + +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithFunction.d.ksh.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithFunction.d.ksh.out new file mode 100644 index 00000000..8975980f --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithFunction.d.ksh.out @@ -0,0 +1 @@ +Done chilling diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithID.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithID.d.ksh new file mode 100755 index 00000000..6d3913f8 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithID.d.ksh @@ -0,0 +1,54 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# The -w option can be used to permit destructive actions in D programs. +# +# SECTION: dtrace Utility/-w Option; +# dtrace Utility/-i Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -qwi 1'{chill(15); printf("Done chilling"); exit(0);}' +status=$? + +if [ "$status" -ne 0 ]; then + echo $tst: dtrace failed +fi + +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithID.d.ksh.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithID.d.ksh.out new file mode 100644 index 00000000..8975980f --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithID.d.ksh.out @@ -0,0 +1 @@ +Done chilling diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithModule.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithModule.d.ksh new file mode 100755 index 00000000..923be51c --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithModule.d.ksh @@ -0,0 +1,54 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# The -w option can be used to permit destructive actions in D programs. +# +# SECTION: dtrace Utility/-w Option; +# dtrace Utility/-m Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -qwm unix'{chill(15); printf("Done chilling"); exit(0);}' +status=$? + +if [ "$status" -ne 0 ]; then + echo $tst: dtrace failed +fi + +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithModule.d.ksh.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithModule.d.ksh.out new file mode 100644 index 00000000..8975980f --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithModule.d.ksh.out @@ -0,0 +1 @@ +Done chilling diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithName.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithName.d.ksh new file mode 100755 index 00000000..b21903fb --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithName.d.ksh @@ -0,0 +1,54 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# The -w option can be used to permit destructive actions in D programs. +# +# SECTION: dtrace Utility/-w Option; +# dtrace Utility/-n Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -qwn BEGIN'{chill(15); printf("Done chilling"); exit(0);}' +status=$? + +if [ "$status" -ne 0 ]; then + echo $tst: dtrace failed +fi + +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithName.d.ksh.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithName.d.ksh.out new file mode 100644 index 00000000..8975980f --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithName.d.ksh.out @@ -0,0 +1 @@ +Done chilling diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithProvider.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithProvider.d.ksh new file mode 100755 index 00000000..09dafecb --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithProvider.d.ksh @@ -0,0 +1,54 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# The -w option can be used to permit destructive actions in D programs. +# +# SECTION: dtrace Utility/-w Option; +# dtrace Utility/-P Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -qwP syscall'{chill(15); printf("Done chilling"); exit(0);}' +status=$? + +if [ "$status" -ne 0 ]; then + echo $tst: dtrace failed +fi + +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithProvider.d.ksh.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithProvider.d.ksh.out new file mode 100644 index 00000000..8975980f --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithProvider.d.ksh.out @@ -0,0 +1 @@ +Done chilling diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithoutW.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithoutW.d.ksh new file mode 100755 index 00000000..9f051b4c --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithoutW.d.ksh @@ -0,0 +1,55 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# Destructive actions will not compile or are not enabled without the +# -w option in D programs. +# +# SECTION: dtrace Utility/-w Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -qP syscall'{chill(15); printf("Done chilling"); exit(0);}' +status=$? + +if [ "$status" -ne 0 ]; then + exit 0 +fi + +echo $tst: dtrace failed +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ELFGenerationOut.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ELFGenerationOut.d.ksh new file mode 100755 index 00000000..b68fc138 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ELFGenerationOut.d.ksh @@ -0,0 +1,73 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# Using -G option with dtrace utility produces an ELF file containing a +# DTrace program. If the filename used with the -s option does not end +# with .d, and the -o option is not used, then the output ELF file is +# in d.out. +# +# SECTION: dtrace Utility/-G Option +# +## + +script() +{ + $dtrace -G -s /dev/stdin <' + exit 2 +fi + +dtrace=$1 +script +status=$? + +if [ "$status" -ne 0 ]; then + echo $tst: dtrace failed + exit $status +fi + +if [ ! -a "d.out" ]; then + echo $tst: file not generated + exit 1 +fi + +/usr/bin/rm -f "d.out" +exit 0 diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ELFGenerationWithO.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ELFGenerationWithO.d.ksh new file mode 100755 index 00000000..ec38b502 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ELFGenerationWithO.d.ksh @@ -0,0 +1,74 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# Using -G option with dtrace utility produces an ELF file containing a +# DTrace program. The output file can be named as required using the +# -o option in conjunction with the -G option. +# +# SECTION: dtrace Utility/-G Option; +# dtrace Utility/-o Option +# +## + +script() +{ + $dtrace -G -o outputFile -s /dev/stdin <' + exit 2 +fi + +dtrace=$1 + +script +status=$? + +if [ "$status" -ne 0 ]; then + echo $tst: dtrace failed + exit $status +fi + +if [ ! -a "outputFile" ]; then + echo $tst: file not generated + exit 1 +fi + +/usr/bin/rm -f "outputFile" +exit 0 diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ExitStatus1.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ExitStatus1.d.ksh new file mode 100755 index 00000000..70a9f498 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ExitStatus1.d.ksh @@ -0,0 +1,56 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# When a fatal error occurs such that the program compilation fails or the +# specified request cannot be satisfied, an exit status of 1 is returned. +# +# +# SECTION: dtrace Utility/Exit Status +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -s wassup +status=$? + +if [ "$status" -ne 1 ]; then + echo $tst: dtrace failed + exit 1 +fi + +exit 0 diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ExitStatus2.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ExitStatus2.d.ksh new file mode 100755 index 00000000..a058d3a3 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ExitStatus2.d.ksh @@ -0,0 +1,55 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# When invalid command line options or arguments are specified an exit status +# of 2 is returned. +# +# SECTION: dtrace Utility/Exit Status +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -9 +status=$? + +if [ "$status" -ne 2 ]; then + echo $tst: dtrace failed + exit 1 +fi + +exit 0 diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ExtraneousProbeIds.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ExtraneousProbeIds.d.ksh new file mode 100755 index 00000000..090fc4a0 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ExtraneousProbeIds.d.ksh @@ -0,0 +1,53 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# Testing -i option with extraneous probe identifiers. +# +# SECTION: dtrace Utility/-i Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -i 12 10 -i 23 + +if [ $? -ne 1 ]; then + echo $tst: dtrace failed + exit 1 +fi + +exit 0 diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidFuncName1.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidFuncName1.d.ksh new file mode 100755 index 00000000..c28c7823 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidFuncName1.d.ksh @@ -0,0 +1,53 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# Testing -f option with an invalid function name. +# +# SECTION: dtrace Utility/-f Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -f BEGIN + +if [ $? -ne 1 ]; then + echo $tst: dtrace failed + exit 1 +fi + +exit 0 diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidFuncName2.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidFuncName2.d.ksh new file mode 100755 index 00000000..d431579d --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidFuncName2.d.ksh @@ -0,0 +1,53 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# Testing -f option with an invalid function name. +# +# SECTION: dtrace Utility/-f Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -f 4.56 + +if [ $? -ne 1 ]; then + echo $tst: dtrace failed + exit 1 +fi + +exit 0 diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidId1.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidId1.d.ksh new file mode 100755 index 00000000..814b88dd --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidId1.d.ksh @@ -0,0 +1,59 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# The -li option can be used to list the probes from their ids. An id of +# negative integer is invalid +# +# SECTION: dtrace Utility/-l Option; +# dtrace Utility/-i Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -li -3 + +status=$? + +echo $status + +if [ "$status" -ne 0 ]; then + exit 0 +fi + +echo $tst: dtrace failed +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidId2.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidId2.d.ksh new file mode 100755 index 00000000..f9f44078 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidId2.d.ksh @@ -0,0 +1,59 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# The -li option can be used to list the probes from their ids. A +# non-increasing range will not list any probes. +# +# SECTION: dtrace Utility/-l Option; +# dtrace Utility/-i Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -li 4-2 + +status=$? + +echo $status + +if [ "$status" -ne 0 ]; then + exit 0 +fi + +echo $tst: dtrace failed +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidId3.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidId3.d.ksh new file mode 100755 index 00000000..efb03ae2 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidId3.d.ksh @@ -0,0 +1,59 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# The -li option can be used to list the probes from their ids. A +# non-increasing range will not list any probes. +# +# SECTION: dtrace Utility/-l Option; +# dtrace Utility/-i Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -li 2-2 + +status=$? + +echo $status + +if [ "$status" -ne 0 ]; then + exit 0 +fi + +echo $tst: dtrace failed +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidModule1.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidModule1.d.ksh new file mode 100755 index 00000000..a896ff3d --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidModule1.d.ksh @@ -0,0 +1,59 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# The -lm option can be used to list the probes from their module names. +# Invalid module names result in error. +# +# SECTION: dtrace Utility/-l Option; +# dtrace Utility/-m Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -lm :genunix:: + +status=$? + +echo $status + +if [ "$status" -ne 0 ]; then + exit 0 +fi + +echo $tst: dtrace failed +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidModule2.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidModule2.d.ksh new file mode 100755 index 00000000..820cc64d --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidModule2.d.ksh @@ -0,0 +1,59 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# The -lm option can be used to list the probes from their module names. +# Invalid module names result in error. +# +# SECTION: dtrace Utility/-l Option; +# dtrace Utility/-m Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -lm profile:::profile-97 + +status=$? + +echo $status + +if [ "$status" -ne 0 ]; then + exit 0 +fi + +echo $tst: dtrace failed +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidModule3.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidModule3.d.ksh new file mode 100755 index 00000000..b56e6c37 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidModule3.d.ksh @@ -0,0 +1,59 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# The -lm option can be used to list the probes from their module names. +# Invalid module names result in error. +# +# SECTION: dtrace Utility/-l Option; +# dtrace Utility/-m Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -lm fbt:des:des3_crunch_block:return + +status=$? + +echo $status + +if [ "$status" -ne 0 ]; then + exit 0 +fi + +echo $tst: dtrace failed +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidModule4.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidModule4.d.ksh new file mode 100755 index 00000000..0ef9d956 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidModule4.d.ksh @@ -0,0 +1,59 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# The -lm option can be used to list the probes from their module names. +# Invalid module names result in error. +# +# SECTION: dtrace Utility/-l Option; +# dtrace Utility/-m Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -lm unix'/probefunc == "preempt"/{printf("FOUND");}' + +status=$? + +echo $status + +if [ "$status" -ne 0 ]; then + exit 0 +fi + +echo $tst: dtrace failed +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidProbeIdentifier.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidProbeIdentifier.d.ksh new file mode 100755 index 00000000..66e0e1a5 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidProbeIdentifier.d.ksh @@ -0,0 +1,53 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# Testing -i option with invalid probe identifier. +# +# SECTION: dtrace Utility/-i Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -i i23 + +if [ $? -ne 1 ]; then + echo $tst: dtrace failed + exit 1 +fi + +exit 0 diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidProvider1.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidProvider1.d.ksh new file mode 100755 index 00000000..327e2d01 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidProvider1.d.ksh @@ -0,0 +1,59 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# The -lP option can be used to list the probes from their provider names. +# Invalid module names result in error. +# +# SECTION: dtrace Utility/-l Option; +# dtrace Utility/-P Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -lP profile:::profile-97 + +status=$? + +echo $status + +if [ "$status" -ne 0 ]; then + exit 0 +fi + +echo $tst: dtrace failed +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidProvider2.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidProvider2.d.ksh new file mode 100755 index 00000000..22624495 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidProvider2.d.ksh @@ -0,0 +1,59 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# The -lP option can be used to list the probes from their provider names. +# Invalid module names result in error. +# +# SECTION: dtrace Utility/-l Option; +# dtrace Utility/-P Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -lP profile::: + +status=$? + +echo $status + +if [ "$status" -ne 0 ]; then + exit 0 +fi + +echo $tst: dtrace failed +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidProvider3.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidProvider3.d.ksh new file mode 100755 index 00000000..775b327c --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidProvider3.d.ksh @@ -0,0 +1,59 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# The -lP option can be used to list the probes from their provider names. +# Invalid module names result in error. +# +# SECTION: dtrace Utility/-l Option; +# dtrace Utility/-P Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -lP fbt:des:des3_crunch_block:return + +status=$? + +echo $status + +if [ "$status" -ne 0 ]; then + exit 0 +fi + +echo $tst: dtrace failed +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidProvider4.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidProvider4.d.ksh new file mode 100755 index 00000000..04343f3e --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidProvider4.d.ksh @@ -0,0 +1,59 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# The -lP option can be used to list the probes from their provider names. +# Invalid module names result in error. +# +# SECTION: dtrace Utility/-l Option; +# dtrace Utility/-P Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -lP profile'/probename == "profile-199"/{printf("FOUND");}' + +status=$? + +echo $status + +if [ "$status" -ne 0 ]; then + exit 0 +fi + +echo $tst: dtrace failed +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceFunc1.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceFunc1.d.ksh new file mode 100755 index 00000000..1395f3be --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceFunc1.d.ksh @@ -0,0 +1,53 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# Testing -f option with an invalid function name. +# +# SECTION: dtrace Utility/-f Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -f profile + +if [ $? -ne 1 ]; then + echo $tst: dtrace failed + exit 1 +fi + +exit 0 diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceFunc2.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceFunc2.d.ksh new file mode 100755 index 00000000..4231e5c7 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceFunc2.d.ksh @@ -0,0 +1,53 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# Testing -f option with an invalid function name. +# +# SECTION: dtrace Utility/-f Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -f genunix + +if [ $? -ne 1 ]; then + echo $tst: dtrace failed + exit 1 +fi + +exit 0 diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceFunc3.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceFunc3.d.ksh new file mode 100755 index 00000000..3c5b1783 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceFunc3.d.ksh @@ -0,0 +1,53 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# Testing -f option with an invalid function name. +# +# SECTION: dtrace Utility/-f Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -f read: + +if [ $? -ne 1 ]; then + echo $tst: dtrace failed + exit 1 +fi + +exit 0 diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceFunc4.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceFunc4.d.ksh new file mode 100755 index 00000000..bb8460d0 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceFunc4.d.ksh @@ -0,0 +1,53 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# Testing -f option with an invalid function name. +# +# SECTION: dtrace Utility/-f Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -f ::read: + +if [ $? -ne 1 ]; then + echo $tst: dtrace failed + exit 1 +fi + +exit 0 diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceFunc5.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceFunc5.d.ksh new file mode 100755 index 00000000..54466761 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceFunc5.d.ksh @@ -0,0 +1,53 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# Testing -f option with an invalid function name. +# +# SECTION: dtrace Utility/-f Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -f :genunix:: + +if [ $? -ne 1 ]; then + echo $tst: dtrace failed + exit 1 +fi + +exit 0 diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceFunc6.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceFunc6.d.ksh new file mode 100755 index 00000000..645e6d9f --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceFunc6.d.ksh @@ -0,0 +1,53 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# Testing -f option with an invalid function name. +# +# SECTION: dtrace Utility/-f Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -f profile:::profile-97 + +if [ $? -ne 1 ]; then + echo $tst: dtrace failed + exit 1 +fi + +exit 0 diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceFunc7.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceFunc7.d.ksh new file mode 100755 index 00000000..a93d5c4b --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceFunc7.d.ksh @@ -0,0 +1,53 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# Testing -f option with an invalid function name. +# +# SECTION: dtrace Utility/-f Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -f fbt:des:des3_crunch_block:return + +if [ $? -ne 1 ]; then + echo $tst: dtrace failed + exit 1 +fi + +exit 0 diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceFunc8.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceFunc8.d.ksh new file mode 100755 index 00000000..22ab3b16 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceFunc8.d.ksh @@ -0,0 +1,53 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# Testing -f option with an invalid function name. +# +# SECTION: dtrace Utility/-f Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -f fight -f write + +if [ $? -ne 1 ]; then + echo $tst: dtrace failed + exit 1 +fi + +exit 0 diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceFunc9.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceFunc9.d.ksh new file mode 100755 index 00000000..2af27a32 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceFunc9.d.ksh @@ -0,0 +1,53 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# Testing -f option with an invalid function name. +# +# SECTION: dtrace Utility/-f Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -f read '{printf("FOUND");}' + +if [ $? -ne 1 ]; then + echo $tst: dtrace failed + exit 1 +fi + +exit 0 diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceID1.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceID1.d.ksh new file mode 100755 index 00000000..46096d21 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceID1.d.ksh @@ -0,0 +1,58 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# The -i option can be used to enable the trace of probes from their ids. A +# non-increasing range will not list any probes. +# +# SECTION: dtrace Utility/-i Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -i 0 + +status=$? + +echo $status + +if [ "$status" -ne 0 ]; then + exit 0 +fi + +echo $tst: dtrace failed +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceID2.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceID2.d.ksh new file mode 100755 index 00000000..f406ce00 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceID2.d.ksh @@ -0,0 +1,58 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# The -i option can be used to enable the trace of probes from their ids. A +# non-increasing range will not list any probes. +# +# SECTION: dtrace Utility/-i Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -i -3 + +status=$? + +echo $status + +if [ "$status" -ne 0 ]; then + exit 0 +fi + +echo $tst: dtrace failed +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceID3.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceID3.d.ksh new file mode 100755 index 00000000..fc2a24d5 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceID3.d.ksh @@ -0,0 +1,58 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# The -i option can be used to enable the trace of probes from their ids. A +# non-increasing range will not list any probes. +# +# SECTION: dtrace Utility/-i Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -i 0-2 + +status=$? + +echo $status + +if [ "$status" -ne 0 ]; then + exit 0 +fi + +echo $tst: dtrace failed +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceID4.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceID4.d.ksh new file mode 100755 index 00000000..5fd6fd6c --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceID4.d.ksh @@ -0,0 +1,58 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# The -i option can be used to enable the trace of probes from their ids. A +# non-increasing range will not list any probes. +# +# SECTION: dtrace Utility/-i Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -i 4-2 + +status=$? + +echo $status + +if [ "$status" -ne 0 ]; then + exit 0 +fi + +echo $tst: dtrace failed +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceID5.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceID5.d.ksh new file mode 100755 index 00000000..0ac46dbb --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceID5.d.ksh @@ -0,0 +1,58 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# The -i option can be used to enable the trace of probes from their ids. A +# non-increasing range will not list any probes. +# +# SECTION: dtrace Utility/-i Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -i 2-2 + +status=$? + +echo $status + +if [ "$status" -ne 0 ]; then + exit 0 +fi + +echo $tst: dtrace failed +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceID6.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceID6.d.ksh new file mode 100755 index 00000000..778d485a --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceID6.d.ksh @@ -0,0 +1,58 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# The -i option can be used to enable the trace of probes from their ids. A +# non-increasing range will not list any probes. +# +# SECTION: dtrace Utility/-i Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -i 1 2 3 4 + +status=$? + +echo $status + +if [ "$status" -ne 0 ]; then + exit 0 +fi + +echo $tst: dtrace failed +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceID7.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceID7.d.ksh new file mode 100755 index 00000000..8a0f2d4e --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceID7.d.ksh @@ -0,0 +1,58 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# The -i option can be used to enable the trace of probes from their ids. A +# non-increasing range will not list any probes. +# +# SECTION: dtrace Utility/-i Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -i 0 - 2 + +status=$? + +echo $status + +if [ "$status" -ne 0 ]; then + exit 0 +fi + +echo $tst: dtrace failed +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceModule1.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceModule1.d.ksh new file mode 100755 index 00000000..56dee0dd --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceModule1.d.ksh @@ -0,0 +1,58 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# The -m option can be used to enable the probes from their module names. +# Invalid module names result in error. +# +# SECTION: dtrace Utility/-m Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -m profile + +status=$? + +echo $status + +if [ "$status" -ne 0 ]; then + exit 0 +fi + +echo $tst: dtrace failed +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceModule2.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceModule2.d.ksh new file mode 100755 index 00000000..a508fe10 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceModule2.d.ksh @@ -0,0 +1,58 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# The -m option can be used to enable the probes from their module names. +# Invalid module names result in error. +# +# SECTION: dtrace Utility/-m Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -m :genunix:: + +status=$? + +echo $status + +if [ "$status" -ne 0 ]; then + exit 0 +fi + +echo $tst: dtrace failed +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceModule3.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceModule3.d.ksh new file mode 100755 index 00000000..599ce93e --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceModule3.d.ksh @@ -0,0 +1,58 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# The -m option can be used to enable the probes from their module names. +# Invalid module names result in error. +# +# SECTION: dtrace Utility/-m Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -m genunix:: + +status=$? + +echo $status + +if [ "$status" -ne 0 ]; then + exit 0 +fi + +echo $tst: dtrace failed +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceModule4.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceModule4.d.ksh new file mode 100755 index 00000000..e0e87861 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceModule4.d.ksh @@ -0,0 +1,58 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# The -m option can be used to enable the probes from their module names. +# Invalid module names result in error. +# +# SECTION: dtrace Utility/-m Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -m profile:::profile-97 + +status=$? + +echo $status + +if [ "$status" -ne 0 ]; then + exit 0 +fi + +echo $tst: dtrace failed +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceModule5.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceModule5.d.ksh new file mode 100755 index 00000000..85830602 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceModule5.d.ksh @@ -0,0 +1,58 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# The -m option can be used to enable the probes from their module names. +# Invalid module names result in error. +# +# SECTION: dtrace Utility/-m Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -m foounix -m unix + +status=$? + +echo $status + +if [ "$status" -ne 0 ]; then + exit 0 +fi + +echo $tst: dtrace failed +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceModule6.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceModule6.d.ksh new file mode 100755 index 00000000..6125fb0f --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceModule6.d.ksh @@ -0,0 +1,58 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# The -m option can be used to enable the probes from their module names. +# Invalid module names result in error. +# +# SECTION: dtrace Utility/-m Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -m fbt:des:des3_crunch_block:return + +status=$? + +echo $status + +if [ "$status" -ne 0 ]; then + exit 0 +fi + +echo $tst: dtrace failed +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceModule7.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceModule7.d.ksh new file mode 100755 index 00000000..e689627b --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceModule7.d.ksh @@ -0,0 +1,58 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# The -m option can be used to enable the probes from their module names. +# Invalid module names result in error. +# +# SECTION: dtrace Utility/-m Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -m genunix::'{printf("FOUND");}' + +status=$? + +echo $status + +if [ "$status" -ne 0 ]; then + exit 0 +fi + +echo $tst: dtrace failed +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceModule8.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceModule8.d.ksh new file mode 100755 index 00000000..692821b5 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceModule8.d.ksh @@ -0,0 +1,58 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# The -m option can be used to enable the probes from their module names. +# Invalid module names result in error. +# +# SECTION: dtrace Utility/-m Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -m genunix:'{printf("FOUND");}' + +status=$? + +echo $status + +if [ "$status" -ne 0 ]; then + exit 0 +fi + +echo $tst: dtrace failed +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceName1.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceName1.d.ksh new file mode 100755 index 00000000..43c61af3 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceName1.d.ksh @@ -0,0 +1,57 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# The -n option can be used to enable the trace of probes from their names. +# +# SECTION: dtrace Utility/-n Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -n profile + +status=$? + +echo $status + +if [ "$status" -ne 0 ]; then + exit 0 +fi + +echo $tst: dtrace failed +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceName2.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceName2.d.ksh new file mode 100755 index 00000000..70a52188 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceName2.d.ksh @@ -0,0 +1,57 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# The -n option can be used to enable the trace of probes from their names. +# +# SECTION: dtrace Utility/-n Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -n genunix + +status=$? + +echo $status + +if [ "$status" -ne 0 ]; then + exit 0 +fi + +echo $tst: dtrace failed +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceName3.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceName3.d.ksh new file mode 100755 index 00000000..efb5ad08 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceName3.d.ksh @@ -0,0 +1,57 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# The -n option can be used to enable the trace of probes from their names. +# +# SECTION: dtrace Utility/-n Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -n not_a_valid_probe + +status=$? + +echo $status + +if [ "$status" -ne 0 ]; then + exit 0 +fi + +echo $tst: dtrace failed +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceName4.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceName4.d.ksh new file mode 100755 index 00000000..04845b99 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceName4.d.ksh @@ -0,0 +1,57 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# The -n option can be used to enable the trace of probes from their names. +# +# SECTION: dtrace Utility/-n Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -n begin + +status=$? + +echo $status + +if [ "$status" -ne 0 ]; then + exit 0 +fi + +echo $tst: dtrace failed +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceName5.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceName5.d.ksh new file mode 100755 index 00000000..df17231f --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceName5.d.ksh @@ -0,0 +1,57 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# The -n option can be used to enable the trace of probes from their names. +# +# SECTION: dtrace Utility/-n Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -n genunix:read + +status=$? + +echo $status + +if [ "$status" -ne 0 ]; then + exit 0 +fi + +echo $tst: dtrace failed +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceName6.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceName6.d.ksh new file mode 100755 index 00000000..10f13cb3 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceName6.d.ksh @@ -0,0 +1,57 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# The -n option can be used to enable the trace of probes from their names. +# +# SECTION: dtrace Utility/-n Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -n sysinfo:genunix:read + +status=$? + +echo $status + +if [ "$status" -ne 0 ]; then + exit 0 +fi + +echo $tst: dtrace failed +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceName7.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceName7.d.ksh new file mode 100755 index 00000000..b22561fa --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceName7.d.ksh @@ -0,0 +1,57 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# The -n option can be used to enable the trace of probes from their names. +# +# SECTION: dtrace Utility/-n Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -n :genunix: + +status=$? + +echo $status + +if [ "$status" -ne 0 ]; then + exit 0 +fi + +echo $tst: dtrace failed +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceName8.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceName8.d.ksh new file mode 100755 index 00000000..f66055e2 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceName8.d.ksh @@ -0,0 +1,57 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# The -n option can be used to enable the trace of probes from their names. +# +# SECTION: dtrace Utility/-n Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -n fight: -n write: + +status=$? + +echo $status + +if [ "$status" -ne 0 ]; then + exit 0 +fi + +echo $tst: dtrace failed +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceName9.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceName9.d.ksh new file mode 100755 index 00000000..a4239ff9 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceName9.d.ksh @@ -0,0 +1,57 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# The -n option can be used to enable the trace of probes from their names. +# +# SECTION: dtrace Utility/-n Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -n BEGIN '{printf("FOUND");}' + +status=$? + +echo $status + +if [ "$status" -ne 0 ]; then + exit 0 +fi + +echo $tst: dtrace failed +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceProvider1.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceProvider1.d.ksh new file mode 100755 index 00000000..0a792c59 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceProvider1.d.ksh @@ -0,0 +1,58 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# The -P option can be used to list the probes from their provider names. +# Invalid module names result in error. +# +# SECTION: dtrace Utility/-P Option; +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -P foofile + +status=$? + +echo $status + +if [ "$status" -ne 0 ]; then + exit 0 +fi + +echo $tst: dtrace failed +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceProvider2.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceProvider2.d.ksh new file mode 100755 index 00000000..1763142b --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceProvider2.d.ksh @@ -0,0 +1,58 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# The -P option can be used to list the probes from their provider names. +# Invalid module names result in error. +# +# SECTION: dtrace Utility/-P Option; +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -P profile::: + +status=$? + +echo $status + +if [ "$status" -ne 0 ]; then + exit 0 +fi + +echo $tst: dtrace failed +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceProvider3.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceProvider3.d.ksh new file mode 100755 index 00000000..a8549329 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceProvider3.d.ksh @@ -0,0 +1,58 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# The -P option can be used to list the probes from their provider names. +# Invalid module names result in error. +# +# SECTION: dtrace Utility/-P Option; +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -P profile:::profile-97 + +status=$? + +echo $status + +if [ "$status" -ne 0 ]; then + exit 0 +fi + +echo $tst: dtrace failed +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceProvider4.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceProvider4.d.ksh new file mode 100755 index 00000000..f8a1359c --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceProvider4.d.ksh @@ -0,0 +1,58 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# The -P option can be used to list the probes from their provider names. +# Invalid module names result in error. +# +# SECTION: dtrace Utility/-P Option; +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -P fbt:des:des3_crunch_block:return + +status=$? + +echo $status + +if [ "$status" -ne 0 ]; then + exit 0 +fi + +echo $tst: dtrace failed +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceProvider5.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceProvider5.d.ksh new file mode 100755 index 00000000..cec4297c --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.InvalidTraceProvider5.d.ksh @@ -0,0 +1,58 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# The -P option can be used to list the probes from their provider names. +# Invalid module names result in error. +# +# SECTION: dtrace Utility/-P Option; +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -P profile '{printf("FOUND");}' + +status=$? + +echo $status + +if [ "$status" -ne 0 ]; then + exit 0 +fi + +echo $tst: dtrace failed +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.MultipleInvalidProbeId.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.MultipleInvalidProbeId.d.ksh new file mode 100755 index 00000000..8f2ceefd --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.MultipleInvalidProbeId.d.ksh @@ -0,0 +1,53 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# Testing -i option with multiple valid and invalid probe identifiers. +# +# SECTION: dtrace Utility/-i Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -i 12 -i 10 -i 0 + +if [ $? -ne 1 ]; then + echo $tst: dtrace failed + exit 1 +fi + +exit 0 diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.PreprocessorStatement.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.PreprocessorStatement.d.ksh new file mode 100755 index 00000000..182466f4 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.PreprocessorStatement.d.ksh @@ -0,0 +1,70 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# The -C option is used to run the C preprocessor over D programs before +# compiling them. The -H option used in conjuction with the -C option +# lists the pathnames of the included files to STDERR. +# +# SECTION: dtrace Utility/-C Option; +# dtrace Utility/-H Option +# +## + +script() +{ + $dtrace -CH -s /dev/stdin < + + BEGIN + { + printf("This test should compile\n"); + exit(0); + } +EOF +} + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +script +status=$? + +if [ "$status" -ne 0 ]; then + echo $tst: dtrace failed +fi + +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.QuietMode.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.QuietMode.d.ksh new file mode 100755 index 00000000..4bfbf767 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.QuietMode.d.ksh @@ -0,0 +1,65 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# Using the -q option suppresses the dtrace messages and prints only the +# data traced by trace() and printf() to stdout. +# +# SECTION: dtrace Utility/-q Option +# +## + +script() +{ + $dtrace -q -s /dev/stdin <' + exit 2 +fi + +dtrace=$1 +script +status=$? + +if [ "$status" -ne 0 ]; then + echo $tst: dtrace failed +fi + +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.QuietMode.d.ksh.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.QuietMode.d.ksh.out new file mode 100644 index 00000000..20e31b50 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.QuietMode.d.ksh.out @@ -0,0 +1 @@ +I am the only one. diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.TestCompile.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.TestCompile.d.ksh new file mode 100755 index 00000000..16cd05f9 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.TestCompile.d.ksh @@ -0,0 +1,67 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# Using the -e option exits after compiling any requests but before +# enabling probes. +# +# SECTION: dtrace Utility/-e Option +# +## + +script() +{ + $dtrace -e -s /dev/stdin <' + exit 2 +fi + +dtrace=$1 + +script +status=$? + +if [ "$status" -ne 0 ]; then + echo $tst: dtrace failed +fi + +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.TestCompile.d.ksh.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.TestCompile.d.ksh.out new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.UnDefineNameWithCPP.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.UnDefineNameWithCPP.d.ksh new file mode 100755 index 00000000..4c1eb507 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.UnDefineNameWithCPP.d.ksh @@ -0,0 +1,71 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# The -D option can be used to define a name when used in conjunction +# with the -C option. The -U option can be used to undefine a name in +# conjunction with the -C option. +# +# SECTION: dtrace Utility/-C Option; +# dtrace Utility/-D Option; +# dtrace Utility/-U Option +# +## + +script() +{ + $dtrace -C -D VALUE=40 -U VALUE -s /dev/stdin <' + exit 2 +fi + +dtrace=$1 + +script +status=$? + +if [ "$status" -ne 0 ]; then + exit 0 +fi + +echo $tst: dtrace failed +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ZeroFunctionProbes.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ZeroFunctionProbes.d.ksh new file mode 100755 index 00000000..5e61f053 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ZeroFunctionProbes.d.ksh @@ -0,0 +1,58 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# The -Z option can be used to permit descriptions that match +# zero probes. +# +# SECTION: dtrace Utility/-Z Option; +# dtrace Utility/-f Option +# +## + + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -qZf wassup'{printf("Iamkool");}' \ +-qf read'{printf("I am done"); exit(0);}' + +status=$? + +if [ "$status" -ne 0 ]; then + echo $tst: dtrace failed +fi + +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ZeroFunctionProbes.d.ksh.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ZeroFunctionProbes.d.ksh.out new file mode 100644 index 00000000..0f2e1aac --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ZeroFunctionProbes.d.ksh.out @@ -0,0 +1 @@ +I am done diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ZeroModuleProbes.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ZeroModuleProbes.d.ksh new file mode 100755 index 00000000..9d48f99b --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ZeroModuleProbes.d.ksh @@ -0,0 +1,57 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# The -Z option can be used to permit descriptions that match +# zero probes. +# +# SECTION: dtrace Utility/-Z Option; +# dtrace Utility/-m Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -qZm wassup'{printf("Iamkool");}' \ +-qm unix'{printf("I am done"); exit(0);}' + +status=$? + +if [ "$status" -ne 0 ]; then + echo $tst: dtrace failed +fi + +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ZeroModuleProbes.d.ksh.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ZeroModuleProbes.d.ksh.out new file mode 100644 index 00000000..0f2e1aac --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ZeroModuleProbes.d.ksh.out @@ -0,0 +1 @@ +I am done diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ZeroNameProbes.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ZeroNameProbes.d.ksh new file mode 100755 index 00000000..90175a50 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ZeroNameProbes.d.ksh @@ -0,0 +1,56 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# The -Z option can be used to permit descriptions that match +# zero probes. +# +# SECTION: dtrace Utility/-Z Option; +# dtrace Utility/-n Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -qZn wassup'{printf("Iamkool");}' \ +-qn BEGIN'{printf("I am done"); exit(0);}' +status=$? + +if [ "$status" -ne 0 ]; then + echo $tst: dtrace failed +fi + +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ZeroNameProbes.d.ksh.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ZeroNameProbes.d.ksh.out new file mode 100644 index 00000000..0f2e1aac --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ZeroNameProbes.d.ksh.out @@ -0,0 +1 @@ +I am done diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ZeroProbeIdentfier.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ZeroProbeIdentfier.d.ksh new file mode 100755 index 00000000..9af4d2b8 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ZeroProbeIdentfier.d.ksh @@ -0,0 +1,53 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# Testing -i option with zero probe identifier. +# +# SECTION: dtrace Utility/-i Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -i 0 + +if [ $? -ne 1 ]; then + echo $tst: dtrace failed + exit 1 +fi + +exit 0 diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ZeroProbesWithoutZ.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ZeroProbesWithoutZ.d.ksh new file mode 100755 index 00000000..afc7d76d --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ZeroProbesWithoutZ.d.ksh @@ -0,0 +1,57 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# Without the -Z option probe descriptions that do not match any known +# probes will cause an error or will not be enabled. +# +# SECTION: dtrace Utility/-Z Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -qP wassup'{printf("Iamkool");}' \ +-qP profile'{printf("I am done"); exit(0);}' + +status=$? + +if [ "$status" -ne 0 ]; then + exit 0 +fi + +echo $tst: dtrace failed +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ZeroProviderProbes.d.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ZeroProviderProbes.d.ksh new file mode 100755 index 00000000..f2646bd5 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ZeroProviderProbes.d.ksh @@ -0,0 +1,57 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +#ident "%Z%%M% %I% %E% SMI" + +## +# +# ASSERTION: +# The -Z option can be used to permit descriptions that match +# zero probes. +# +# SECTION: dtrace Utility/-Z Option; +# dtrace Utility/-P Option +# +## + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -qZP wassup'{printf("Iamkool");}' \ +-qP profile'{printf("I am done"); exit(0);}' + +status=$? + +if [ "$status" -ne 0 ]; then + echo $tst: dtrace failed +fi + +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ZeroProviderProbes.d.ksh.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ZeroProviderProbes.d.ksh.out new file mode 100644 index 00000000..0f2e1aac --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/dtraceUtil/tst.ZeroProviderProbes.d.ksh.out @@ -0,0 +1 @@ +I am done diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/end/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/end/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/end/err.D_IDENT_UNDEF.timespent.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/end/err.D_IDENT_UNDEF.timespent.d new file mode 100644 index 00000000..04ccb726 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/end/err.D_IDENT_UNDEF.timespent.d @@ -0,0 +1,49 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Calculate timestamp between BEGIN and END. + * + * SECTION: dtrace Provider + * + */ + + +#pragma D option quiet + +END +{ + total = timestamp - start; +} + +BEGIN +{ + start = timestamp; + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/end/tst.end.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/end/tst.end.d new file mode 100644 index 00000000..56c1a4c4 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/end/tst.end.d @@ -0,0 +1,55 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Sequence flow of END profile. + * + * SECTION: dtrace Provider + * + */ + + +#pragma D option quiet + +END +{ + printf("End fired after exit\n"); +} + +BEGIN +{ + printf("Begin fired first\n"); +} + +tick-1 +{ + printf("tick fired second\n"); + printf("Call exit\n"); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/end/tst.endwithoutbegin.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/end/tst.endwithoutbegin.d new file mode 100644 index 00000000..62919607 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/end/tst.endwithoutbegin.d @@ -0,0 +1,48 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * END without BEGIN profile + * + * SECTION: dtrace Provider + * + */ + + +#pragma D option quiet + +END +{ + printf("End fired after exit\n"); +} + +tick-1 +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/end/tst.multibeginend.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/end/tst.multibeginend.d new file mode 100644 index 00000000..4f6ec921 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/end/tst.multibeginend.d @@ -0,0 +1,77 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Tests multiple END profile. + * + * SECTION: dtrace Provider + * + */ + + +#pragma D option quiet + +END +{ + printf("End1 fired after exit\n"); +} +END +{ + printf("End2 fired after exit\n"); +} +END +{ + printf("End3 fired after exit\n"); +} +END +{ + printf("End4 fired after exit\n"); +} + +BEGIN +{ + printf("Begin fired first\n"); +} +BEGIN +{ + printf("Begin fired second\n"); +} +BEGIN +{ + printf("Begin fired third\n"); +} +BEGIN +{ + printf("Begin fired fourth\n"); +} +BEGIN +{ + printf("Begin fired fifth\n"); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/end/tst.multiend.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/end/tst.multiend.d new file mode 100644 index 00000000..e6629fb5 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/end/tst.multiend.d @@ -0,0 +1,61 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Tests Multiple END and single BEGIN + * + * SECTION: dtrace Provider + * + */ + + +#pragma D option quiet + +END +{ + printf("End1 fired after exit\n"); +} +END +{ + printf("End2 fired after exit\n"); +} +END +{ + printf("End3 fired after exit\n"); +} +END +{ + printf("End4 fired after exit\n"); +} + +BEGIN +{ + printf("Begin fired first\n"); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/enum/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/enum/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/enum/err.D_DECL_IDRED.EnumSameName.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/enum/err.D_DECL_IDRED.EnumSameName.d new file mode 100644 index 00000000..7e5427a5 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/enum/err.D_DECL_IDRED.EnumSameName.d @@ -0,0 +1,57 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +/* + * ASSERTION: + * Enumerations assigning same or different values to the same identifier in + * different enumerations should throw a compiler error. + * + * SECTION: Type and Constant Definitions/Enumerations + * + * + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma D option quiet + +enum colors { + RED, + GREEN, + BLUE +}; + +enum shades { + RED, + ORANGE, + GREEN, + WHITE +}; + +BEGIN +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/enum/err.D_UNKNOWN.RepeatIdentifiers.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/enum/err.D_UNKNOWN.RepeatIdentifiers.d new file mode 100644 index 00000000..2b4266d5 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/enum/err.D_UNKNOWN.RepeatIdentifiers.d @@ -0,0 +1,52 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +/* + * ASSERTION: + * Repeating the same identifier in the same enumeration will throw a compiler + * error. + * + * SECTION: Type and Constant Definitions/Enumerations + * + * NOTES: + * + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma D option quiet + +enum colors { + RED, + GREEN, + GREEN = 2, + BLUE +}; + +BEGIN +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/enum/tst.EnumEquality.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/enum/tst.EnumEquality.d new file mode 100644 index 00000000..cbf9369a --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/enum/tst.EnumEquality.d @@ -0,0 +1,56 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Test the identifiers in different D enumerations at same position for + * equality. + * + * SECTION: Type and Constant Definitions/Enumerations + */ + +#pragma D option quiet + +enum colors { + RED, + GREEN, + BLUE +}; + +enum shades { + WHITE, + BLACK, + YELLOW +}; + + +profile:::tick-1sec +/(WHITE == RED) && (YELLOW == BLUE) && (GREEN == BLACK)/ +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/enum/tst.EnumSameValue.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/enum/tst.EnumSameValue.d new file mode 100644 index 00000000..26a4d504 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/enum/tst.EnumSameValue.d @@ -0,0 +1,51 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +/* + * ASSERTION: + * Enumerations assigning the same value to different identifiers in the same + * enumeration should work okay. + * + * SECTION: Type and Constant Definitions/Enumerations + * + * NOTES: + * + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma D option quiet + +enum colors { + RED = 2, + GREEN = 2, + BLUE = 2 +}; + +BEGIN +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/enum/tst.EnumValAssign.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/enum/tst.EnumValAssign.d new file mode 100644 index 00000000..f721c50a --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/enum/tst.EnumValAssign.d @@ -0,0 +1,57 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +/* + * ASSERTION: + * Test the D enumerations with and without initilialization of the identifiers. + * Also test for values with negative integer assignments, expressions and + * fractions. + * + * SECTION: Type and Constant Definitions/Enumerations + * + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma D option quiet + +enum colors { + RED, + ORANGE = 5 + 5, + YELLOW = 2, + GREEN, + BLUE = GREEN + ORANGE, + PINK = 5/4, + INDIGO = -2, + VIOLET +}; + +profile:::tick-1sec +/(0 == RED) && (10 == ORANGE) && (2 == YELLOW) && (3 == GREEN) && + (13 == BLUE) && (1 == PINK) && (-2 == INDIGO) && (-1 == VIOLET)/ +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/error/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/error/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/error/tst.DTRACEFLT_BADADDR.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/error/tst.DTRACEFLT_BADADDR.d new file mode 100644 index 00000000..5eb3e94c --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/error/tst.DTRACEFLT_BADADDR.d @@ -0,0 +1,51 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * To test DTRACEFLT_BADADDR error + * + * SECTION: dtrace Provider + * + */ + + +#pragma D option quiet + +ERROR +{ + printf("The arguments are %u %u %u %u %u\n", + arg1, arg2, arg3, arg4, arg5); + printf("The value of arg4 = %u\n", DTRACEFLT_BADADDR); + exit(0); +} + +BEGIN +{ + *(char *)NULL; +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/error/tst.DTRACEFLT_DIVZERO.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/error/tst.DTRACEFLT_DIVZERO.d new file mode 100644 index 00000000..5b93168a --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/error/tst.DTRACEFLT_DIVZERO.d @@ -0,0 +1,54 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * To test DTRACEFLT_DIVZERO error + * + * SECTION: dtrace Provider + * + */ + + +#pragma D option quiet + +ERROR +{ + printf("The arguments are %u %u %u %d %u\n", + arg1, arg2, arg3, arg4, arg5); + exit(0); +} + +char *s; + +BEGIN +{ + i = 1; + j = 2; + j = i/(j-2); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/error/tst.DTRACEFLT_UNKNOWN.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/error/tst.DTRACEFLT_UNKNOWN.d new file mode 100644 index 00000000..6de75bbc --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/error/tst.DTRACEFLT_UNKNOWN.d @@ -0,0 +1,53 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * To test DTRACEFLT_UNKNOWN error + * + * SECTION: dtrace Provider + * + */ + + +#pragma D option quiet + +ERROR +{ + printf("The arguments are %u %u %u %u %u\n", + arg1, arg2, arg3, arg4, arg5); + printf("The value of arg4 = %u\n", DTRACEFLT_UNKNOWN); + exit(0); +} + +BEGIN +{ + x = (int *) 64; + y = *x; + trace(y); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/error/tst.error.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/error/tst.error.d new file mode 100644 index 00000000..3b1d6539 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/error/tst.error.d @@ -0,0 +1,49 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * To fire ERROR probe + * + * SECTION: dtrace Provider + * + */ + + +#pragma D option quiet + +ERROR +{ + printf("Error fired\n"); + exit(0); +} + +BEGIN +{ + *(char *)NULL; +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/error/tst.errorend.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/error/tst.errorend.d new file mode 100644 index 00000000..0bb4a6ef --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/error/tst.errorend.d @@ -0,0 +1,54 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Flow of ERROR probe + * + * SECTION: dtrace Provider + * + */ + + +#pragma D option quiet + +ERROR +{ + printf("Error fired\n"); + exit(0); +} + +END +{ + printf("End fired after exit\n"); +} + +BEGIN +{ + *(char *)NULL; +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/exit/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/exit/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/exit/err.D_PROTO_LEN.noarg.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/exit/err.D_PROTO_LEN.noarg.d new file mode 100644 index 00000000..9a9a8f93 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/exit/err.D_PROTO_LEN.noarg.d @@ -0,0 +1,42 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * Call exit() without arguments. + * + * SECTION: Actions and Subroutines/exit() + */ + +#pragma D option quiet + +dtrace:::BEGIN +{ + exit() +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/exit/err.exitarg1.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/exit/err.exitarg1.d new file mode 100644 index 00000000..d3067d12 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/exit/err.exitarg1.d @@ -0,0 +1,42 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * Basic test - call with 1 + * + * SECTION: Actions and Subroutines/exit() + */ + +#pragma D option quiet + +dtrace:::BEGIN +{ + exit(1); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/exit/tst.basic1.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/exit/tst.basic1.d new file mode 100644 index 00000000..24f841c3 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/exit/tst.basic1.d @@ -0,0 +1,42 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Positive test + * + * SECTION: Actions and Subroutines/exit() + */ + + +#pragma D option quiet + +dtrace:::BEGIN +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/err.D_PDESC_ZERO.notreturn.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/err.D_PDESC_ZERO.notreturn.d new file mode 100644 index 00000000..5e3d5fa7 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/err.D_PDESC_ZERO.notreturn.d @@ -0,0 +1,56 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: Call fbt provider over non existent function and make + * sure it results in compilation error. + * + * SECTION: FBT Provider/Probes + */ + +#pragma D option quiet + +BEGIN +{ + self->traceme = 1; +} + +void bar(); + +fbt::bar:entry +{ + printf("Entering the function\n"); +} + +fbt::bar:return +{ + printf("Returning the function\n"); + exit(0); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.basic.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.basic.d new file mode 100644 index 00000000..ff6da26f --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.basic.d @@ -0,0 +1,49 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: simple fbt arguments test. + * + * SECTION: FBT Provider/Probes + */ + +#pragma D option quiet + +tick-1 +{ + self->traceme = 1; +} + +fbt::: +/self->traceme/ +{ + printf("The arguments are %u %u %u %u %u %u %u %u\n", arg0, arg1, + arg3, arg4, arg5, arg6, arg7, arg8); + exit (0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.functionentry.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.functionentry.d new file mode 100644 index 00000000..78e107ee --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.functionentry.d @@ -0,0 +1,48 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: FBT provider function entry and exit test. + * + * SECTION: FBT Provider/Probe arguments + */ + +#pragma D option quiet +#pragma D option statusrate=10ms + +fbt::ioctl:entry +{ + printf("Entering the ioctl function\n"); +} + +fbt::ioctl:return +{ + printf("Returning from ioctl function\n"); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.functionreturnvalue.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.functionreturnvalue.d new file mode 100644 index 00000000..6d1b8a8f --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.functionreturnvalue.d @@ -0,0 +1,43 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: Fbt provider return value verify test. + * + * SECTION: FBT Provider/Probe arguments + */ + +#pragma D option quiet +#pragma D option statusrate=10ms + +fbt::ioctl:return +{ + printf("The function return value is stored in %u\n", arg1); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.ioctlargs.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.ioctlargs.d new file mode 100644 index 00000000..c2c7bf04 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.ioctlargs.d @@ -0,0 +1,50 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: FBT provider arguments scan test. + * + * SECTION: FBT Provider/Probe arguments + */ + +#pragma D option quiet +#pragma D option statusrate=10ms + +fbt::ioctl:entry +{ + printf("Entering the ioctl function\n"); + printf("The few arguments are %u %u %u %u\n", arg0, arg1, arg2, arg3); +} + +fbt::ioctl:return +{ + printf("Returning from ioctl function\n"); + printf("The few arguments are %u %u %u %u\n", arg0, arg1, arg2, arg3); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.offset.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.offset.d new file mode 100644 index 00000000..be2c0d6a --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.offset.d @@ -0,0 +1,53 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: FBT provider return value offset verification test. + * + * SECTION: FBT Provider/Probe arguments + */ + +#pragma D option quiet +#pragma D option statusrate=10ms + +BEGIN +{ + self->traceme = 1; +} + +fbt::ioctl:entry +{ + printf("Entering the function\n"); +} + +fbt::ioctl:return +{ + printf("The offset = %u\n", arg0); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.offsetzero.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.offsetzero.d new file mode 100644 index 00000000..240744bf --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.offsetzero.d @@ -0,0 +1,50 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: FBT provider argument 0 test + * + * SECTION: FBT Provider/Probe arguments + */ + +#pragma D option quiet +#pragma D option statusrate=10ms + +fbt::ioctl:entry +{ + printf("Entering the ioctl function\n"); + printf("The few arguments are %u %u %u %u\n", arg0, arg1, arg2, arg3); + exit(0); +} + +fbt::ioctl:return +{ + printf("Returning from ioctl function\n"); + printf("The few arguments are %u %u %u %u\n", arg0, arg1, arg2, arg3); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.return.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.return.d new file mode 100644 index 00000000..b269710e --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.return.d @@ -0,0 +1,52 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: simple fbt provider return test. + * + * SECTION: FBT Provider/Probe arguments + */ + +#pragma D option quiet + +BEGIN +{ + self->traceme = 1; +} + +fbt:::entry +{ + printf("Entering the function\n"); +} + +fbt:::return +{ + printf("Returning the function\n"); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.return0.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.return0.d new file mode 100644 index 00000000..cadbaa00 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.return0.d @@ -0,0 +1,44 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: simple fbt provider arg0 and probfunc print test. + * + * SECTION: FBT Provider/Probe arguments + */ + +#pragma D option quiet +#pragma D option statusrate=10ms + +fbt::ioctl:return +/arg1 == 0/ +{ + printf("%s %x returned 0", probefunc, arg0); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.tailcall.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.tailcall.d new file mode 100644 index 00000000..67ef106f --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.tailcall.d @@ -0,0 +1,55 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: simple fbt provider tailcall test. + * + * SECTION: FBT Provider/Probe arguments + */ + +#pragma D option quiet +#pragma D option statusrate=10ms + +fbt::ioctl:entry +{ + self->traceme = 1; +} + +fbt:::entry +/self->traceme/ +{ + printf("called %s\n", probefunc); +} + +fbt::ioctl:return +/self->traceme/ +{ + self->traceme = 0; + exit (0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_FUNC_UNDEF.progenyofbad1.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_FUNC_UNDEF.progenyofbad1.d new file mode 100644 index 00000000..bfd1eedf --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_FUNC_UNDEF.progenyofbad1.d @@ -0,0 +1,44 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * progenyof() should accept one argument - a pid + * + * SECTION: Actions and Subroutines/progenyof() + * + */ + + +BEGIN +{ + progencyof(1, 2); + exit(0); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_OP_VFPTR.badop.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_OP_VFPTR.badop.d new file mode 100644 index 00000000..d219bb1f --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_OP_VFPTR.badop.d @@ -0,0 +1,47 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * +=, -= must handle invalid variables. + * + * SECTION: Types, Operators, and Expressions/Assignment Operators + * + */ + + +int p; + +BEGIN +{ + p = 1; + p -= alloca(10); + exit(1); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_ARG.chillbadarg.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_ARG.chillbadarg.d new file mode 100644 index 00000000..08bd9819 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_ARG.chillbadarg.d @@ -0,0 +1,43 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * chill() should handle a bad argument. + * + * SECTION: Actions and Subroutines/chill() + * + */ + + +BEGIN +{ + chill("badarg"); + exit(0); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_ARG.copyoutbadarg.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_ARG.copyoutbadarg.d new file mode 100644 index 00000000..5c02378f --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_ARG.copyoutbadarg.d @@ -0,0 +1,43 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * copyout() must handle invalid argument types. + * + * SECTION: Actions and Subroutines/copyout() + * + */ + + +BEGIN +{ + copyout("not_void_*", "not_uinptr_t", "not_size_t"); + exit(0); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_ARG.mobadarg.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_ARG.mobadarg.d new file mode 100644 index 00000000..4df8d186 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_ARG.mobadarg.d @@ -0,0 +1,41 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * mutex_owned() should handle an invalid argument passed. + * + * SECTION: Actions and Subroutines/mutex_owned() + * + */ + +BEGIN +{ + mutex_owned("badarg"); + exit(1); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_ARG.raisebadarg.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_ARG.raisebadarg.d new file mode 100644 index 00000000..a3336efe --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_ARG.raisebadarg.d @@ -0,0 +1,43 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * raise() should generate an error if any arguments are sent. + * + * SECTION: Actions and Subroutines/raise() + * + */ + + +BEGIN +{ + raise("badarg"); + exit(0); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.allocanoarg.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.allocanoarg.d new file mode 100644 index 00000000..a2af00f9 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.allocanoarg.d @@ -0,0 +1,45 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * alloca() should handle no arguments as an error + * + * SECTION: Actions and Subroutines/alloca() + * + */ + +#pragma D option quiet + + + +BEGIN +{ + ptr = alloca(); + exit(1); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.badbreakpoint.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.badbreakpoint.d new file mode 100644 index 00000000..0cb567a5 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.badbreakpoint.d @@ -0,0 +1,43 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * breakpoint() should handle arguments passed as an error. + * + * SECTION: Actions and Subroutines/breakpoint() + * + */ + + +BEGIN +{ + breakpoint(1, 2); + exit(0); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.chilltoofew.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.chilltoofew.d new file mode 100644 index 00000000..a0018fa8 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.chilltoofew.d @@ -0,0 +1,43 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * chill() should handle no arguments. + * + * SECTION: Actions and Subroutines/chill() + * + */ + + +BEGIN +{ + chill(); + exit(0); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.chilltoomany.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.chilltoomany.d new file mode 100644 index 00000000..f24e9ef1 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.chilltoomany.d @@ -0,0 +1,42 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * chill() should handle too many arguments. + * + * SECTION: Actions and Subroutines/chill() + * + */ + +BEGIN +{ + chill(1000, 1000, 1000); + exit(0); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.copyoutstrbadarg.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.copyoutstrbadarg.d new file mode 100644 index 00000000..1f07814b --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.copyoutstrbadarg.d @@ -0,0 +1,43 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * copyoutstr() must handle invalid argument types. + * + * SECTION: Actions and Subroutines/copyoutstr() + * + */ + + +BEGIN +{ + copyoutstr("string", "not_uintptr_t"); + exit(0); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.copyoutstrtoofew.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.copyoutstrtoofew.d new file mode 100644 index 00000000..e01868c0 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.copyoutstrtoofew.d @@ -0,0 +1,43 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Calling copyoutstr() with less than 2 arguments will generate an error + * + * SECTION: Actions and Subroutines/copyoutstr() + * + */ + + +BEGIN +{ + copyoutstr("string"); + exit(0); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.copyouttoofew.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.copyouttoofew.d new file mode 100644 index 00000000..f3706f62 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.copyouttoofew.d @@ -0,0 +1,43 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Calling copyout() with less than 3 arguments will generate an error + * + * SECTION: Actions and Subroutines/copyout() + * + */ + + +BEGIN +{ + copyout(0, 20); + exit(0); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.copyouttoomany.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.copyouttoomany.d new file mode 100644 index 00000000..6fab90d8 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.copyouttoomany.d @@ -0,0 +1,44 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * copyout() should handle too many arguments passed. + * + * SECTION: Actions and Subroutines/copyin(); + * Actions and Subroutines/copyinstr() + * + */ + + +BEGIN +{ + copyout((void *)3, (uintptr_t)1000, (size_t)1000, "toomany"); + exit(0); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.motoofew.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.motoofew.d new file mode 100644 index 00000000..e878713a --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.motoofew.d @@ -0,0 +1,41 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * mutex_owned() should handle too few args passed + * + * SECTION: Actions and Subroutines/mutex_owned() + * + */ + +lockstat:genunix:mutex_enter:adaptive-acquire +{ + mutex_owned(); + exit(1); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.motoomany.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.motoomany.d new file mode 100644 index 00000000..d3b9ed48 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.motoomany.d @@ -0,0 +1,41 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * mutex_owned() should handle too many args passed + * + * SECTION: Actions and Subroutines/mutex_owned() + * + */ + +lockstat:genunix:mutex_enter:adaptive-acquire +{ + mutex_owned((kmutex_t *)arg0, 99); + exit(1); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.mtabadarg.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.mtabadarg.d new file mode 100644 index 00000000..6ad1e47b --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.mtabadarg.d @@ -0,0 +1,42 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * mutex_type_adaptive() should handle an invalid argument passed. + * + * SECTION: Actions and Subroutines/mutex_type_adaptive() + * + */ + + +BEGIN +{ + mutex_type_adaptive(trace()); + exit(1); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.mtatoofew.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.mtatoofew.d new file mode 100644 index 00000000..98bc5c93 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.mtatoofew.d @@ -0,0 +1,43 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * mutex_type_adaptive() should handle too few args passed + * + * SECTION: Actions and Subroutines/mutex_type_adaptive() + * + */ + + +lockstat:genunix:mutex_enter:adaptive-acquire +{ + mutex_type_adaptive(); + exit(1); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.mtatoomany.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.mtatoomany.d new file mode 100644 index 00000000..e4f259a7 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.mtatoomany.d @@ -0,0 +1,42 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * mutex_type_adaptive() should handle too many args passed + * + * SECTION: Actions and Subroutines/mutex_type_adaptive() + * + */ + + +lockstat:genunix:mutex_enter:adaptive-acquire +{ + mutex_type_adaptive((kmutex_t *)arg0, 99); + exit(1); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.panicbadarg.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.panicbadarg.d new file mode 100644 index 00000000..87589b48 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.panicbadarg.d @@ -0,0 +1,43 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * panic() should handle any argument passed as an error. + * + * SECTION: Actions and Subroutines/panic() + * + */ + + +BEGIN +{ + panic("badarg"); + exit(0); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.progenyofbad2.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.progenyofbad2.d new file mode 100644 index 00000000..51c8674d --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.progenyofbad2.d @@ -0,0 +1,44 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * progenyof() should return an error if the argument is an + * incorrect type. + * + * SECTION: Actions and Subroutines/progenyof() + * + */ + + +BEGIN +{ + progenyof(trace()); + exit(0); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.stopbadarg.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.stopbadarg.d new file mode 100644 index 00000000..8b605071 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.stopbadarg.d @@ -0,0 +1,43 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * stop() should generate an error if any arguments are sent. + * + * SECTION: Actions and Subroutines/stop() + * + */ + + +BEGIN +{ + stop("badarg"); + exit(0); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_STRINGOF_TYPE.badstringof.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_STRINGOF_TYPE.badstringof.d new file mode 100644 index 00000000..fec5649b --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_STRINGOF_TYPE.badstringof.d @@ -0,0 +1,43 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * stringof() accepts a scalar, pointer, or string + * + * SECTION: Types, Operators, and Expressions/Precedence + * + */ + +#pragma D option quiet + +BEGIN +{ + printf("%s", stringof (trace(0))); + exit(1); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_VAR_UNDEF.badvar.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_VAR_UNDEF.badvar.d new file mode 100644 index 00000000..bb4fd2d1 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.D_VAR_UNDEF.badvar.d @@ -0,0 +1,43 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * +=, -= must handle invalid variables. + * + * SECTION: Types, Operators, and Expressions/Assignment Operators + * + */ + + +BEGIN +{ + p -= trace(0); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.badalloca.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.badalloca.d new file mode 100644 index 00000000..572daa39 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.badalloca.d @@ -0,0 +1,56 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * memory allocated by alloca() is only valid within the clause + * it is allocated. + * + * SECTION: Actions and Subroutines/alloca() + * + */ + +#pragma D option quiet + + +BEGIN +{ + ptr = alloca(sizeof (int)); +} + +tick-1 +{ + bcopy((void *)&`kmem_flags, ptr, sizeof (int)); + exit(0); +} + +ERROR +{ + exit(1); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.badalloca2.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.badalloca2.d new file mode 100644 index 00000000..fbbf8e2e --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.badalloca2.d @@ -0,0 +1,49 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * alloca() cannot be used to "unconsume" scratch space memory by + * accepting a negative offset. + * + * SECTION: Actions and Subroutines/alloca() + * + */ + +BEGIN +{ + ptr = alloca(10); + ptr = alloca(0xffffffffffffffff); + exit(0); +} + +ERROR +{ + exit(1); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.badbcopy.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.badbcopy.d new file mode 100644 index 00000000..d7184b0f --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.badbcopy.d @@ -0,0 +1,55 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * bcopy should not allow a copy to memory that is not scratch memory. + * + * SECTION: Actions and Subroutines/alloca(); + * Actions and Subroutines/bcopy() + * + */ + +#pragma D option quiet + + +BEGIN +{ + ptr = alloca(sizeof (int)); + + /* Attempt a copy from scratch memory to a kernel address */ + + bcopy(ptr, (void *)&`kmem_flags, sizeof (int)); + exit(0); +} + +ERROR +{ + exit(1); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.badbcopy1.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.badbcopy1.d new file mode 100644 index 00000000..c29eb2bb --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.badbcopy1.d @@ -0,0 +1,54 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * bcopy should not copy from one memory location to another + * if the memory is not properly allocated + * + * SECTION: Actions and Subroutines/alloca(); + * Actions and Subroutines/bcopy() + * + */ + +#pragma D option quiet + + +BEGIN +{ + ptr = alloca(0); + + /* Attempt to bcopy to scratch memory that isn't allocated */ + bcopy((void *)&`kmem_flags, ptr, sizeof (int)); + exit(0); +} + +ERROR +{ + exit(1); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.badbcopy2.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.badbcopy2.d new file mode 100644 index 00000000..6d49e6ec --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.badbcopy2.d @@ -0,0 +1,53 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * bcopy should not copy from one memory location to another + * if the memory is not properly allocated + * + * SECTION: Actions and Subroutines/bcopy() + * + */ + +#pragma D option quiet + +int *ptr; + +BEGIN +{ + /* Attempt to copy to non-scratch memory */ + + bcopy((void *)&`kmem_flags, ptr, sizeof (int)); + exit(0); +} + +ERROR +{ + exit(1); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.badbcopy3.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.badbcopy3.d new file mode 100644 index 00000000..c362caad --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.badbcopy3.d @@ -0,0 +1,50 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * bcopy should not copy from one memory location to another + * if the memory is not properly allocated + * + * SECTION: Actions and Subroutines/bcopy() + * + */ + +#pragma D option quiet + +BEGIN +{ + /* Attempt to copy to a NULL address */ + bcopy((void *)&`kmem_flags, (void *)NULL, sizeof (int)); + exit(0); +} + +ERROR +{ + exit(1); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.badbcopy4.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.badbcopy4.d new file mode 100644 index 00000000..4148ae7b --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.badbcopy4.d @@ -0,0 +1,53 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * bcopy should not copy from one memory location to another + * if the source memory location is not valid. + * + * SECTION: Actions and Subroutines/alloca(); + * Actions and Subroutines/bcopy() + * + */ + +#pragma D option quiet + +BEGIN +{ + ptr = alloca(sizeof (int)); + + /* Attempt to copy from a NULL address */ + bcopy((void *)NULL, ptr, sizeof (int)); + exit(0); +} + +ERROR +{ + exit(1); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.badbcopy5.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.badbcopy5.d new file mode 100644 index 00000000..a0cbd5d4 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.badbcopy5.d @@ -0,0 +1,55 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * bcopy should not copy from one memory location to another + * if the source memory location is not valid. + * + * SECTION: Actions and Subroutines/alloca(); + * Actions and Subroutines/bcopy() + * + */ + +#pragma D option quiet + +int *badptr; + +BEGIN +{ + ptr = alloca(sizeof (int)); + + /* Attempt to copy from a invalid address */ + bcopy(badptr, ptr, sizeof (int)); + exit(0); +} + +ERROR +{ + exit(1); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.badbcopy6.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.badbcopy6.d new file mode 100644 index 00000000..32770145 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.badbcopy6.d @@ -0,0 +1,40 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma D option quiet + +BEGIN +{ + bcopy("bad news", alloca(1), -1); + exit(0); +} + +ERROR +{ + exit(1); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.badchill.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.badchill.d new file mode 100644 index 00000000..b394a88b --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.badchill.d @@ -0,0 +1,39 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +BEGIN +{ + chill(200); + chill(((hrtime_t)1 << 63) - 1); + exit(0); +} + +ERROR +{ + exit(1); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.chillbadarg.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.chillbadarg.ksh new file mode 100644 index 00000000..98f04dd2 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.chillbadarg.ksh @@ -0,0 +1,69 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +# ident "%Z%%M% %I% %E% SMI" + +dtrace_script() +{ + + $dtrace -w -s /dev/stdin <' + exit 2 +fi + +dtrace=$1 + +dtrace_script & +child=$! + +wait $child +status=$? + +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.copyout.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.copyout.d new file mode 100644 index 00000000..6b9db3b8 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.copyout.d @@ -0,0 +1,49 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * copyout() should handle invalid args. + * + * SECTION: Actions and Subroutines/copyout() + * + */ + +#pragma D option destructive + +BEGIN +{ + i = 3; + copyout((void *)i, 0, 5); + exit(0); +} + +ERROR +{ + exit(1); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.copyoutbadaddr.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.copyoutbadaddr.ksh new file mode 100644 index 00000000..de5c47d5 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.copyoutbadaddr.ksh @@ -0,0 +1,71 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + + +# ident "%Z%%M% %I% %E% SMI" + + +dtrace_script() +{ + + $dtrace -w -s /dev/stdin <pr_envp, sizeof (char *), ptr); + copyout(ptr, 0, sizeof (char *)); + } + + ERROR + { + exit(1) + } +EOF +} + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +dtrace_script & +child=$! + +wait $child +status=$? + +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.copyoutstrbadaddr.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.copyoutstrbadaddr.ksh new file mode 100644 index 00000000..181702b8 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.copyoutstrbadaddr.ksh @@ -0,0 +1,70 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +# ident "%Z%%M% %I% %E% SMI" + + +dtrace_script() +{ + + $dtrace -w -s /dev/stdin <pr_envp, sizeof (char *), ptr); + copyout(ptr, 0, sizeof (char *)); + } + + ERROR + { + exit(1) + } +EOF +} + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +dtrace_script & +child=$! + +wait $child +status=$? + +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.inet_ntoa6badaddr.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.inet_ntoa6badaddr.d new file mode 100644 index 00000000..81ce643f --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.inet_ntoa6badaddr.d @@ -0,0 +1,45 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma D option quiet + +struct in6_addr *ip6a; + +BEGIN +{ + ip6a = 0; + + printf("%s\n", inet_ntop(AF_INET6, ip6a)); + + exit(0); +} + +ERROR +{ + exit(1); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.inet_ntoabadaddr.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.inet_ntoabadaddr.d new file mode 100644 index 00000000..3f0d8e45 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.inet_ntoabadaddr.d @@ -0,0 +1,45 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma D option quiet + +ipaddr_t *ip4a; + +BEGIN +{ + ip4a = 0; + + printf("%s\n", inet_ntoa(ip4a)); + + exit(0); +} + +ERROR +{ + exit(1); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.inet_ntopbadaddr.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.inet_ntopbadaddr.d new file mode 100644 index 00000000..74ce760d --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.inet_ntopbadaddr.d @@ -0,0 +1,45 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma D option quiet + +ipaddr_t *ip4a; + +BEGIN +{ + ip4a = 0; + + printf("%s\n", inet_ntop(AF_INET, ip4a)); + + exit(0); +} + +ERROR +{ + exit(1); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.inet_ntopbadarg.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.inet_ntopbadarg.d new file mode 100644 index 00000000..2731385d --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/err.inet_ntopbadarg.d @@ -0,0 +1,47 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma D option quiet + +ipaddr_t *ip4a; + +BEGIN +{ + this->buf4a = alloca(sizeof (ipaddr_t)); + ip4a = this->buf4a; + *ip4a = htonl(0xc0a80117); + + printf("%s\n", inet_ntop(-1, ip4a)); + + exit(0); +} + +ERROR +{ + exit(1); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.badfreopen.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.badfreopen.ksh new file mode 100644 index 00000000..72f6b87f --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.badfreopen.ksh @@ -0,0 +1,102 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +#ident "%Z%%M% %I% %E% SMI" + +script() +{ + $dtrace -wq -o $tmpfile -s /dev/stdin 2> $errfile <' + exit 2 +fi + +dtrace=$1 +tmpfile=/tmp/tst.badfreopen.$$ +errfile=/tmp/tst.badfreopen.$$.stderr + +script +status=$? + +if [ "$status" -eq 0 ]; then + i=`cat $tmpfile` + + if [[ $i != "123" ]]; then + echo "$0: unexpected contents in $tmpfile: " \ + "expected 123, found $i" + status=100 + fi + + i=`wc -l $errfile | nawk '{ print $1 }'` + + if [ "$i" -lt 6 ]; then + echo "$0: expected at least 6 lines of stderr, found $i lines" + status=101 + fi +else + cat $errfile > /dev/fd/2 +fi + +rm $tmpfile $errfile + +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.basename.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.basename.d new file mode 100644 index 00000000..6fb996c9 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.basename.d @@ -0,0 +1,87 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma D option quiet + +/* + * This test verifies that the basename() and dirname() functions are working + * properly. Note that the output of this is a ksh script. When run, + * it will give no output if the output is correct. + */ +BEGIN +{ + dir[i++] = "/foo/bar/baz"; + dir[i++] = "/foo/bar///baz/"; + dir[i++] = "/foo/bar/baz/"; + dir[i++] = "/foo/bar/baz//"; + dir[i++] = "/foo/bar/baz/."; + dir[i++] = "/foo/bar/baz/./"; + dir[i++] = "/foo/bar/baz/.//"; + dir[i++] = "foo/bar/baz/"; + dir[i++] = "/"; + dir[i++] = "./"; + dir[i++] = "//"; + dir[i++] = "/."; + dir[i++] = "/./"; + dir[i++] = "/./."; + dir[i++] = "/.//"; + dir[i++] = "."; + dir[i++] = "f"; + dir[i++] = "f/"; + dir[i++] = "/////"; + dir[i++] = ""; + + end = i; + i = 0; + + printf("#!/usr/bin/ksh\n\n"); +} + +tick-1ms +/i < end/ +{ + printf("if [ `basename \"%s\"` != \"%s\" ]; then\n", + dir[i], basename(dir[i])); + printf(" echo \"basename(\\\"%s\\\") is \\\"%s\\\"; ", + dir[i], basename(dir[i])); + printf("expected \\\"`basename \"%s\"`\"\\\"\n", dir[i]); + printf("fi\n\n"); + printf("if [ `dirname \"%s\"` != \"%s\" ]; then\n", + dir[i], dirname(dir[i])); + printf(" echo \"dirname(\\\"%s\\\") is \\\"%s\\\"; ", + dir[i], dirname(dir[i])); + printf("expected \\\"`dirname \"%s\"`\"\\\"\n", dir[i]); + printf("fi\n\n"); + i++; +} + +tick-1ms +/i == end/ +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.basename.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.basename.d.out new file mode 100755 index 00000000..e16541ad --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.basename.d.out @@ -0,0 +1,163 @@ +#!/usr/bin/ksh + +if [ `basename "/foo/bar/baz"` != "baz" ]; then + echo "basename(\"/foo/bar/baz\") is \"baz\"; expected \"`basename "/foo/bar/baz"`"\" +fi + +if [ `dirname "/foo/bar/baz"` != "/foo/bar" ]; then + echo "dirname(\"/foo/bar/baz\") is \"/foo/bar\"; expected \"`dirname "/foo/bar/baz"`"\" +fi + +if [ `basename "/foo/bar///baz/"` != "baz" ]; then + echo "basename(\"/foo/bar///baz/\") is \"baz\"; expected \"`basename "/foo/bar///baz/"`"\" +fi + +if [ `dirname "/foo/bar///baz/"` != "/foo/bar" ]; then + echo "dirname(\"/foo/bar///baz/\") is \"/foo/bar\"; expected \"`dirname "/foo/bar///baz/"`"\" +fi + +if [ `basename "/foo/bar/baz/"` != "baz" ]; then + echo "basename(\"/foo/bar/baz/\") is \"baz\"; expected \"`basename "/foo/bar/baz/"`"\" +fi + +if [ `dirname "/foo/bar/baz/"` != "/foo/bar" ]; then + echo "dirname(\"/foo/bar/baz/\") is \"/foo/bar\"; expected \"`dirname "/foo/bar/baz/"`"\" +fi + +if [ `basename "/foo/bar/baz//"` != "baz" ]; then + echo "basename(\"/foo/bar/baz//\") is \"baz\"; expected \"`basename "/foo/bar/baz//"`"\" +fi + +if [ `dirname "/foo/bar/baz//"` != "/foo/bar" ]; then + echo "dirname(\"/foo/bar/baz//\") is \"/foo/bar\"; expected \"`dirname "/foo/bar/baz//"`"\" +fi + +if [ `basename "/foo/bar/baz/."` != "." ]; then + echo "basename(\"/foo/bar/baz/.\") is \".\"; expected \"`basename "/foo/bar/baz/."`"\" +fi + +if [ `dirname "/foo/bar/baz/."` != "/foo/bar/baz" ]; then + echo "dirname(\"/foo/bar/baz/.\") is \"/foo/bar/baz\"; expected \"`dirname "/foo/bar/baz/."`"\" +fi + +if [ `basename "/foo/bar/baz/./"` != "." ]; then + echo "basename(\"/foo/bar/baz/./\") is \".\"; expected \"`basename "/foo/bar/baz/./"`"\" +fi + +if [ `dirname "/foo/bar/baz/./"` != "/foo/bar/baz" ]; then + echo "dirname(\"/foo/bar/baz/./\") is \"/foo/bar/baz\"; expected \"`dirname "/foo/bar/baz/./"`"\" +fi + +if [ `basename "/foo/bar/baz/.//"` != "." ]; then + echo "basename(\"/foo/bar/baz/.//\") is \".\"; expected \"`basename "/foo/bar/baz/.//"`"\" +fi + +if [ `dirname "/foo/bar/baz/.//"` != "/foo/bar/baz" ]; then + echo "dirname(\"/foo/bar/baz/.//\") is \"/foo/bar/baz\"; expected \"`dirname "/foo/bar/baz/.//"`"\" +fi + +if [ `basename "foo/bar/baz/"` != "baz" ]; then + echo "basename(\"foo/bar/baz/\") is \"baz\"; expected \"`basename "foo/bar/baz/"`"\" +fi + +if [ `dirname "foo/bar/baz/"` != "foo/bar" ]; then + echo "dirname(\"foo/bar/baz/\") is \"foo/bar\"; expected \"`dirname "foo/bar/baz/"`"\" +fi + +if [ `basename "/"` != "/" ]; then + echo "basename(\"/\") is \"/\"; expected \"`basename "/"`"\" +fi + +if [ `dirname "/"` != "/" ]; then + echo "dirname(\"/\") is \"/\"; expected \"`dirname "/"`"\" +fi + +if [ `basename "./"` != "." ]; then + echo "basename(\"./\") is \".\"; expected \"`basename "./"`"\" +fi + +if [ `dirname "./"` != "." ]; then + echo "dirname(\"./\") is \".\"; expected \"`dirname "./"`"\" +fi + +if [ `basename "//"` != "/" ]; then + echo "basename(\"//\") is \"/\"; expected \"`basename "//"`"\" +fi + +if [ `dirname "//"` != "/" ]; then + echo "dirname(\"//\") is \"/\"; expected \"`dirname "//"`"\" +fi + +if [ `basename "/."` != "." ]; then + echo "basename(\"/.\") is \".\"; expected \"`basename "/."`"\" +fi + +if [ `dirname "/."` != "/" ]; then + echo "dirname(\"/.\") is \"/\"; expected \"`dirname "/."`"\" +fi + +if [ `basename "/./"` != "." ]; then + echo "basename(\"/./\") is \".\"; expected \"`basename "/./"`"\" +fi + +if [ `dirname "/./"` != "/" ]; then + echo "dirname(\"/./\") is \"/\"; expected \"`dirname "/./"`"\" +fi + +if [ `basename "/./."` != "." ]; then + echo "basename(\"/./.\") is \".\"; expected \"`basename "/./."`"\" +fi + +if [ `dirname "/./."` != "/." ]; then + echo "dirname(\"/./.\") is \"/.\"; expected \"`dirname "/./."`"\" +fi + +if [ `basename "/.//"` != "." ]; then + echo "basename(\"/.//\") is \".\"; expected \"`basename "/.//"`"\" +fi + +if [ `dirname "/.//"` != "/" ]; then + echo "dirname(\"/.//\") is \"/\"; expected \"`dirname "/.//"`"\" +fi + +if [ `basename "."` != "." ]; then + echo "basename(\".\") is \".\"; expected \"`basename "."`"\" +fi + +if [ `dirname "."` != "." ]; then + echo "dirname(\".\") is \".\"; expected \"`dirname "."`"\" +fi + +if [ `basename "f"` != "f" ]; then + echo "basename(\"f\") is \"f\"; expected \"`basename "f"`"\" +fi + +if [ `dirname "f"` != "." ]; then + echo "dirname(\"f\") is \".\"; expected \"`dirname "f"`"\" +fi + +if [ `basename "f/"` != "f" ]; then + echo "basename(\"f/\") is \"f\"; expected \"`basename "f/"`"\" +fi + +if [ `dirname "f/"` != "." ]; then + echo "dirname(\"f/\") is \".\"; expected \"`dirname "f/"`"\" +fi + +if [ `basename "/////"` != "/" ]; then + echo "basename(\"/////\") is \"/\"; expected \"`basename "/////"`"\" +fi + +if [ `dirname "/////"` != "/" ]; then + echo "dirname(\"/////\") is \"/\"; expected \"`dirname "/////"`"\" +fi + +if [ `basename ""` != "." ]; then + echo "basename(\"\") is \".\"; expected \"`basename ""`"\" +fi + +if [ `dirname ""` != "." ]; then + echo "dirname(\"\") is \".\"; expected \"`dirname ""`"\" +fi + + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.bcopy.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.bcopy.d new file mode 100644 index 00000000..8501ff44 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.bcopy.d @@ -0,0 +1,61 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * bcopy should copy from one memory location to another + * + * SECTION: Actions and Subroutines/alloca(); + * Actions and Subroutines/bcopy() + * + */ + +#pragma D option quiet + + +BEGIN +{ + ptr = alloca(sizeof (int)); + bcopy((void *)&`kmem_flags, ptr, sizeof (int)); + intp = (int *)ptr; + ret = (`kmem_flags == *intp) ? 0 : 1; +} + +tick-1 +/ret == 0/ +{ + exit(0); +} + +tick-1 +/ret == 1/ +{ + printf("memory address contained 0x%x, expected 0x%x\n", + *intp, `kmem_flags); + exit(1); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.chill.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.chill.ksh new file mode 100644 index 00000000..aae1c688 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.chill.ksh @@ -0,0 +1,77 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# + +dtrace_script() +{ + + $dtrace -w -s /dev/stdin < 5/ + { + exit(0); + } +EOF +} + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +dtrace_script & +child=$! + +wait $child +status=$? + +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.cleanpath.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.cleanpath.d new file mode 100644 index 00000000..2f054185 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.cleanpath.d @@ -0,0 +1,70 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma D option quiet + +BEGIN +{ + path[i++] = "/foo/bar/baz"; + path[i++] = "/foo/bar///baz/"; + path[i++] = "/foo/bar/baz/"; + path[i++] = "/foo/bar/baz//"; + path[i++] = "/foo/bar/baz/."; + path[i++] = "/foo/bar/baz/./"; + path[i++] = "/foo/bar/../../baz/.//"; + path[i++] = "foo/bar/./././././baz/"; + path[i++] = "/foo/bar/baz/../../../../../../"; + path[i++] = "/../../../../../../"; + path[i++] = "/./"; + path[i++] = "/foo/bar/baz/../../bop/bang/../../bar/baz/"; + path[i++] = "./"; + path[i++] = "//"; + path[i++] = "/."; + path[i++] = "/./"; + path[i++] = "/./."; + path[i++] = "/.//"; + path[i++] = "."; + path[i++] = "/////"; + path[i++] = ""; + + end = i; + i = 0; +} + +tick-1ms +/i < end/ +{ + printf("cleanpath(\"%s\") = \"%s\"\n", path[i], cleanpath(path[i])); + i++; +} + +tick-1ms +/i == end/ +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.cleanpath.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.cleanpath.d.out new file mode 100644 index 00000000..b8bdc099 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.cleanpath.d.out @@ -0,0 +1,22 @@ +cleanpath("/foo/bar/baz") = "/foo/bar/baz" +cleanpath("/foo/bar///baz/") = "/foo/bar/baz/" +cleanpath("/foo/bar/baz/") = "/foo/bar/baz/" +cleanpath("/foo/bar/baz//") = "/foo/bar/baz/" +cleanpath("/foo/bar/baz/.") = "/foo/bar/baz/." +cleanpath("/foo/bar/baz/./") = "/foo/bar/baz/" +cleanpath("/foo/bar/../../baz/.//") = "/baz/" +cleanpath("foo/bar/./././././baz/") = "foo/bar/baz/" +cleanpath("/foo/bar/baz/../../../../../../") = "/" +cleanpath("/../../../../../../") = "/" +cleanpath("/./") = "/" +cleanpath("/foo/bar/baz/../../bop/bang/../../bar/baz/") = "/foo/bar/baz/" +cleanpath("./") = "./" +cleanpath("//") = "/" +cleanpath("/.") = "/." +cleanpath("/./") = "/" +cleanpath("/./.") = "/." +cleanpath("/.//") = "/" +cleanpath(".") = "." +cleanpath("/////") = "/" +cleanpath("") = "" + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.copyin.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.copyin.d new file mode 100644 index 00000000..186b9741 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.copyin.d @@ -0,0 +1,54 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * This D ditty tests the ability to perform both copyin and copyinstr. We + * grab the value or pr_envp, read the first pointer from the user stack, + * and then copyinstr the first environment variable and print it. + * + * SECTION: Actions and Subroutines/copyin(); + * Actions and Subroutines/copyinstr(); + * User Process Tracing/copyin() and copyinstr() + */ + +BEGIN +/curpsinfo->pr_dmodel == PR_MODEL_ILP32/ +{ + envp = *(uint32_t *)copyin(curpsinfo->pr_envp, sizeof (uint32_t)); + printf("envp[0] = \"%s\"", copyinstr(envp)); + exit(0); +} + +BEGIN +/curpsinfo->pr_dmodel == PR_MODEL_LP64/ +{ + envp = *(uint64_t *)copyin(curpsinfo->pr_envp, sizeof (uint64_t)); + printf("envp[0] = \"%s\"", copyinstr(envp)); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.copyinto.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.copyinto.d new file mode 100644 index 00000000..c282e61d --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.copyinto.d @@ -0,0 +1,56 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * test copyinto by copying the first string of the user's + * environment. + * + * SECTION: Actions and Subroutines/copyinto() + * + */ + +#pragma D option quiet + +BEGIN +/curpsinfo->pr_dmodel == PR_MODEL_ILP32/ +{ + envp = alloca(sizeof (uint32_t)); + copyinto(curpsinfo->pr_envp, sizeof (uint32_t), envp); + printf("envp[0] = \"%s\"", copyinstr(*(uint32_t *)envp)); + exit(0); +} + +BEGIN +/curpsinfo->pr_dmodel == PR_MODEL_LP64/ +{ + envp = alloca(sizeof (uint64_t)); + copyinto(curpsinfo->pr_envp, sizeof (uint64_t), envp); + printf("envp[0] = \"%s\"", copyinstr(*(uint64_t *)envp)); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.ddi_pathname.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.ddi_pathname.d new file mode 100644 index 00000000..3716d0ce --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.ddi_pathname.d @@ -0,0 +1,64 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma D option quiet + +BEGIN +{ + this->dev = (struct dev_info *)alloca(sizeof (struct dev_info)); + this->minor1 = + (struct ddi_minor_data *)alloca(sizeof (struct ddi_minor_data)); + this->minor2 = + (struct ddi_minor_data *)alloca(sizeof (struct ddi_minor_data)); + this->minor3 = + (struct ddi_minor_data *)alloca(sizeof (struct ddi_minor_data)); + + this->minor1->d_minor.dev = 0; + this->minor1->next = this->minor2; + + this->minor2->d_minor.dev = 0; + this->minor2->next = this->minor3; + + this->minor3->d_minor.dev = 0; + this->minor3->next = this->minor1; + + this->dev->devi_minor = this->minor1; + trace(ddi_pathname(this->dev, 1)); +} + +ERROR +/arg4 == DTRACEFLT_ILLOP/ +{ + exit(0); +} + +ERROR +/arg4 != DTRACEFLT_ILLOP/ +{ + exit(1); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.default.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.default.d new file mode 100644 index 00000000..c4a4e4f3 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.default.d @@ -0,0 +1,64 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + + +#pragma ident "%Z%%M% %I% %E% SMI" + + +/* + * ASSERTION: + * Verify that empty clauses are OK. + * + * SECTION: Actions and Subroutines/Default Action + */ + + +#pragma D option quiet + +BEGIN +{ + i = 1; + +} + +syscall:::entry +{ + + +} + +tick-1 +/i != 0/ +{ + exit(0); +} + + +END +{ + +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.freopen.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.freopen.ksh new file mode 100644 index 00000000..f87d6e18 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.freopen.ksh @@ -0,0 +1,111 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +#ident "%Z%%M% %I% %E% SMI" + +script() +{ + $dtrace -wq -o $tmpfile -s /dev/stdin $tmpfile <' + exit 2 +fi + +dtrace=$1 +tmpfile=/tmp/tst.freopen.$$ +iter=20 + +script +status=$? + +let i=0 + +if [ -f $tmpfile.$iter ]; then + echo "$0: did not expect to find file: $tmpfile.$iter" + cleanup + exit 100 +fi + +mv $tmpfile $tmpfile.$iter +let iter=iter+1 + +while [ "$i" -lt "$iter" ]; do + if [ ! -f $tmpfile.$i ]; then + echo "$0: did not find expected file: $tmpfile.$i" + cleanup + exit 101 + fi + + j=`cat $tmpfile.$i` + + if [ "$i" -ne "$j" ]; then + echo "$0: unexpected contents in $tmpfile.$i: " \ + "expected $i, found $j" + cleanup + exit 102 + fi + + rm $tmpfile.$i + let i=i+1 +done + +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.ftruncate.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.ftruncate.ksh new file mode 100644 index 00000000..b02af07b --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.ftruncate.ksh @@ -0,0 +1,64 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +#ident "%Z%%M% %I% %E% SMI" + +script() +{ + $dtrace -q -o $tmpfile -s /dev/stdin <' + exit 2 +fi + +dtrace=$1 +tmpfile=/tmp/tst.ftruncate.$$ + +script +status=$? + +cat $tmpfile +rm $tmpfile + +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.ftruncate.ksh.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.ftruncate.ksh.out new file mode 100644 index 00000000..3360fd26 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.ftruncate.ksh.out @@ -0,0 +1,11 @@ +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.hton.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.hton.d new file mode 100644 index 00000000..f0118838 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.hton.d @@ -0,0 +1,97 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: Test network byte-ordering routines. + */ + +#include + +BEGIN +{ + before[0] = 0x1122LL; + before[1] = 0x11223344LL; + before[2] = 0x1122334455667788LL; + +#ifdef _LITTLE_ENDIAN + after[0] = 0x2211LL; + after[1] = 0x44332211LL; + after[2] = 0x8877665544332211LL; +#else + after[0] = 0x1122LL; + after[1] = 0x11223344LL; + after[2] = 0x1122334455667788LL; +#endif +} + +BEGIN +/after[0] != htons(before[0])/ +{ + printf("%x rather than %x", htons(before[0]), after[0]); + exit(1); +} + +BEGIN +/after[0] != ntohs(before[0])/ +{ + printf("%x rather than %x", ntohs(before[0]), after[0]); + exit(1); +} + +BEGIN +/after[1] != htonl(before[1])/ +{ + printf("%x rather than %x", htonl(before[1]), after[1]); + exit(1); +} + +BEGIN +/after[1] != ntohl(before[1])/ +{ + printf("%x rather than %x", ntohl(before[1]), after[1]); + exit(1); +} + +BEGIN +/after[2] != htonll(before[2])/ +{ + printf("%x rather than %x", htonll(before[2]), after[2]); + exit(1); +} + +BEGIN +/after[2] != ntohll(before[2])/ +{ + printf("%x rather than %x", ntohll(before[2]), after[2]); + exit(1); +} + +BEGIN +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.index.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.index.d new file mode 100644 index 00000000..547730a1 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.index.d @@ -0,0 +1,226 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma D option quiet + +struct { + string str; + string substr; + int haspos; + int position; +} command[int]; + +int i; + +BEGIN +{ + command[i].str = "foobarbaz"; + command[i].substr = "barbaz"; + i++; + + command[i].str = "foofoofoo"; + command[i].substr = "foo"; + i++; + + command[i].str = "boofoofoo"; + command[i].substr = "foo"; + i++; + + command[i].str = "foobarbaz"; + command[i].substr = "barbazzy"; + i++; + + command[i].str = "foobar"; + command[i].substr = "foobar"; + i++; + + command[i].str = "foobar"; + command[i].substr = "foobarbaz"; + i++; + + command[i].str = ""; + command[i].substr = "foobar"; + i++; + + command[i].str = "foobar"; + command[i].substr = ""; + i++; + + command[i].str = ""; + command[i].substr = ""; + i++; + + command[i].str = "foo"; + command[i].substr = ""; + i++; + + end = j = k = 0; + printf("#!/usr/perl5/bin/perl\n\nBEGIN {\n"); +} + +tick-1ms +/j < i && end == 0/ +{ + command[i + k].str = command[j].str; + command[i + k].substr = command[j].substr; + command[i + k].haspos = 1; + command[i + k].position = -400; + k++; + + command[i + k].str = command[j].str; + command[i + k].substr = command[j].substr; + command[i + k].haspos = 1; + command[i + k].position = -1; + k++; + + command[i + k].str = command[j].str; + command[i + k].substr = command[j].substr; + command[i + k].haspos = 1; + command[i + k].position = 0; + k++; + + command[i + k].str = command[j].str; + command[i + k].substr = command[j].substr; + command[i + k].haspos = 1; + command[i + k].position = strlen(command[j].str) / 2; + k++; + + command[i + k].str = command[j].str; + command[i + k].substr = command[j].substr; + command[i + k].haspos = 1; + command[i + k].position = strlen(command[j].str); + k++; + + command[i + k].str = command[j].str; + command[i + k].substr = command[j].substr; + command[i + k].haspos = 1; + command[i + k].position = strlen(command[j].str) + 1; + k++; + + command[i + k].str = command[j].str; + command[i + k].substr = command[j].substr; + command[i + k].haspos = 1; + command[i + k].position = strlen(command[j].str) + 2; + k++; + + command[i + k].str = command[j].str; + command[i + k].substr = command[j].substr; + command[i + k].haspos = 1; + command[i + k].position = 400; + k++; + + j++; +} + +tick-1ms +/j == i && end == 0/ +{ + end = k; + i = 0; +} + +tick-1ms +/end != 0 && i < end && !command[i].haspos/ +{ + this->result = index(command[i].str, command[i].substr); + + printf("\tif (index(\"%s\", \"%s\") != %d) {\n", + command[i].str, command[i].substr, this->result); + printf("\t\tprintf(\"perl => index(\\\"%s\\\", \\\"%s\\\") = ", + command[i].str, command[i].substr); + printf("%%d\\n\",\n\t\t index(\"%s\", \"%s\"));\n", + command[i].str, command[i].substr); + printf("\t\tprintf(\" D => index(\\\"%s\\\", \\\"%s\\\") = ", + command[i].str, command[i].substr); + printf("%d\\n\");\n", this->result); + printf("\t\t$failed++;\n"); + printf("\t}\n\n"); +} + +tick-1ms +/end != 0 && i < end && !command[i].haspos/ +{ + this->result = rindex(command[i].str, command[i].substr); + + printf("\tif (rindex(\"%s\", \"%s\") != %d) {\n", + command[i].str, command[i].substr, this->result); + printf("\t\tprintf(\"perl => rindex(\\\"%s\\\", \\\"%s\\\") = ", + command[i].str, command[i].substr); + printf("%%d\\n\",\n\t\t rindex(\"%s\", \"%s\"));\n", + command[i].str, command[i].substr); + printf("\t\tprintf(\" D => rindex(\\\"%s\\\", \\\"%s\\\") = ", + command[i].str, command[i].substr); + printf("%d\\n\");\n", this->result); + printf("\t\t$failed++;\n"); + printf("\t}\n\n"); +} + +tick-1ms +/end != 0 && i < end && command[i].haspos/ +{ + this->result = index(command[i].str, + command[i].substr, command[i].position); + + printf("\tif (index(\"%s\", \"%s\", %d) != %d) {\n", command[i].str, + command[i].substr, command[i].position, this->result); + printf("\t\tprintf(\"perl => index(\\\"%s\\\", \\\"%s\\\", %d) = ", + command[i].str, command[i].substr, command[i].position); + printf("%%d\\n\",\n\t\t index(\"%s\", \"%s\", %d));\n", + command[i].str, command[i].substr, command[i].position); + printf("\t\tprintf(\" D => index(\\\"%s\\\", \\\"%s\\\", %d) = ", + command[i].str, command[i].substr, command[i].position); + printf("%d\\n\");\n", this->result); + printf("\t\t$failed++;\n"); + printf("\t}\n\n"); +} + +tick-1ms +/end != 0 && i < end && command[i].haspos/ +{ + this->result = rindex(command[i].str, + command[i].substr, command[i].position); + + printf("\tif (rindex(\"%s\", \"%s\", %d) != %d) {\n", command[i].str, + command[i].substr, command[i].position, this->result); + printf("\t\tprintf(\"perl => rindex(\\\"%s\\\", \\\"%s\\\", %d) = ", + command[i].str, command[i].substr, command[i].position); + printf("%%d\\n\",\n\t\t rindex(\"%s\", \"%s\", %d));\n", + command[i].str, command[i].substr, command[i].position); + printf("\t\tprintf(\" D => rindex(\\\"%s\\\", \\\"%s\\\", %d) = ", + command[i].str, command[i].substr, command[i].position); + printf("%d\\n\");\n", this->result); + printf("\t\t$failed++;\n"); + printf("\t}\n\n"); +} + +tick-1ms +/end != 0 && ++i == end/ +{ + printf("\texit($failed);\n}\n"); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.index.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.index.d.out new file mode 100755 index 00000000..276576c2 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.index.d.out @@ -0,0 +1,1126 @@ +#!/usr/perl5/bin/perl + +BEGIN { + if (index("foobarbaz", "barbaz") != 3) { + printf("perl => index(\"foobarbaz\", \"barbaz\") = %d\n", + index("foobarbaz", "barbaz")); + printf(" D => index(\"foobarbaz\", \"barbaz\") = 3\n"); + $failed++; + } + + if (rindex("foobarbaz", "barbaz") != 3) { + printf("perl => rindex(\"foobarbaz\", \"barbaz\") = %d\n", + rindex("foobarbaz", "barbaz")); + printf(" D => rindex(\"foobarbaz\", \"barbaz\") = 3\n"); + $failed++; + } + + if (index("foofoofoo", "foo") != 0) { + printf("perl => index(\"foofoofoo\", \"foo\") = %d\n", + index("foofoofoo", "foo")); + printf(" D => index(\"foofoofoo\", \"foo\") = 0\n"); + $failed++; + } + + if (rindex("foofoofoo", "foo") != 6) { + printf("perl => rindex(\"foofoofoo\", \"foo\") = %d\n", + rindex("foofoofoo", "foo")); + printf(" D => rindex(\"foofoofoo\", \"foo\") = 6\n"); + $failed++; + } + + if (index("boofoofoo", "foo") != 3) { + printf("perl => index(\"boofoofoo\", \"foo\") = %d\n", + index("boofoofoo", "foo")); + printf(" D => index(\"boofoofoo\", \"foo\") = 3\n"); + $failed++; + } + + if (rindex("boofoofoo", "foo") != 6) { + printf("perl => rindex(\"boofoofoo\", \"foo\") = %d\n", + rindex("boofoofoo", "foo")); + printf(" D => rindex(\"boofoofoo\", \"foo\") = 6\n"); + $failed++; + } + + if (index("foobarbaz", "barbazzy") != -1) { + printf("perl => index(\"foobarbaz\", \"barbazzy\") = %d\n", + index("foobarbaz", "barbazzy")); + printf(" D => index(\"foobarbaz\", \"barbazzy\") = -1\n"); + $failed++; + } + + if (rindex("foobarbaz", "barbazzy") != -1) { + printf("perl => rindex(\"foobarbaz\", \"barbazzy\") = %d\n", + rindex("foobarbaz", "barbazzy")); + printf(" D => rindex(\"foobarbaz\", \"barbazzy\") = -1\n"); + $failed++; + } + + if (index("foobar", "foobar") != 0) { + printf("perl => index(\"foobar\", \"foobar\") = %d\n", + index("foobar", "foobar")); + printf(" D => index(\"foobar\", \"foobar\") = 0\n"); + $failed++; + } + + if (rindex("foobar", "foobar") != 0) { + printf("perl => rindex(\"foobar\", \"foobar\") = %d\n", + rindex("foobar", "foobar")); + printf(" D => rindex(\"foobar\", \"foobar\") = 0\n"); + $failed++; + } + + if (index("foobar", "foobarbaz") != -1) { + printf("perl => index(\"foobar\", \"foobarbaz\") = %d\n", + index("foobar", "foobarbaz")); + printf(" D => index(\"foobar\", \"foobarbaz\") = -1\n"); + $failed++; + } + + if (rindex("foobar", "foobarbaz") != -1) { + printf("perl => rindex(\"foobar\", \"foobarbaz\") = %d\n", + rindex("foobar", "foobarbaz")); + printf(" D => rindex(\"foobar\", \"foobarbaz\") = -1\n"); + $failed++; + } + + if (index("", "foobar") != -1) { + printf("perl => index(\"\", \"foobar\") = %d\n", + index("", "foobar")); + printf(" D => index(\"\", \"foobar\") = -1\n"); + $failed++; + } + + if (rindex("", "foobar") != -1) { + printf("perl => rindex(\"\", \"foobar\") = %d\n", + rindex("", "foobar")); + printf(" D => rindex(\"\", \"foobar\") = -1\n"); + $failed++; + } + + if (index("foobar", "") != 0) { + printf("perl => index(\"foobar\", \"\") = %d\n", + index("foobar", "")); + printf(" D => index(\"foobar\", \"\") = 0\n"); + $failed++; + } + + if (rindex("foobar", "") != 6) { + printf("perl => rindex(\"foobar\", \"\") = %d\n", + rindex("foobar", "")); + printf(" D => rindex(\"foobar\", \"\") = 6\n"); + $failed++; + } + + if (index("", "") != 0) { + printf("perl => index(\"\", \"\") = %d\n", + index("", "")); + printf(" D => index(\"\", \"\") = 0\n"); + $failed++; + } + + if (rindex("", "") != 0) { + printf("perl => rindex(\"\", \"\") = %d\n", + rindex("", "")); + printf(" D => rindex(\"\", \"\") = 0\n"); + $failed++; + } + + if (index("foo", "") != 0) { + printf("perl => index(\"foo\", \"\") = %d\n", + index("foo", "")); + printf(" D => index(\"foo\", \"\") = 0\n"); + $failed++; + } + + if (rindex("foo", "") != 3) { + printf("perl => rindex(\"foo\", \"\") = %d\n", + rindex("foo", "")); + printf(" D => rindex(\"foo\", \"\") = 3\n"); + $failed++; + } + + if (index("foobarbaz", "barbaz", -400) != 3) { + printf("perl => index(\"foobarbaz\", \"barbaz\", -400) = %d\n", + index("foobarbaz", "barbaz", -400)); + printf(" D => index(\"foobarbaz\", \"barbaz\", -400) = 3\n"); + $failed++; + } + + if (rindex("foobarbaz", "barbaz", -400) != -1) { + printf("perl => rindex(\"foobarbaz\", \"barbaz\", -400) = %d\n", + rindex("foobarbaz", "barbaz", -400)); + printf(" D => rindex(\"foobarbaz\", \"barbaz\", -400) = -1\n"); + $failed++; + } + + if (index("foobarbaz", "barbaz", -1) != 3) { + printf("perl => index(\"foobarbaz\", \"barbaz\", -1) = %d\n", + index("foobarbaz", "barbaz", -1)); + printf(" D => index(\"foobarbaz\", \"barbaz\", -1) = 3\n"); + $failed++; + } + + if (rindex("foobarbaz", "barbaz", -1) != -1) { + printf("perl => rindex(\"foobarbaz\", \"barbaz\", -1) = %d\n", + rindex("foobarbaz", "barbaz", -1)); + printf(" D => rindex(\"foobarbaz\", \"barbaz\", -1) = -1\n"); + $failed++; + } + + if (index("foobarbaz", "barbaz", 0) != 3) { + printf("perl => index(\"foobarbaz\", \"barbaz\", 0) = %d\n", + index("foobarbaz", "barbaz", 0)); + printf(" D => index(\"foobarbaz\", \"barbaz\", 0) = 3\n"); + $failed++; + } + + if (rindex("foobarbaz", "barbaz", 0) != -1) { + printf("perl => rindex(\"foobarbaz\", \"barbaz\", 0) = %d\n", + rindex("foobarbaz", "barbaz", 0)); + printf(" D => rindex(\"foobarbaz\", \"barbaz\", 0) = -1\n"); + $failed++; + } + + if (index("foobarbaz", "barbaz", 4) != -1) { + printf("perl => index(\"foobarbaz\", \"barbaz\", 4) = %d\n", + index("foobarbaz", "barbaz", 4)); + printf(" D => index(\"foobarbaz\", \"barbaz\", 4) = -1\n"); + $failed++; + } + + if (rindex("foobarbaz", "barbaz", 4) != 3) { + printf("perl => rindex(\"foobarbaz\", \"barbaz\", 4) = %d\n", + rindex("foobarbaz", "barbaz", 4)); + printf(" D => rindex(\"foobarbaz\", \"barbaz\", 4) = 3\n"); + $failed++; + } + + if (index("foobarbaz", "barbaz", 9) != -1) { + printf("perl => index(\"foobarbaz\", \"barbaz\", 9) = %d\n", + index("foobarbaz", "barbaz", 9)); + printf(" D => index(\"foobarbaz\", \"barbaz\", 9) = -1\n"); + $failed++; + } + + if (rindex("foobarbaz", "barbaz", 9) != 3) { + printf("perl => rindex(\"foobarbaz\", \"barbaz\", 9) = %d\n", + rindex("foobarbaz", "barbaz", 9)); + printf(" D => rindex(\"foobarbaz\", \"barbaz\", 9) = 3\n"); + $failed++; + } + + if (index("foobarbaz", "barbaz", 10) != -1) { + printf("perl => index(\"foobarbaz\", \"barbaz\", 10) = %d\n", + index("foobarbaz", "barbaz", 10)); + printf(" D => index(\"foobarbaz\", \"barbaz\", 10) = -1\n"); + $failed++; + } + + if (rindex("foobarbaz", "barbaz", 10) != 3) { + printf("perl => rindex(\"foobarbaz\", \"barbaz\", 10) = %d\n", + rindex("foobarbaz", "barbaz", 10)); + printf(" D => rindex(\"foobarbaz\", \"barbaz\", 10) = 3\n"); + $failed++; + } + + if (index("foobarbaz", "barbaz", 11) != -1) { + printf("perl => index(\"foobarbaz\", \"barbaz\", 11) = %d\n", + index("foobarbaz", "barbaz", 11)); + printf(" D => index(\"foobarbaz\", \"barbaz\", 11) = -1\n"); + $failed++; + } + + if (rindex("foobarbaz", "barbaz", 11) != 3) { + printf("perl => rindex(\"foobarbaz\", \"barbaz\", 11) = %d\n", + rindex("foobarbaz", "barbaz", 11)); + printf(" D => rindex(\"foobarbaz\", \"barbaz\", 11) = 3\n"); + $failed++; + } + + if (index("foobarbaz", "barbaz", 400) != -1) { + printf("perl => index(\"foobarbaz\", \"barbaz\", 400) = %d\n", + index("foobarbaz", "barbaz", 400)); + printf(" D => index(\"foobarbaz\", \"barbaz\", 400) = -1\n"); + $failed++; + } + + if (rindex("foobarbaz", "barbaz", 400) != 3) { + printf("perl => rindex(\"foobarbaz\", \"barbaz\", 400) = %d\n", + rindex("foobarbaz", "barbaz", 400)); + printf(" D => rindex(\"foobarbaz\", \"barbaz\", 400) = 3\n"); + $failed++; + } + + if (index("foofoofoo", "foo", -400) != 0) { + printf("perl => index(\"foofoofoo\", \"foo\", -400) = %d\n", + index("foofoofoo", "foo", -400)); + printf(" D => index(\"foofoofoo\", \"foo\", -400) = 0\n"); + $failed++; + } + + if (rindex("foofoofoo", "foo", -400) != -1) { + printf("perl => rindex(\"foofoofoo\", \"foo\", -400) = %d\n", + rindex("foofoofoo", "foo", -400)); + printf(" D => rindex(\"foofoofoo\", \"foo\", -400) = -1\n"); + $failed++; + } + + if (index("foofoofoo", "foo", -1) != 0) { + printf("perl => index(\"foofoofoo\", \"foo\", -1) = %d\n", + index("foofoofoo", "foo", -1)); + printf(" D => index(\"foofoofoo\", \"foo\", -1) = 0\n"); + $failed++; + } + + if (rindex("foofoofoo", "foo", -1) != -1) { + printf("perl => rindex(\"foofoofoo\", \"foo\", -1) = %d\n", + rindex("foofoofoo", "foo", -1)); + printf(" D => rindex(\"foofoofoo\", \"foo\", -1) = -1\n"); + $failed++; + } + + if (index("foofoofoo", "foo", 0) != 0) { + printf("perl => index(\"foofoofoo\", \"foo\", 0) = %d\n", + index("foofoofoo", "foo", 0)); + printf(" D => index(\"foofoofoo\", \"foo\", 0) = 0\n"); + $failed++; + } + + if (rindex("foofoofoo", "foo", 0) != 0) { + printf("perl => rindex(\"foofoofoo\", \"foo\", 0) = %d\n", + rindex("foofoofoo", "foo", 0)); + printf(" D => rindex(\"foofoofoo\", \"foo\", 0) = 0\n"); + $failed++; + } + + if (index("foofoofoo", "foo", 4) != 6) { + printf("perl => index(\"foofoofoo\", \"foo\", 4) = %d\n", + index("foofoofoo", "foo", 4)); + printf(" D => index(\"foofoofoo\", \"foo\", 4) = 6\n"); + $failed++; + } + + if (rindex("foofoofoo", "foo", 4) != 3) { + printf("perl => rindex(\"foofoofoo\", \"foo\", 4) = %d\n", + rindex("foofoofoo", "foo", 4)); + printf(" D => rindex(\"foofoofoo\", \"foo\", 4) = 3\n"); + $failed++; + } + + if (index("foofoofoo", "foo", 9) != -1) { + printf("perl => index(\"foofoofoo\", \"foo\", 9) = %d\n", + index("foofoofoo", "foo", 9)); + printf(" D => index(\"foofoofoo\", \"foo\", 9) = -1\n"); + $failed++; + } + + if (rindex("foofoofoo", "foo", 9) != 6) { + printf("perl => rindex(\"foofoofoo\", \"foo\", 9) = %d\n", + rindex("foofoofoo", "foo", 9)); + printf(" D => rindex(\"foofoofoo\", \"foo\", 9) = 6\n"); + $failed++; + } + + if (index("foofoofoo", "foo", 10) != -1) { + printf("perl => index(\"foofoofoo\", \"foo\", 10) = %d\n", + index("foofoofoo", "foo", 10)); + printf(" D => index(\"foofoofoo\", \"foo\", 10) = -1\n"); + $failed++; + } + + if (rindex("foofoofoo", "foo", 10) != 6) { + printf("perl => rindex(\"foofoofoo\", \"foo\", 10) = %d\n", + rindex("foofoofoo", "foo", 10)); + printf(" D => rindex(\"foofoofoo\", \"foo\", 10) = 6\n"); + $failed++; + } + + if (index("foofoofoo", "foo", 11) != -1) { + printf("perl => index(\"foofoofoo\", \"foo\", 11) = %d\n", + index("foofoofoo", "foo", 11)); + printf(" D => index(\"foofoofoo\", \"foo\", 11) = -1\n"); + $failed++; + } + + if (rindex("foofoofoo", "foo", 11) != 6) { + printf("perl => rindex(\"foofoofoo\", \"foo\", 11) = %d\n", + rindex("foofoofoo", "foo", 11)); + printf(" D => rindex(\"foofoofoo\", \"foo\", 11) = 6\n"); + $failed++; + } + + if (index("foofoofoo", "foo", 400) != -1) { + printf("perl => index(\"foofoofoo\", \"foo\", 400) = %d\n", + index("foofoofoo", "foo", 400)); + printf(" D => index(\"foofoofoo\", \"foo\", 400) = -1\n"); + $failed++; + } + + if (rindex("foofoofoo", "foo", 400) != 6) { + printf("perl => rindex(\"foofoofoo\", \"foo\", 400) = %d\n", + rindex("foofoofoo", "foo", 400)); + printf(" D => rindex(\"foofoofoo\", \"foo\", 400) = 6\n"); + $failed++; + } + + if (index("boofoofoo", "foo", -400) != 3) { + printf("perl => index(\"boofoofoo\", \"foo\", -400) = %d\n", + index("boofoofoo", "foo", -400)); + printf(" D => index(\"boofoofoo\", \"foo\", -400) = 3\n"); + $failed++; + } + + if (rindex("boofoofoo", "foo", -400) != -1) { + printf("perl => rindex(\"boofoofoo\", \"foo\", -400) = %d\n", + rindex("boofoofoo", "foo", -400)); + printf(" D => rindex(\"boofoofoo\", \"foo\", -400) = -1\n"); + $failed++; + } + + if (index("boofoofoo", "foo", -1) != 3) { + printf("perl => index(\"boofoofoo\", \"foo\", -1) = %d\n", + index("boofoofoo", "foo", -1)); + printf(" D => index(\"boofoofoo\", \"foo\", -1) = 3\n"); + $failed++; + } + + if (rindex("boofoofoo", "foo", -1) != -1) { + printf("perl => rindex(\"boofoofoo\", \"foo\", -1) = %d\n", + rindex("boofoofoo", "foo", -1)); + printf(" D => rindex(\"boofoofoo\", \"foo\", -1) = -1\n"); + $failed++; + } + + if (index("boofoofoo", "foo", 0) != 3) { + printf("perl => index(\"boofoofoo\", \"foo\", 0) = %d\n", + index("boofoofoo", "foo", 0)); + printf(" D => index(\"boofoofoo\", \"foo\", 0) = 3\n"); + $failed++; + } + + if (rindex("boofoofoo", "foo", 0) != -1) { + printf("perl => rindex(\"boofoofoo\", \"foo\", 0) = %d\n", + rindex("boofoofoo", "foo", 0)); + printf(" D => rindex(\"boofoofoo\", \"foo\", 0) = -1\n"); + $failed++; + } + + if (index("boofoofoo", "foo", 4) != 6) { + printf("perl => index(\"boofoofoo\", \"foo\", 4) = %d\n", + index("boofoofoo", "foo", 4)); + printf(" D => index(\"boofoofoo\", \"foo\", 4) = 6\n"); + $failed++; + } + + if (rindex("boofoofoo", "foo", 4) != 3) { + printf("perl => rindex(\"boofoofoo\", \"foo\", 4) = %d\n", + rindex("boofoofoo", "foo", 4)); + printf(" D => rindex(\"boofoofoo\", \"foo\", 4) = 3\n"); + $failed++; + } + + if (index("boofoofoo", "foo", 9) != -1) { + printf("perl => index(\"boofoofoo\", \"foo\", 9) = %d\n", + index("boofoofoo", "foo", 9)); + printf(" D => index(\"boofoofoo\", \"foo\", 9) = -1\n"); + $failed++; + } + + if (rindex("boofoofoo", "foo", 9) != 6) { + printf("perl => rindex(\"boofoofoo\", \"foo\", 9) = %d\n", + rindex("boofoofoo", "foo", 9)); + printf(" D => rindex(\"boofoofoo\", \"foo\", 9) = 6\n"); + $failed++; + } + + if (index("boofoofoo", "foo", 10) != -1) { + printf("perl => index(\"boofoofoo\", \"foo\", 10) = %d\n", + index("boofoofoo", "foo", 10)); + printf(" D => index(\"boofoofoo\", \"foo\", 10) = -1\n"); + $failed++; + } + + if (rindex("boofoofoo", "foo", 10) != 6) { + printf("perl => rindex(\"boofoofoo\", \"foo\", 10) = %d\n", + rindex("boofoofoo", "foo", 10)); + printf(" D => rindex(\"boofoofoo\", \"foo\", 10) = 6\n"); + $failed++; + } + + if (index("boofoofoo", "foo", 11) != -1) { + printf("perl => index(\"boofoofoo\", \"foo\", 11) = %d\n", + index("boofoofoo", "foo", 11)); + printf(" D => index(\"boofoofoo\", \"foo\", 11) = -1\n"); + $failed++; + } + + if (rindex("boofoofoo", "foo", 11) != 6) { + printf("perl => rindex(\"boofoofoo\", \"foo\", 11) = %d\n", + rindex("boofoofoo", "foo", 11)); + printf(" D => rindex(\"boofoofoo\", \"foo\", 11) = 6\n"); + $failed++; + } + + if (index("boofoofoo", "foo", 400) != -1) { + printf("perl => index(\"boofoofoo\", \"foo\", 400) = %d\n", + index("boofoofoo", "foo", 400)); + printf(" D => index(\"boofoofoo\", \"foo\", 400) = -1\n"); + $failed++; + } + + if (rindex("boofoofoo", "foo", 400) != 6) { + printf("perl => rindex(\"boofoofoo\", \"foo\", 400) = %d\n", + rindex("boofoofoo", "foo", 400)); + printf(" D => rindex(\"boofoofoo\", \"foo\", 400) = 6\n"); + $failed++; + } + + if (index("foobarbaz", "barbazzy", -400) != -1) { + printf("perl => index(\"foobarbaz\", \"barbazzy\", -400) = %d\n", + index("foobarbaz", "barbazzy", -400)); + printf(" D => index(\"foobarbaz\", \"barbazzy\", -400) = -1\n"); + $failed++; + } + + if (rindex("foobarbaz", "barbazzy", -400) != -1) { + printf("perl => rindex(\"foobarbaz\", \"barbazzy\", -400) = %d\n", + rindex("foobarbaz", "barbazzy", -400)); + printf(" D => rindex(\"foobarbaz\", \"barbazzy\", -400) = -1\n"); + $failed++; + } + + if (index("foobarbaz", "barbazzy", -1) != -1) { + printf("perl => index(\"foobarbaz\", \"barbazzy\", -1) = %d\n", + index("foobarbaz", "barbazzy", -1)); + printf(" D => index(\"foobarbaz\", \"barbazzy\", -1) = -1\n"); + $failed++; + } + + if (rindex("foobarbaz", "barbazzy", -1) != -1) { + printf("perl => rindex(\"foobarbaz\", \"barbazzy\", -1) = %d\n", + rindex("foobarbaz", "barbazzy", -1)); + printf(" D => rindex(\"foobarbaz\", \"barbazzy\", -1) = -1\n"); + $failed++; + } + + if (index("foobarbaz", "barbazzy", 0) != -1) { + printf("perl => index(\"foobarbaz\", \"barbazzy\", 0) = %d\n", + index("foobarbaz", "barbazzy", 0)); + printf(" D => index(\"foobarbaz\", \"barbazzy\", 0) = -1\n"); + $failed++; + } + + if (rindex("foobarbaz", "barbazzy", 0) != -1) { + printf("perl => rindex(\"foobarbaz\", \"barbazzy\", 0) = %d\n", + rindex("foobarbaz", "barbazzy", 0)); + printf(" D => rindex(\"foobarbaz\", \"barbazzy\", 0) = -1\n"); + $failed++; + } + + if (index("foobarbaz", "barbazzy", 4) != -1) { + printf("perl => index(\"foobarbaz\", \"barbazzy\", 4) = %d\n", + index("foobarbaz", "barbazzy", 4)); + printf(" D => index(\"foobarbaz\", \"barbazzy\", 4) = -1\n"); + $failed++; + } + + if (rindex("foobarbaz", "barbazzy", 4) != -1) { + printf("perl => rindex(\"foobarbaz\", \"barbazzy\", 4) = %d\n", + rindex("foobarbaz", "barbazzy", 4)); + printf(" D => rindex(\"foobarbaz\", \"barbazzy\", 4) = -1\n"); + $failed++; + } + + if (index("foobarbaz", "barbazzy", 9) != -1) { + printf("perl => index(\"foobarbaz\", \"barbazzy\", 9) = %d\n", + index("foobarbaz", "barbazzy", 9)); + printf(" D => index(\"foobarbaz\", \"barbazzy\", 9) = -1\n"); + $failed++; + } + + if (rindex("foobarbaz", "barbazzy", 9) != -1) { + printf("perl => rindex(\"foobarbaz\", \"barbazzy\", 9) = %d\n", + rindex("foobarbaz", "barbazzy", 9)); + printf(" D => rindex(\"foobarbaz\", \"barbazzy\", 9) = -1\n"); + $failed++; + } + + if (index("foobarbaz", "barbazzy", 10) != -1) { + printf("perl => index(\"foobarbaz\", \"barbazzy\", 10) = %d\n", + index("foobarbaz", "barbazzy", 10)); + printf(" D => index(\"foobarbaz\", \"barbazzy\", 10) = -1\n"); + $failed++; + } + + if (rindex("foobarbaz", "barbazzy", 10) != -1) { + printf("perl => rindex(\"foobarbaz\", \"barbazzy\", 10) = %d\n", + rindex("foobarbaz", "barbazzy", 10)); + printf(" D => rindex(\"foobarbaz\", \"barbazzy\", 10) = -1\n"); + $failed++; + } + + if (index("foobarbaz", "barbazzy", 11) != -1) { + printf("perl => index(\"foobarbaz\", \"barbazzy\", 11) = %d\n", + index("foobarbaz", "barbazzy", 11)); + printf(" D => index(\"foobarbaz\", \"barbazzy\", 11) = -1\n"); + $failed++; + } + + if (rindex("foobarbaz", "barbazzy", 11) != -1) { + printf("perl => rindex(\"foobarbaz\", \"barbazzy\", 11) = %d\n", + rindex("foobarbaz", "barbazzy", 11)); + printf(" D => rindex(\"foobarbaz\", \"barbazzy\", 11) = -1\n"); + $failed++; + } + + if (index("foobarbaz", "barbazzy", 400) != -1) { + printf("perl => index(\"foobarbaz\", \"barbazzy\", 400) = %d\n", + index("foobarbaz", "barbazzy", 400)); + printf(" D => index(\"foobarbaz\", \"barbazzy\", 400) = -1\n"); + $failed++; + } + + if (rindex("foobarbaz", "barbazzy", 400) != -1) { + printf("perl => rindex(\"foobarbaz\", \"barbazzy\", 400) = %d\n", + rindex("foobarbaz", "barbazzy", 400)); + printf(" D => rindex(\"foobarbaz\", \"barbazzy\", 400) = -1\n"); + $failed++; + } + + if (index("foobar", "foobar", -400) != 0) { + printf("perl => index(\"foobar\", \"foobar\", -400) = %d\n", + index("foobar", "foobar", -400)); + printf(" D => index(\"foobar\", \"foobar\", -400) = 0\n"); + $failed++; + } + + if (rindex("foobar", "foobar", -400) != -1) { + printf("perl => rindex(\"foobar\", \"foobar\", -400) = %d\n", + rindex("foobar", "foobar", -400)); + printf(" D => rindex(\"foobar\", \"foobar\", -400) = -1\n"); + $failed++; + } + + if (index("foobar", "foobar", -1) != 0) { + printf("perl => index(\"foobar\", \"foobar\", -1) = %d\n", + index("foobar", "foobar", -1)); + printf(" D => index(\"foobar\", \"foobar\", -1) = 0\n"); + $failed++; + } + + if (rindex("foobar", "foobar", -1) != -1) { + printf("perl => rindex(\"foobar\", \"foobar\", -1) = %d\n", + rindex("foobar", "foobar", -1)); + printf(" D => rindex(\"foobar\", \"foobar\", -1) = -1\n"); + $failed++; + } + + if (index("foobar", "foobar", 0) != 0) { + printf("perl => index(\"foobar\", \"foobar\", 0) = %d\n", + index("foobar", "foobar", 0)); + printf(" D => index(\"foobar\", \"foobar\", 0) = 0\n"); + $failed++; + } + + if (rindex("foobar", "foobar", 0) != 0) { + printf("perl => rindex(\"foobar\", \"foobar\", 0) = %d\n", + rindex("foobar", "foobar", 0)); + printf(" D => rindex(\"foobar\", \"foobar\", 0) = 0\n"); + $failed++; + } + + if (index("foobar", "foobar", 3) != -1) { + printf("perl => index(\"foobar\", \"foobar\", 3) = %d\n", + index("foobar", "foobar", 3)); + printf(" D => index(\"foobar\", \"foobar\", 3) = -1\n"); + $failed++; + } + + if (rindex("foobar", "foobar", 3) != 0) { + printf("perl => rindex(\"foobar\", \"foobar\", 3) = %d\n", + rindex("foobar", "foobar", 3)); + printf(" D => rindex(\"foobar\", \"foobar\", 3) = 0\n"); + $failed++; + } + + if (index("foobar", "foobar", 6) != -1) { + printf("perl => index(\"foobar\", \"foobar\", 6) = %d\n", + index("foobar", "foobar", 6)); + printf(" D => index(\"foobar\", \"foobar\", 6) = -1\n"); + $failed++; + } + + if (rindex("foobar", "foobar", 6) != 0) { + printf("perl => rindex(\"foobar\", \"foobar\", 6) = %d\n", + rindex("foobar", "foobar", 6)); + printf(" D => rindex(\"foobar\", \"foobar\", 6) = 0\n"); + $failed++; + } + + if (index("foobar", "foobar", 7) != -1) { + printf("perl => index(\"foobar\", \"foobar\", 7) = %d\n", + index("foobar", "foobar", 7)); + printf(" D => index(\"foobar\", \"foobar\", 7) = -1\n"); + $failed++; + } + + if (rindex("foobar", "foobar", 7) != 0) { + printf("perl => rindex(\"foobar\", \"foobar\", 7) = %d\n", + rindex("foobar", "foobar", 7)); + printf(" D => rindex(\"foobar\", \"foobar\", 7) = 0\n"); + $failed++; + } + + if (index("foobar", "foobar", 8) != -1) { + printf("perl => index(\"foobar\", \"foobar\", 8) = %d\n", + index("foobar", "foobar", 8)); + printf(" D => index(\"foobar\", \"foobar\", 8) = -1\n"); + $failed++; + } + + if (rindex("foobar", "foobar", 8) != 0) { + printf("perl => rindex(\"foobar\", \"foobar\", 8) = %d\n", + rindex("foobar", "foobar", 8)); + printf(" D => rindex(\"foobar\", \"foobar\", 8) = 0\n"); + $failed++; + } + + if (index("foobar", "foobar", 400) != -1) { + printf("perl => index(\"foobar\", \"foobar\", 400) = %d\n", + index("foobar", "foobar", 400)); + printf(" D => index(\"foobar\", \"foobar\", 400) = -1\n"); + $failed++; + } + + if (rindex("foobar", "foobar", 400) != 0) { + printf("perl => rindex(\"foobar\", \"foobar\", 400) = %d\n", + rindex("foobar", "foobar", 400)); + printf(" D => rindex(\"foobar\", \"foobar\", 400) = 0\n"); + $failed++; + } + + if (index("foobar", "foobarbaz", -400) != -1) { + printf("perl => index(\"foobar\", \"foobarbaz\", -400) = %d\n", + index("foobar", "foobarbaz", -400)); + printf(" D => index(\"foobar\", \"foobarbaz\", -400) = -1\n"); + $failed++; + } + + if (rindex("foobar", "foobarbaz", -400) != -1) { + printf("perl => rindex(\"foobar\", \"foobarbaz\", -400) = %d\n", + rindex("foobar", "foobarbaz", -400)); + printf(" D => rindex(\"foobar\", \"foobarbaz\", -400) = -1\n"); + $failed++; + } + + if (index("foobar", "foobarbaz", -1) != -1) { + printf("perl => index(\"foobar\", \"foobarbaz\", -1) = %d\n", + index("foobar", "foobarbaz", -1)); + printf(" D => index(\"foobar\", \"foobarbaz\", -1) = -1\n"); + $failed++; + } + + if (rindex("foobar", "foobarbaz", -1) != -1) { + printf("perl => rindex(\"foobar\", \"foobarbaz\", -1) = %d\n", + rindex("foobar", "foobarbaz", -1)); + printf(" D => rindex(\"foobar\", \"foobarbaz\", -1) = -1\n"); + $failed++; + } + + if (index("foobar", "foobarbaz", 0) != -1) { + printf("perl => index(\"foobar\", \"foobarbaz\", 0) = %d\n", + index("foobar", "foobarbaz", 0)); + printf(" D => index(\"foobar\", \"foobarbaz\", 0) = -1\n"); + $failed++; + } + + if (rindex("foobar", "foobarbaz", 0) != -1) { + printf("perl => rindex(\"foobar\", \"foobarbaz\", 0) = %d\n", + rindex("foobar", "foobarbaz", 0)); + printf(" D => rindex(\"foobar\", \"foobarbaz\", 0) = -1\n"); + $failed++; + } + + if (index("foobar", "foobarbaz", 3) != -1) { + printf("perl => index(\"foobar\", \"foobarbaz\", 3) = %d\n", + index("foobar", "foobarbaz", 3)); + printf(" D => index(\"foobar\", \"foobarbaz\", 3) = -1\n"); + $failed++; + } + + if (rindex("foobar", "foobarbaz", 3) != -1) { + printf("perl => rindex(\"foobar\", \"foobarbaz\", 3) = %d\n", + rindex("foobar", "foobarbaz", 3)); + printf(" D => rindex(\"foobar\", \"foobarbaz\", 3) = -1\n"); + $failed++; + } + + if (index("foobar", "foobarbaz", 6) != -1) { + printf("perl => index(\"foobar\", \"foobarbaz\", 6) = %d\n", + index("foobar", "foobarbaz", 6)); + printf(" D => index(\"foobar\", \"foobarbaz\", 6) = -1\n"); + $failed++; + } + + if (rindex("foobar", "foobarbaz", 6) != -1) { + printf("perl => rindex(\"foobar\", \"foobarbaz\", 6) = %d\n", + rindex("foobar", "foobarbaz", 6)); + printf(" D => rindex(\"foobar\", \"foobarbaz\", 6) = -1\n"); + $failed++; + } + + if (index("foobar", "foobarbaz", 7) != -1) { + printf("perl => index(\"foobar\", \"foobarbaz\", 7) = %d\n", + index("foobar", "foobarbaz", 7)); + printf(" D => index(\"foobar\", \"foobarbaz\", 7) = -1\n"); + $failed++; + } + + if (rindex("foobar", "foobarbaz", 7) != -1) { + printf("perl => rindex(\"foobar\", \"foobarbaz\", 7) = %d\n", + rindex("foobar", "foobarbaz", 7)); + printf(" D => rindex(\"foobar\", \"foobarbaz\", 7) = -1\n"); + $failed++; + } + + if (index("foobar", "foobarbaz", 8) != -1) { + printf("perl => index(\"foobar\", \"foobarbaz\", 8) = %d\n", + index("foobar", "foobarbaz", 8)); + printf(" D => index(\"foobar\", \"foobarbaz\", 8) = -1\n"); + $failed++; + } + + if (rindex("foobar", "foobarbaz", 8) != -1) { + printf("perl => rindex(\"foobar\", \"foobarbaz\", 8) = %d\n", + rindex("foobar", "foobarbaz", 8)); + printf(" D => rindex(\"foobar\", \"foobarbaz\", 8) = -1\n"); + $failed++; + } + + if (index("foobar", "foobarbaz", 400) != -1) { + printf("perl => index(\"foobar\", \"foobarbaz\", 400) = %d\n", + index("foobar", "foobarbaz", 400)); + printf(" D => index(\"foobar\", \"foobarbaz\", 400) = -1\n"); + $failed++; + } + + if (rindex("foobar", "foobarbaz", 400) != -1) { + printf("perl => rindex(\"foobar\", \"foobarbaz\", 400) = %d\n", + rindex("foobar", "foobarbaz", 400)); + printf(" D => rindex(\"foobar\", \"foobarbaz\", 400) = -1\n"); + $failed++; + } + + if (index("", "foobar", -400) != -1) { + printf("perl => index(\"\", \"foobar\", -400) = %d\n", + index("", "foobar", -400)); + printf(" D => index(\"\", \"foobar\", -400) = -1\n"); + $failed++; + } + + if (rindex("", "foobar", -400) != -1) { + printf("perl => rindex(\"\", \"foobar\", -400) = %d\n", + rindex("", "foobar", -400)); + printf(" D => rindex(\"\", \"foobar\", -400) = -1\n"); + $failed++; + } + + if (index("", "foobar", -1) != -1) { + printf("perl => index(\"\", \"foobar\", -1) = %d\n", + index("", "foobar", -1)); + printf(" D => index(\"\", \"foobar\", -1) = -1\n"); + $failed++; + } + + if (rindex("", "foobar", -1) != -1) { + printf("perl => rindex(\"\", \"foobar\", -1) = %d\n", + rindex("", "foobar", -1)); + printf(" D => rindex(\"\", \"foobar\", -1) = -1\n"); + $failed++; + } + + if (index("", "foobar", 0) != -1) { + printf("perl => index(\"\", \"foobar\", 0) = %d\n", + index("", "foobar", 0)); + printf(" D => index(\"\", \"foobar\", 0) = -1\n"); + $failed++; + } + + if (rindex("", "foobar", 0) != -1) { + printf("perl => rindex(\"\", \"foobar\", 0) = %d\n", + rindex("", "foobar", 0)); + printf(" D => rindex(\"\", \"foobar\", 0) = -1\n"); + $failed++; + } + + if (index("", "foobar", 0) != -1) { + printf("perl => index(\"\", \"foobar\", 0) = %d\n", + index("", "foobar", 0)); + printf(" D => index(\"\", \"foobar\", 0) = -1\n"); + $failed++; + } + + if (rindex("", "foobar", 0) != -1) { + printf("perl => rindex(\"\", \"foobar\", 0) = %d\n", + rindex("", "foobar", 0)); + printf(" D => rindex(\"\", \"foobar\", 0) = -1\n"); + $failed++; + } + + if (index("", "foobar", 0) != -1) { + printf("perl => index(\"\", \"foobar\", 0) = %d\n", + index("", "foobar", 0)); + printf(" D => index(\"\", \"foobar\", 0) = -1\n"); + $failed++; + } + + if (rindex("", "foobar", 0) != -1) { + printf("perl => rindex(\"\", \"foobar\", 0) = %d\n", + rindex("", "foobar", 0)); + printf(" D => rindex(\"\", \"foobar\", 0) = -1\n"); + $failed++; + } + + if (index("", "foobar", 1) != -1) { + printf("perl => index(\"\", \"foobar\", 1) = %d\n", + index("", "foobar", 1)); + printf(" D => index(\"\", \"foobar\", 1) = -1\n"); + $failed++; + } + + if (rindex("", "foobar", 1) != -1) { + printf("perl => rindex(\"\", \"foobar\", 1) = %d\n", + rindex("", "foobar", 1)); + printf(" D => rindex(\"\", \"foobar\", 1) = -1\n"); + $failed++; + } + + if (index("", "foobar", 2) != -1) { + printf("perl => index(\"\", \"foobar\", 2) = %d\n", + index("", "foobar", 2)); + printf(" D => index(\"\", \"foobar\", 2) = -1\n"); + $failed++; + } + + if (rindex("", "foobar", 2) != -1) { + printf("perl => rindex(\"\", \"foobar\", 2) = %d\n", + rindex("", "foobar", 2)); + printf(" D => rindex(\"\", \"foobar\", 2) = -1\n"); + $failed++; + } + + if (index("", "foobar", 400) != -1) { + printf("perl => index(\"\", \"foobar\", 400) = %d\n", + index("", "foobar", 400)); + printf(" D => index(\"\", \"foobar\", 400) = -1\n"); + $failed++; + } + + if (rindex("", "foobar", 400) != -1) { + printf("perl => rindex(\"\", \"foobar\", 400) = %d\n", + rindex("", "foobar", 400)); + printf(" D => rindex(\"\", \"foobar\", 400) = -1\n"); + $failed++; + } + + if (index("foobar", "", -400) != 0) { + printf("perl => index(\"foobar\", \"\", -400) = %d\n", + index("foobar", "", -400)); + printf(" D => index(\"foobar\", \"\", -400) = 0\n"); + $failed++; + } + + if (rindex("foobar", "", -400) != 0) { + printf("perl => rindex(\"foobar\", \"\", -400) = %d\n", + rindex("foobar", "", -400)); + printf(" D => rindex(\"foobar\", \"\", -400) = 0\n"); + $failed++; + } + + if (index("foobar", "", -1) != 0) { + printf("perl => index(\"foobar\", \"\", -1) = %d\n", + index("foobar", "", -1)); + printf(" D => index(\"foobar\", \"\", -1) = 0\n"); + $failed++; + } + + if (rindex("foobar", "", -1) != 0) { + printf("perl => rindex(\"foobar\", \"\", -1) = %d\n", + rindex("foobar", "", -1)); + printf(" D => rindex(\"foobar\", \"\", -1) = 0\n"); + $failed++; + } + + if (index("foobar", "", 0) != 0) { + printf("perl => index(\"foobar\", \"\", 0) = %d\n", + index("foobar", "", 0)); + printf(" D => index(\"foobar\", \"\", 0) = 0\n"); + $failed++; + } + + if (rindex("foobar", "", 0) != 0) { + printf("perl => rindex(\"foobar\", \"\", 0) = %d\n", + rindex("foobar", "", 0)); + printf(" D => rindex(\"foobar\", \"\", 0) = 0\n"); + $failed++; + } + + if (index("foobar", "", 3) != 3) { + printf("perl => index(\"foobar\", \"\", 3) = %d\n", + index("foobar", "", 3)); + printf(" D => index(\"foobar\", \"\", 3) = 3\n"); + $failed++; + } + + if (rindex("foobar", "", 3) != 3) { + printf("perl => rindex(\"foobar\", \"\", 3) = %d\n", + rindex("foobar", "", 3)); + printf(" D => rindex(\"foobar\", \"\", 3) = 3\n"); + $failed++; + } + + if (index("foobar", "", 6) != 6) { + printf("perl => index(\"foobar\", \"\", 6) = %d\n", + index("foobar", "", 6)); + printf(" D => index(\"foobar\", \"\", 6) = 6\n"); + $failed++; + } + + if (rindex("foobar", "", 6) != 6) { + printf("perl => rindex(\"foobar\", \"\", 6) = %d\n", + rindex("foobar", "", 6)); + printf(" D => rindex(\"foobar\", \"\", 6) = 6\n"); + $failed++; + } + + if (index("foobar", "", 7) != 6) { + printf("perl => index(\"foobar\", \"\", 7) = %d\n", + index("foobar", "", 7)); + printf(" D => index(\"foobar\", \"\", 7) = 6\n"); + $failed++; + } + + if (rindex("foobar", "", 7) != 6) { + printf("perl => rindex(\"foobar\", \"\", 7) = %d\n", + rindex("foobar", "", 7)); + printf(" D => rindex(\"foobar\", \"\", 7) = 6\n"); + $failed++; + } + + if (index("foobar", "", 8) != 6) { + printf("perl => index(\"foobar\", \"\", 8) = %d\n", + index("foobar", "", 8)); + printf(" D => index(\"foobar\", \"\", 8) = 6\n"); + $failed++; + } + + if (rindex("foobar", "", 8) != 6) { + printf("perl => rindex(\"foobar\", \"\", 8) = %d\n", + rindex("foobar", "", 8)); + printf(" D => rindex(\"foobar\", \"\", 8) = 6\n"); + $failed++; + } + + if (index("foobar", "", 400) != 6) { + printf("perl => index(\"foobar\", \"\", 400) = %d\n", + index("foobar", "", 400)); + printf(" D => index(\"foobar\", \"\", 400) = 6\n"); + $failed++; + } + + if (rindex("foobar", "", 400) != 6) { + printf("perl => rindex(\"foobar\", \"\", 400) = %d\n", + rindex("foobar", "", 400)); + printf(" D => rindex(\"foobar\", \"\", 400) = 6\n"); + $failed++; + } + + if (index("", "", -400) != 0) { + printf("perl => index(\"\", \"\", -400) = %d\n", + index("", "", -400)); + printf(" D => index(\"\", \"\", -400) = 0\n"); + $failed++; + } + + if (rindex("", "", -400) != 0) { + printf("perl => rindex(\"\", \"\", -400) = %d\n", + rindex("", "", -400)); + printf(" D => rindex(\"\", \"\", -400) = 0\n"); + $failed++; + } + + if (index("", "", -1) != 0) { + printf("perl => index(\"\", \"\", -1) = %d\n", + index("", "", -1)); + printf(" D => index(\"\", \"\", -1) = 0\n"); + $failed++; + } + + if (rindex("", "", -1) != 0) { + printf("perl => rindex(\"\", \"\", -1) = %d\n", + rindex("", "", -1)); + printf(" D => rindex(\"\", \"\", -1) = 0\n"); + $failed++; + } + + if (index("", "", 0) != 0) { + printf("perl => index(\"\", \"\", 0) = %d\n", + index("", "", 0)); + printf(" D => index(\"\", \"\", 0) = 0\n"); + $failed++; + } + + if (rindex("", "", 0) != 0) { + printf("perl => rindex(\"\", \"\", 0) = %d\n", + rindex("", "", 0)); + printf(" D => rindex(\"\", \"\", 0) = 0\n"); + $failed++; + } + + if (index("", "", 0) != 0) { + printf("perl => index(\"\", \"\", 0) = %d\n", + index("", "", 0)); + printf(" D => index(\"\", \"\", 0) = 0\n"); + $failed++; + } + + if (rindex("", "", 0) != 0) { + printf("perl => rindex(\"\", \"\", 0) = %d\n", + rindex("", "", 0)); + printf(" D => rindex(\"\", \"\", 0) = 0\n"); + $failed++; + } + + if (index("", "", 0) != 0) { + printf("perl => index(\"\", \"\", 0) = %d\n", + index("", "", 0)); + printf(" D => index(\"\", \"\", 0) = 0\n"); + $failed++; + } + + if (rindex("", "", 0) != 0) { + printf("perl => rindex(\"\", \"\", 0) = %d\n", + rindex("", "", 0)); + printf(" D => rindex(\"\", \"\", 0) = 0\n"); + $failed++; + } + + if (index("", "", 1) != 0) { + printf("perl => index(\"\", \"\", 1) = %d\n", + index("", "", 1)); + printf(" D => index(\"\", \"\", 1) = 0\n"); + $failed++; + } + + if (rindex("", "", 1) != 0) { + printf("perl => rindex(\"\", \"\", 1) = %d\n", + rindex("", "", 1)); + printf(" D => rindex(\"\", \"\", 1) = 0\n"); + $failed++; + } + + exit($failed); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.inet_ntoa.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.inet_ntoa.d new file mode 100644 index 00000000..cf7459d3 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.inet_ntoa.d @@ -0,0 +1,58 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma D option quiet + +ipaddr_t *ip4a; +ipaddr_t *ip4b; +ipaddr_t *ip4c; +ipaddr_t *ip4d; + +BEGIN +{ + this->buf4a = alloca(sizeof (ipaddr_t)); + this->buf4b = alloca(sizeof (ipaddr_t)); + this->buf4c = alloca(sizeof (ipaddr_t)); + this->buf4d = alloca(sizeof (ipaddr_t)); + ip4a = this->buf4a; + ip4b = this->buf4b; + ip4c = this->buf4c; + ip4d = this->buf4d; + + *ip4a = htonl(0xc0a80117); + *ip4b = htonl(0x7f000001); + *ip4c = htonl(0xffffffff); + *ip4d = htonl(0x00000000); + + printf("%s\n", inet_ntoa(ip4a)); + printf("%s\n", inet_ntoa(ip4b)); + printf("%s\n", inet_ntoa(ip4c)); + printf("%s\n", inet_ntoa(ip4d)); + + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.inet_ntoa.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.inet_ntoa.d.out new file mode 100644 index 00000000..ab535e78 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.inet_ntoa.d.out @@ -0,0 +1,5 @@ +192.168.1.23 +127.0.0.1 +255.255.255.255 +0.0.0.0 + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.inet_ntoa6.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.inet_ntoa6.d new file mode 100644 index 00000000..9a00eb78 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.inet_ntoa6.d @@ -0,0 +1,95 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma D option quiet + +struct in6_addr *ip6a; +struct in6_addr *ip6b; +struct in6_addr *ip6c; +struct in6_addr *ip6d; +struct in6_addr *ip6e; +struct in6_addr *ip6f; +struct in6_addr *ip6g; + +BEGIN +{ + this->buf6a = alloca(sizeof (struct in6_addr)); + this->buf6b = alloca(sizeof (struct in6_addr)); + this->buf6c = alloca(sizeof (struct in6_addr)); + this->buf6d = alloca(sizeof (struct in6_addr)); + this->buf6e = alloca(sizeof (struct in6_addr)); + this->buf6f = alloca(sizeof (struct in6_addr)); + this->buf6g = alloca(sizeof (struct in6_addr)); + ip6a = this->buf6a; + ip6b = this->buf6b; + ip6c = this->buf6c; + ip6d = this->buf6d; + ip6e = this->buf6e; + ip6f = this->buf6f; + ip6g = this->buf6g; + + ip6a->_S6_un._S6_u8[0] = 0xfe; + ip6a->_S6_un._S6_u8[1] = 0x80; + ip6a->_S6_un._S6_u8[8] = 0x02; + ip6a->_S6_un._S6_u8[9] = 0x14; + ip6a->_S6_un._S6_u8[10] = 0x4f; + ip6a->_S6_un._S6_u8[11] = 0xff; + ip6a->_S6_un._S6_u8[12] = 0xfe; + ip6a->_S6_un._S6_u8[13] = 0x0b; + ip6a->_S6_un._S6_u8[14] = 0x76; + ip6a->_S6_un._S6_u8[15] = 0xc8; + ip6b->_S6_un._S6_u8[0] = 0x10; + ip6b->_S6_un._S6_u8[1] = 0x80; + ip6b->_S6_un._S6_u8[10] = 0x08; + ip6b->_S6_un._S6_u8[11] = 0x08; + ip6b->_S6_un._S6_u8[13] = 0x20; + ip6b->_S6_un._S6_u8[13] = 0x0c; + ip6b->_S6_un._S6_u8[14] = 0x41; + ip6b->_S6_un._S6_u8[15] = 0x7a; + ip6c->_S6_un._S6_u8[15] = 0x01; + ip6e->_S6_un._S6_u8[12] = 0x7f; + ip6e->_S6_un._S6_u8[15] = 0x01; + ip6f->_S6_un._S6_u8[10] = 0xff; + ip6f->_S6_un._S6_u8[11] = 0xff; + ip6f->_S6_un._S6_u8[12] = 0x7f; + ip6f->_S6_un._S6_u8[15] = 0x01; + ip6g->_S6_un._S6_u8[10] = 0xff; + ip6g->_S6_un._S6_u8[11] = 0xfe; + ip6g->_S6_un._S6_u8[12] = 0x7f; + ip6g->_S6_un._S6_u8[15] = 0x01; + + printf("%s\n", inet_ntoa6(ip6a)); + printf("%s\n", inet_ntoa6(ip6b)); + printf("%s\n", inet_ntoa6(ip6c)); + printf("%s\n", inet_ntoa6(ip6d)); + printf("%s\n", inet_ntoa6(ip6e)); + printf("%s\n", inet_ntoa6(ip6f)); + printf("%s\n", inet_ntoa6(ip6g)); + + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.inet_ntoa6.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.inet_ntoa6.d.out new file mode 100644 index 00000000..d87c1f61 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.inet_ntoa6.d.out @@ -0,0 +1,8 @@ +fe80::214:4fff:fe0b:76c8 +1080::808:c:417a +::1 +:: +127.0.0.1 +127.0.0.1 +::fffe:7f00:1 + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.inet_ntop.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.inet_ntop.d new file mode 100644 index 00000000..c1e4b1bb --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.inet_ntop.d @@ -0,0 +1,135 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma D option quiet + +ipaddr_t *ip4a; +ipaddr_t *ip4b; +ipaddr_t *ip4c; +ipaddr_t *ip4d; +struct in6_addr *ip6a; +struct in6_addr *ip6b; +struct in6_addr *ip6c; +struct in6_addr *ip6d; +struct in6_addr *ip6e; +struct in6_addr *ip6f; +struct in6_addr *ip6g; +struct in6_addr *ip6h; + +BEGIN +{ + this->buf4a = alloca(sizeof (ipaddr_t)); + this->buf4b = alloca(sizeof (ipaddr_t)); + this->buf4c = alloca(sizeof (ipaddr_t)); + this->buf4d = alloca(sizeof (ipaddr_t)); + this->buf6a = alloca(sizeof (struct in6_addr)); + this->buf6b = alloca(sizeof (struct in6_addr)); + this->buf6c = alloca(sizeof (struct in6_addr)); + this->buf6d = alloca(sizeof (struct in6_addr)); + this->buf6e = alloca(sizeof (struct in6_addr)); + this->buf6f = alloca(sizeof (struct in6_addr)); + this->buf6g = alloca(sizeof (struct in6_addr)); + this->buf6h = alloca(sizeof (struct in6_addr)); + ip4a = this->buf4a; + ip4b = this->buf4b; + ip4c = this->buf4c; + ip4d = this->buf4d; + ip6a = this->buf6a; + ip6b = this->buf6b; + ip6c = this->buf6c; + ip6d = this->buf6d; + ip6e = this->buf6e; + ip6f = this->buf6f; + ip6g = this->buf6g; + ip6h = this->buf6h; + + *ip4a = htonl(0xc0a80117); + *ip4b = htonl(0x7f000001); + *ip4c = htonl(0xffffffff); + *ip4d = htonl(0x00000000); + ip6a->_S6_un._S6_u8[0] = 0xfe; + ip6a->_S6_un._S6_u8[1] = 0x80; + ip6a->_S6_un._S6_u8[8] = 0x02; + ip6a->_S6_un._S6_u8[9] = 0x14; + ip6a->_S6_un._S6_u8[10] = 0x4f; + ip6a->_S6_un._S6_u8[11] = 0xff; + ip6a->_S6_un._S6_u8[12] = 0xfe; + ip6a->_S6_un._S6_u8[13] = 0x0b; + ip6a->_S6_un._S6_u8[14] = 0x76; + ip6a->_S6_un._S6_u8[15] = 0xc8; + ip6b->_S6_un._S6_u8[0] = 0x10; + ip6b->_S6_un._S6_u8[1] = 0x80; + ip6b->_S6_un._S6_u8[10] = 0x08; + ip6b->_S6_un._S6_u8[11] = 0x08; + ip6b->_S6_un._S6_u8[13] = 0x20; + ip6b->_S6_un._S6_u8[13] = 0x0c; + ip6b->_S6_un._S6_u8[14] = 0x41; + ip6b->_S6_un._S6_u8[15] = 0x7a; + ip6c->_S6_un._S6_u8[15] = 0x01; + ip6e->_S6_un._S6_u8[12] = 0x7f; + ip6e->_S6_un._S6_u8[15] = 0x01; + ip6f->_S6_un._S6_u8[10] = 0xff; + ip6f->_S6_un._S6_u8[11] = 0xff; + ip6f->_S6_un._S6_u8[12] = 0x7f; + ip6f->_S6_un._S6_u8[15] = 0x01; + ip6g->_S6_un._S6_u8[10] = 0xff; + ip6g->_S6_un._S6_u8[11] = 0xfe; + ip6g->_S6_un._S6_u8[12] = 0x7f; + ip6g->_S6_un._S6_u8[15] = 0x01; + ip6h->_S6_un._S6_u8[0] = 0xff; + ip6h->_S6_un._S6_u8[1] = 0xff; + ip6h->_S6_un._S6_u8[2] = 0xff; + ip6h->_S6_un._S6_u8[3] = 0xff; + ip6h->_S6_un._S6_u8[4] = 0xff; + ip6h->_S6_un._S6_u8[5] = 0xff; + ip6h->_S6_un._S6_u8[6] = 0xff; + ip6h->_S6_un._S6_u8[7] = 0xff; + ip6h->_S6_un._S6_u8[8] = 0xff; + ip6h->_S6_un._S6_u8[9] = 0xff; + ip6h->_S6_un._S6_u8[10] = 0xff; + ip6h->_S6_un._S6_u8[11] = 0xff; + ip6h->_S6_un._S6_u8[12] = 0xff; + ip6h->_S6_un._S6_u8[13] = 0xff; + ip6h->_S6_un._S6_u8[14] = 0xff; + ip6h->_S6_un._S6_u8[15] = 0xff; + + printf("%s\n", inet_ntop(AF_INET, ip4a)); + printf("%s\n", inet_ntop(AF_INET, ip4b)); + printf("%s\n", inet_ntop(AF_INET, ip4c)); + printf("%s\n", inet_ntop(AF_INET, ip4d)); + printf("%s\n", inet_ntop(AF_INET6, ip6a)); + printf("%s\n", inet_ntop(AF_INET6, ip6b)); + printf("%s\n", inet_ntop(AF_INET6, ip6c)); + printf("%s\n", inet_ntop(AF_INET6, ip6d)); + printf("%s\n", inet_ntop(AF_INET6, ip6e)); + printf("%s\n", inet_ntop(AF_INET6, ip6f)); + printf("%s\n", inet_ntop(AF_INET6, ip6g)); + printf("%s\n", inet_ntop(AF_INET6, ip6h)); + + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.inet_ntop.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.inet_ntop.d.out new file mode 100644 index 00000000..7c8311c2 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.inet_ntop.d.out @@ -0,0 +1,13 @@ +192.168.1.23 +127.0.0.1 +255.255.255.255 +0.0.0.0 +fe80::214:4fff:fe0b:76c8 +1080::808:c:417a +::1 +:: +::127.0.0.1 +::ffff:127.0.0.1 +::fffe:7f00:1 +ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.lltostr.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.lltostr.d new file mode 100644 index 00000000..03e295a7 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.lltostr.d @@ -0,0 +1,41 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma D option quiet + +BEGIN +{ + printf("%s\n", lltostr(0)); + printf("%s\n", lltostr(1)); + printf("%s\n", lltostr(-1)); + printf("%s\n", lltostr(123456789)); + printf("%s\n", lltostr(-123456789)); + printf("%s\n", lltostr(1LL << 62)); + printf("%s\n", lltostr(-(1LL << 62))); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.lltostr.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.lltostr.d.out new file mode 100644 index 00000000..e007c648 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.lltostr.d.out @@ -0,0 +1,8 @@ +0 +1 +-1 +123456789 +-123456789 +4611686018427387904 +-4611686018427387904 + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.mutex_owned.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.mutex_owned.d new file mode 100644 index 00000000..b4aa84f9 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.mutex_owned.d @@ -0,0 +1,62 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * mutex_owned() should return a non-zero value if the calling + * thread currently holds the mutex. + * + * SECTION: Actions and Subroutines/mutex_owned() + */ + +#pragma D option quiet + +lockstat:::adaptive-acquire +{ + this->owned = mutex_owned((kmutex_t *)arg0); + this->owner = mutex_owner((kmutex_t *)arg0); +} + +lockstat:::adaptive-acquire +/!this->owned/ +{ + printf("mutex_owned() returned 0, expected non-zero\n"); + exit(1); +} + +lockstat:::adaptive-acquire +/this->owner != curthread/ +{ + printf("current thread is not current owner of owned lock\n"); + exit(1); +} + +lockstat:::adaptive-acquire +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.mutex_owner.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.mutex_owner.d new file mode 100644 index 00000000..a021d502 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.mutex_owner.d @@ -0,0 +1,63 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * mutex_owner() should return a pointer to the kernel thread holding + * the mutex. + * + * SECTION: Actions and Subroutines/mutex_owner() + * + * NOTES: This assertion can't be verified so we'll just call it. + */ + + + + +#pragma D option quiet + +kthread_t *ptr; + +BEGIN +{ + i = 0; +} + +lockstat:genunix:mutex_enter:adaptive-acquire +{ + + ptr = mutex_owner((kmutex_t *)arg0); + i++; +} + +tick-1 +/i > 5/ +{ + exit(0); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.mutex_type_adaptive.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.mutex_type_adaptive.d new file mode 100644 index 00000000..c13abab2 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.mutex_type_adaptive.d @@ -0,0 +1,71 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * mutex_type_adaptive() should return a non-zero value if the + * mutex is an adaptive one. + * + * SECTION: Actions and Subroutines/mutex_type_adaptive() + */ + + +#pragma D option quiet + +BEGIN +{ + i = 0; + ret = -99; +} + +mutex_enter:adaptive-acquire +{ + ret = mutex_type_adaptive((kmutex_t *)arg0); + i++; +} + +tick-1 +/ret == 1/ +{ + exit(0); +} + +tick-1 +/i == 100 && ret == 0/ +{ + printf("mutex_type_adaptive returned 0, expected non-zero\n"); + exit(1); +} + +tick-1 +/i == 100 && ret == -99/ +{ + printf("No adaptive_mutexs called in the time this test was run.\n"); + exit(1); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.progenyof.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.progenyof.d new file mode 100644 index 00000000..02911580 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.progenyof.d @@ -0,0 +1,64 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * progenyof() should return non-zero if the pid passed is in the + # progeny of the calling process. + * + * SECTION: Actions and Subroutines/progenyof() + * + */ + +#pragma D option quiet + + +BEGIN +{ + res_1 = -1; + res_2 = -1; + res_3 = -1; + + res_1 = progenyof($ppid); /* this will always be true */ + res_2 = progenyof($ppid + 1); /* this will always be false */ + res_3 = progenyof(1); /* this will always be true */ +} + + +tick-1 +/res_1 > 0 && res_2 == 0 && res_3 > 0/ +{ + exit(0); +} + +tick-1 +/res_1 <= 0 || res_2 != 0 || res_3 <= 0/ +{ + exit(1); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.rand.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.rand.d new file mode 100644 index 00000000..51f44911 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.rand.d @@ -0,0 +1,54 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: Test rand() + * + * SECTION: Actions and Subroutines/rand() + */ + + + +BEGIN +{ + i = 0; +} + +tick-1 +/i != 10/ +{ + i++; + trace(rand()); +} + +tick-1 +/i == 10/ +{ + exit(0); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.strchr.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.strchr.d new file mode 100644 index 00000000..8dc8f89b --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.strchr.d @@ -0,0 +1,71 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma D option quiet + +BEGIN +{ + str = "fooeyfooeyfoo"; + this->success = 0; + + c = 'f'; + printf("strchr(\"%s\", '%c') = \"%s\"\n", str, c, strchr(str, c)); + printf("strrchr(\"%s\", '%c') = \"%s\"\n", str, c, strrchr(str, c)); + + c = 'y'; + printf("strchr(\"%s\", '%c') = \"%s\"\n", str, c, strchr(str, c)); + printf("strrchr(\"%s\", '%c') = \"%s\"\n", str, c, strrchr(str, c)); + + printf("strrchr(\"%s\", '%c') = \"%s\"\n", strchr(str, c), c, + strrchr(strchr(str, c), c)); + + this->success = 1; +} + +BEGIN +/!this->success/ +{ + exit(1); +} + +BEGIN +/strchr(str, 'a') != NULL/ +{ + exit(2); +} + +BEGIN +/strrchr(str, 'a') != NULL/ +{ + exit(3); +} + +BEGIN +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.strchr.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.strchr.d.out new file mode 100644 index 00000000..328b5318 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.strchr.d.out @@ -0,0 +1,6 @@ +strchr("fooeyfooeyfoo", 'f') = "fooeyfooeyfoo" +strrchr("fooeyfooeyfoo", 'f') = "foo" +strchr("fooeyfooeyfoo", 'y') = "yfooeyfoo" +strrchr("fooeyfooeyfoo", 'y') = "yfoo" +strrchr("yfooeyfoo", 'y') = "yfoo" + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.strjoin.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.strjoin.d new file mode 100644 index 00000000..392c18a6 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.strjoin.d @@ -0,0 +1,38 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma D option quiet + +BEGIN +{ + printf("%s\n", strjoin("foo", "baz")); + printf("%s\n", strjoin("foo", "")); + printf("%s\n", strjoin("", "baz")); + printf("%s\n", strjoin("", "")); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.strjoin.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.strjoin.d.out new file mode 100644 index 00000000..65728694 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.strjoin.d.out @@ -0,0 +1,5 @@ +foobaz +foo +baz + + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.strstr.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.strstr.d new file mode 100644 index 00000000..0c81b7a8 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.strstr.d @@ -0,0 +1,89 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma D option quiet + +BEGIN +{ + str = "foobarbarbazbarbop"; + this->success = 0; + + c = str; + printf("strstr(\"%s\", \"%s\") = \"%s\"\n", str, c, strstr(str, c)); + + c = "baz"; + printf("strstr(\"%s\", \"%s\") = \"%s\"\n", str, c, strstr(str, c)); + + c = "bar"; + printf("strstr(\"%s\", \"%s\") = \"%s\"\n", str, c, strstr(str, c)); + + c = "bazbarbop"; + printf("strstr(\"%s\", \"%s\") = \"%s\"\n", str, c, strstr(str, c)); + + c = "barba"; + printf("strstr(\"%s\", \"%s\") = \"%s\"\n", str, c, strstr(str, c)); + + printf("strstr(\"%s\", \"%s\") = \"%s\"\n", + strstr(str, "baz"), strstr(str, "zba"), + strstr(strstr(str, "baz"), strstr(str, "zba"))); + + c = ""; + printf("strstr(\"%s\", \"%s\") = \"%s\"\n", str, c, strstr(str, c)); + + str = ""; + printf("strstr(\"%s\", \"%s\") = \"%s\"\n", str, c, strstr(str, c)); + + str = "f"; + c = "f"; + printf("strstr(\"%s\", \"%s\") = \"%s\"\n", str, c, strstr(str, c)); + + this->success = 1; +} + +BEGIN +/!this->success/ +{ + exit(1); +} + +BEGIN +/strstr(str, "barbarf") != NULL/ +{ + exit(2); +} + +BEGIN +/strstr(str, "foobarbarbazbarbopp") != NULL/ +{ + exit(3); +} + +BEGIN +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.strstr.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.strstr.d.out new file mode 100644 index 00000000..f9121dbc --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.strstr.d.out @@ -0,0 +1,10 @@ +strstr("foobarbarbazbarbop", "foobarbarbazbarbop") = "foobarbarbazbarbop" +strstr("foobarbarbazbarbop", "baz") = "bazbarbop" +strstr("foobarbarbazbarbop", "bar") = "barbarbazbarbop" +strstr("foobarbarbazbarbop", "bazbarbop") = "bazbarbop" +strstr("foobarbarbazbarbop", "barba") = "barbarbazbarbop" +strstr("bazbarbop", "zbarbop") = "zbarbop" +strstr("foobarbarbazbarbop", "") = "foobarbarbazbarbop" +strstr("", "") = "" +strstr("f", "f") = "f" + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.strtok.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.strtok.d new file mode 100644 index 00000000..47092ba4 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.strtok.d @@ -0,0 +1,146 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma D option quiet + +BEGIN +{ + this->str = ",,,Carrots,,Barley,Oatmeal,,,Beans,"; +} + +BEGIN +/(this->field = strtok(this->str, ",")) == NULL/ +{ + exit(1); +} + +BEGIN +{ + printf("%s\n", this->field); +} + +BEGIN +/(this->field = strtok(NULL, ",")) == NULL/ +{ + exit(2); +} + +BEGIN +{ + printf("%s\n", this->field); +} + +BEGIN +/(this->field = strtok(NULL, ",")) == NULL/ +{ + exit(3); +} + +BEGIN +{ + printf("%s\n", this->field); +} + +BEGIN +/(this->field = strtok(NULL, ",")) == NULL/ +{ + exit(4); +} + +BEGIN +{ + printf("%s\n", this->field); +} + +BEGIN +/(self->a = strtok(NULL, ",")) != NULL/ +{ + printf("unexpected field: %s\n", this->field); + exit(5); +} + +struct { + string s1; + string s2; + string result; +} command[int]; + +int i; + +BEGIN +{ + command[i].s1 = ""; + command[i].s2 = ""; + command[i].result = ""; + i++; + + command[i].s1 = "foo"; + command[i].s2 = ""; + command[i].result = command[i].s1; + i++; + + command[i].s1 = "foobar"; + command[i].s2 = "o"; + command[i].result = "f"; + i++; + + command[i].s1 = "oobar"; + command[i].s2 = "o"; + command[i].result = "bar"; + i++; + + command[i].s1 = "foo"; + command[i].s2 = "bar"; + command[i].result = command[i].s1; + i++; + + command[i].s1 = ""; + command[i].s2 = "foo"; + command[i].result = ""; + i++; + + end = i; + i = 0; +} + +tick-1ms +/i < end && + (this->result = strtok(command[i].s1, command[i].s2)) != command[i].result/ +{ + printf("strtok(\"%s\", \"%s\") = \"%s\", expected \"%s\"", + command[i].s1, command[i].s2, + this->result != NULL ? this->result : "", + command[i].result != NULL ? command[i].result : ""); + exit(6 + i); +} + +tick-1ms +/++i == end/ +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.strtok.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.strtok.d.out new file mode 100644 index 00000000..4bc37274 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.strtok.d.out @@ -0,0 +1,5 @@ +Carrots +Barley +Oatmeal +Beans + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.strtok_null.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.strtok_null.d new file mode 100644 index 00000000..6de4f97d --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.strtok_null.d @@ -0,0 +1,43 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * Test that a strtok(NULL, ...) without first calling strtok(string, ...) + * produces an error + */ + +BEGIN +{ + trace(strtok(NULL, "!")); + exit(1); +} + +ERROR +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.substr.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.substr.d new file mode 100644 index 00000000..edee6442 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.substr.d @@ -0,0 +1,231 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma D option quiet +#pragma D option strsize=32 + +struct { + int index; + int length; + int nolen; + int alt; +} command[int]; + +int i; + +BEGIN +{ + str = "foobarbazbop"; + str2 = ""; + altstr = "CRAIG: Positioned them, I don't "; + altstr2 = "know... I'm fairly wide guy."; + + command[i].index = 3; + command[i].nolen = 1; + i++; + + command[i].index = 300; + command[i].nolen = 1; + i++; + + command[i].index = -10; + command[i].nolen = 1; + i++; + + command[i].index = 0; + command[i].nolen = 1; + i++; + + command[i].index = 1; + command[i].nolen = 1; + i++; + + command[i].index = strlen(str) - 1; + command[i].nolen = 1; + i++; + + command[i].index = strlen(str); + command[i].nolen = 1; + i++; + + command[i].index = strlen(str) + 1; + command[i].nolen = 1; + i++; + + command[i].index = 8; + command[i].length = 20; + i++; + + command[i].index = 4; + command[i].length = 4; + i++; + + command[i].index = 5; + command[i].length = strlen(str) - command[i].index + 1; + i++; + + command[i].index = 5; + command[i].length = strlen(str) - command[i].index + 2; + i++; + + command[i].index = 400; + command[i].length = 20; + i++; + + command[i].index = 400; + command[i].length = 0; + i++; + + command[i].index = 400; + command[i].length = -1; + i++; + + command[i].index = 3; + command[i].length = 0; + i++; + + command[i].index = 3; + command[i].length = -1; + i++; + + command[i].index = 3; + command[i].length = -4; + i++; + + command[i].index = 3; + command[i].length = -20; + i++; + + command[i].index = -10; + command[i].length = -5; + i++; + + command[i].index = 0; + command[i].length = 400; + i++; + + command[i].index = -1; + command[i].length = 400; + i++; + + command[i].index = -1; + command[i].length = 0; + i++; + + command[i].index = -1; + command[i].length = -1; + i++; + + command[i].index = -2 * strlen(str); + command[i].length = 2 * strlen(str); + i++; + + command[i].index = -2 * strlen(str); + command[i].length = strlen(str); + i++; + + command[i].index = -2 * strlen(str); + command[i].length = strlen(str) + 1; + i++; + + command[i].index = -1 * strlen(str); + command[i].length = strlen(str); + i++; + + command[i].index = -1 * strlen(str); + command[i].length = strlen(str) - 1; + i++; + + command[i].index = 100; + command[i].length = 10; + command[i].alt = 1; + i++; + + command[i].index = 100; + command[i].nolen = 1; + command[i].alt = 1; + i++; + + end = i; + i = 0; + printf("#!/usr/perl5/bin/perl\n\nBEGIN {\n"); + +} + +tick-1ms +/i < end && command[i].nolen/ +{ + this->str = command[i].alt ? altstr : str; + this->str2 = command[i].alt ? altstr2 : str2; + this->result = substr(command[i].alt ? + "CRAIG: Positioned them, I don't know... I'm fairly wide guy." : + str, command[i].index); + + printf("\tif (substr(\"%s%s\", %d) ne \"%s\") {\n", + this->str, this->str2, command[i].index, this->result); + + printf("\t\tprintf(\"perl => substr(\\\"%s%s\\\", %d) = ", + this->str, this->str2, command[i].index); + printf("\\\"%%s\\\"\\n\",\n\t\t substr(\"%s%s\", %d));\n", + this->str, this->str2, command[i].index); + printf("\t\tprintf(\" D => substr(\\\"%s%s\\\", %d) = ", + this->str, this->str2, command[i].index); + printf("\\\"%%s\\\"\\n\",\n\t\t \"%s\");\n", this->result); + printf("\t\t$failed++;\n"); + printf("\t}\n\n"); +} + +tick-1ms +/i < end && !command[i].nolen/ +{ + this->str = command[i].alt ? altstr : str; + this->str2 = command[i].alt ? altstr2 : str2; + this->result = substr(command[i].alt ? + "CRAIG: Positioned them, I don't know... I'm fairly wide guy." : + str, command[i].index, command[i].length); + + printf("\tif (substr(\"%s%s\", %d, %d) ne \"%s\") {\n", + this->str, this->str2, command[i].index, command[i].length, + this->result); + printf("\t\tprintf(\"perl => substr(\\\"%s%s\\\", %d, %d) = ", + this->str, this->str2, command[i].index, command[i].length); + printf("\\\"%%s\\\"\\n\",\n\t\t substr(\"%s%s\", %d, %d));\n", + this->str, this->str2, command[i].index, command[i].length); + printf("\t\tprintf(\" D => substr(\\\"%s%s\\\", %d, %d) = ", + this->str, this->str2, command[i].index, command[i].length); + printf("\\\"%%s\\\"\\n\",\n\t\t \"%s\");\n", this->result); + printf("\t\t$failed++;\n"); + printf("\t}\n\n"); +} + +tick-1ms +/++i == end/ +{ + printf("\texit($failed);\n}\n"); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.substr.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.substr.d.out new file mode 100755 index 00000000..5b498ef3 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.substr.d.out @@ -0,0 +1,254 @@ +#!/usr/perl5/bin/perl + +BEGIN { + if (substr("foobarbazbop", 3) ne "barbazbop") { + printf("perl => substr(\"foobarbazbop\", 3) = \"%s\"\n", + substr("foobarbazbop", 3)); + printf(" D => substr(\"foobarbazbop\", 3) = \"%s\"\n", + "barbazbop"); + $failed++; + } + + if (substr("foobarbazbop", 300) ne "") { + printf("perl => substr(\"foobarbazbop\", 300) = \"%s\"\n", + substr("foobarbazbop", 300)); + printf(" D => substr(\"foobarbazbop\", 300) = \"%s\"\n", + ""); + $failed++; + } + + if (substr("foobarbazbop", -10) ne "obarbazbop") { + printf("perl => substr(\"foobarbazbop\", -10) = \"%s\"\n", + substr("foobarbazbop", -10)); + printf(" D => substr(\"foobarbazbop\", -10) = \"%s\"\n", + "obarbazbop"); + $failed++; + } + + if (substr("foobarbazbop", 0) ne "foobarbazbop") { + printf("perl => substr(\"foobarbazbop\", 0) = \"%s\"\n", + substr("foobarbazbop", 0)); + printf(" D => substr(\"foobarbazbop\", 0) = \"%s\"\n", + "foobarbazbop"); + $failed++; + } + + if (substr("foobarbazbop", 1) ne "oobarbazbop") { + printf("perl => substr(\"foobarbazbop\", 1) = \"%s\"\n", + substr("foobarbazbop", 1)); + printf(" D => substr(\"foobarbazbop\", 1) = \"%s\"\n", + "oobarbazbop"); + $failed++; + } + + if (substr("foobarbazbop", 11) ne "p") { + printf("perl => substr(\"foobarbazbop\", 11) = \"%s\"\n", + substr("foobarbazbop", 11)); + printf(" D => substr(\"foobarbazbop\", 11) = \"%s\"\n", + "p"); + $failed++; + } + + if (substr("foobarbazbop", 12) ne "") { + printf("perl => substr(\"foobarbazbop\", 12) = \"%s\"\n", + substr("foobarbazbop", 12)); + printf(" D => substr(\"foobarbazbop\", 12) = \"%s\"\n", + ""); + $failed++; + } + + if (substr("foobarbazbop", 13) ne "") { + printf("perl => substr(\"foobarbazbop\", 13) = \"%s\"\n", + substr("foobarbazbop", 13)); + printf(" D => substr(\"foobarbazbop\", 13) = \"%s\"\n", + ""); + $failed++; + } + + if (substr("foobarbazbop", 8, 20) ne "zbop") { + printf("perl => substr(\"foobarbazbop\", 8, 20) = \"%s\"\n", + substr("foobarbazbop", 8, 20)); + printf(" D => substr(\"foobarbazbop\", 8, 20) = \"%s\"\n", + "zbop"); + $failed++; + } + + if (substr("foobarbazbop", 4, 4) ne "arba") { + printf("perl => substr(\"foobarbazbop\", 4, 4) = \"%s\"\n", + substr("foobarbazbop", 4, 4)); + printf(" D => substr(\"foobarbazbop\", 4, 4) = \"%s\"\n", + "arba"); + $failed++; + } + + if (substr("foobarbazbop", 5, 8) ne "rbazbop") { + printf("perl => substr(\"foobarbazbop\", 5, 8) = \"%s\"\n", + substr("foobarbazbop", 5, 8)); + printf(" D => substr(\"foobarbazbop\", 5, 8) = \"%s\"\n", + "rbazbop"); + $failed++; + } + + if (substr("foobarbazbop", 5, 9) ne "rbazbop") { + printf("perl => substr(\"foobarbazbop\", 5, 9) = \"%s\"\n", + substr("foobarbazbop", 5, 9)); + printf(" D => substr(\"foobarbazbop\", 5, 9) = \"%s\"\n", + "rbazbop"); + $failed++; + } + + if (substr("foobarbazbop", 400, 20) ne "") { + printf("perl => substr(\"foobarbazbop\", 400, 20) = \"%s\"\n", + substr("foobarbazbop", 400, 20)); + printf(" D => substr(\"foobarbazbop\", 400, 20) = \"%s\"\n", + ""); + $failed++; + } + + if (substr("foobarbazbop", 400, 0) ne "") { + printf("perl => substr(\"foobarbazbop\", 400, 0) = \"%s\"\n", + substr("foobarbazbop", 400, 0)); + printf(" D => substr(\"foobarbazbop\", 400, 0) = \"%s\"\n", + ""); + $failed++; + } + + if (substr("foobarbazbop", 400, -1) ne "") { + printf("perl => substr(\"foobarbazbop\", 400, -1) = \"%s\"\n", + substr("foobarbazbop", 400, -1)); + printf(" D => substr(\"foobarbazbop\", 400, -1) = \"%s\"\n", + ""); + $failed++; + } + + if (substr("foobarbazbop", 3, 0) ne "") { + printf("perl => substr(\"foobarbazbop\", 3, 0) = \"%s\"\n", + substr("foobarbazbop", 3, 0)); + printf(" D => substr(\"foobarbazbop\", 3, 0) = \"%s\"\n", + ""); + $failed++; + } + + if (substr("foobarbazbop", 3, -1) ne "barbazbo") { + printf("perl => substr(\"foobarbazbop\", 3, -1) = \"%s\"\n", + substr("foobarbazbop", 3, -1)); + printf(" D => substr(\"foobarbazbop\", 3, -1) = \"%s\"\n", + "barbazbo"); + $failed++; + } + + if (substr("foobarbazbop", 3, -4) ne "barba") { + printf("perl => substr(\"foobarbazbop\", 3, -4) = \"%s\"\n", + substr("foobarbazbop", 3, -4)); + printf(" D => substr(\"foobarbazbop\", 3, -4) = \"%s\"\n", + "barba"); + $failed++; + } + + if (substr("foobarbazbop", 3, -20) ne "") { + printf("perl => substr(\"foobarbazbop\", 3, -20) = \"%s\"\n", + substr("foobarbazbop", 3, -20)); + printf(" D => substr(\"foobarbazbop\", 3, -20) = \"%s\"\n", + ""); + $failed++; + } + + if (substr("foobarbazbop", -10, -5) ne "obarb") { + printf("perl => substr(\"foobarbazbop\", -10, -5) = \"%s\"\n", + substr("foobarbazbop", -10, -5)); + printf(" D => substr(\"foobarbazbop\", -10, -5) = \"%s\"\n", + "obarb"); + $failed++; + } + + if (substr("foobarbazbop", 0, 400) ne "foobarbazbop") { + printf("perl => substr(\"foobarbazbop\", 0, 400) = \"%s\"\n", + substr("foobarbazbop", 0, 400)); + printf(" D => substr(\"foobarbazbop\", 0, 400) = \"%s\"\n", + "foobarbazbop"); + $failed++; + } + + if (substr("foobarbazbop", -1, 400) ne "p") { + printf("perl => substr(\"foobarbazbop\", -1, 400) = \"%s\"\n", + substr("foobarbazbop", -1, 400)); + printf(" D => substr(\"foobarbazbop\", -1, 400) = \"%s\"\n", + "p"); + $failed++; + } + + if (substr("foobarbazbop", -1, 0) ne "") { + printf("perl => substr(\"foobarbazbop\", -1, 0) = \"%s\"\n", + substr("foobarbazbop", -1, 0)); + printf(" D => substr(\"foobarbazbop\", -1, 0) = \"%s\"\n", + ""); + $failed++; + } + + if (substr("foobarbazbop", -1, -1) ne "") { + printf("perl => substr(\"foobarbazbop\", -1, -1) = \"%s\"\n", + substr("foobarbazbop", -1, -1)); + printf(" D => substr(\"foobarbazbop\", -1, -1) = \"%s\"\n", + ""); + $failed++; + } + + if (substr("foobarbazbop", -24, 24) ne "foobarbazbop") { + printf("perl => substr(\"foobarbazbop\", -24, 24) = \"%s\"\n", + substr("foobarbazbop", -24, 24)); + printf(" D => substr(\"foobarbazbop\", -24, 24) = \"%s\"\n", + "foobarbazbop"); + $failed++; + } + + if (substr("foobarbazbop", -24, 12) ne "") { + printf("perl => substr(\"foobarbazbop\", -24, 12) = \"%s\"\n", + substr("foobarbazbop", -24, 12)); + printf(" D => substr(\"foobarbazbop\", -24, 12) = \"%s\"\n", + ""); + $failed++; + } + + if (substr("foobarbazbop", -24, 13) ne "f") { + printf("perl => substr(\"foobarbazbop\", -24, 13) = \"%s\"\n", + substr("foobarbazbop", -24, 13)); + printf(" D => substr(\"foobarbazbop\", -24, 13) = \"%s\"\n", + "f"); + $failed++; + } + + if (substr("foobarbazbop", -12, 12) ne "foobarbazbop") { + printf("perl => substr(\"foobarbazbop\", -12, 12) = \"%s\"\n", + substr("foobarbazbop", -12, 12)); + printf(" D => substr(\"foobarbazbop\", -12, 12) = \"%s\"\n", + "foobarbazbop"); + $failed++; + } + + if (substr("foobarbazbop", -12, 11) ne "foobarbazbo") { + printf("perl => substr(\"foobarbazbop\", -12, 11) = \"%s\"\n", + substr("foobarbazbop", -12, 11)); + printf(" D => substr(\"foobarbazbop\", -12, 11) = \"%s\"\n", + "foobarbazbo"); + $failed++; + } + + if (substr("CRAIG: Positioned them, I don't know... I'm fairly wide guy.", 100, 10) ne "") { + printf("perl => substr(\"CRAIG: Positioned them, I don't know... I'm fairly wide guy.\", 100, 10) = \"%s\"\n", + substr("CRAIG: Positioned them, I don't know... I'm fairly wide guy.", 100, 10)); + printf(" D => substr(\"CRAIG: Positioned them, I don't know... I'm fairly wide guy.\", 100, 10) = \"%s\"\n", + ""); + $failed++; + } + + if (substr("CRAIG: Positioned them, I don't know... I'm fairly wide guy.", 100) ne "") { + printf("perl => substr(\"CRAIG: Positioned them, I don't know... I'm fairly wide guy.\", 100) = \"%s\"\n", + substr("CRAIG: Positioned them, I don't know... I'm fairly wide guy.", 100)); + printf(" D => substr(\"CRAIG: Positioned them, I don't know... I'm fairly wide guy.\", 100) = \"%s\"\n", + ""); + $failed++; + } + + exit($failed); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.substrminate.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.substrminate.d new file mode 100644 index 00000000..2c025410 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.substrminate.d @@ -0,0 +1,52 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma D option quiet +#pragma D option aggsortkey + +/* + * This is to check that we're correctly null-terminating the result of the + * substr() subroutine. + */ + +tick-1ms +/i++ > 1000/ +{ + exit(0); +} + +tick-1ms +{ + @[substr((i & 1) ? "Bryan is smart" : "he's not a dummy", 0, + (i & 1) ? 8 : 18)] = count(); +} + +END +{ + printa("%s\n", @); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.substrminate.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.substrminate.d.out new file mode 100644 index 00000000..26c19aa2 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.substrminate.d.out @@ -0,0 +1,3 @@ +Bryan is +he's not a dummy + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.system.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.system.d new file mode 100644 index 00000000..b7ffbfa4 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.system.d @@ -0,0 +1,45 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma D option quiet +#pragma D option destructive + +BEGIN +{ + this->a = 9; + this->b = -2; + + system("echo %s %d %d", "foo", this->a, this->b); + system("ping localhost"); + system("echo %d", ++this->a); + system("ping localhost"); + system("echo %d", ++this->a); + system("ping localhost"); + system("echo %d", ++this->a); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.system.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.system.d.out new file mode 100644 index 00000000..cd0d735f --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.system.d.out @@ -0,0 +1,8 @@ +foo 9 -2 +localhost is alive +10 +localhost is alive +11 +localhost is alive +12 + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/grammar/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/grammar/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/grammar/err.D_ADDROF_LVAL.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/grammar/err.D_ADDROF_LVAL.d new file mode 100644 index 00000000..8f5d694a --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/grammar/err.D_ADDROF_LVAL.d @@ -0,0 +1,41 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * & can not be applied to a non-lvalue + * + * SECTION: Pointers and Arrays/Pointers and Addresses + * + */ + +BEGIN +{ + trace(&1); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/grammar/err.D_EMPTY.empty.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/grammar/err.D_EMPTY.empty.d new file mode 100644 index 00000000..929ccc69 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/grammar/err.D_EMPTY.empty.d @@ -0,0 +1,34 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: Test the "empty translation unit" error path. + * + * SECTION: Program Structure/Probe Clauses and Declarations + * + */ diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/grammar/tst.clauses.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/grammar/tst.clauses.d new file mode 100644 index 00000000..a9930292 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/grammar/tst.clauses.d @@ -0,0 +1,48 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: Test the kinds of probe definition clause grammar rules. + * + * SECTION: Program Structure/Probe Clauses and Declarations; + * Program Structure/Actions + */ + + +BEGIN +{} + +BEGIN +/1/ +{} + +tick-1 +{ + exit(0); +} + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/grammar/tst.stmts.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/grammar/tst.stmts.d new file mode 100644 index 00000000..03a015ad --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/grammar/tst.stmts.d @@ -0,0 +1,59 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: Test the various kinds of D probe description statement + * rules in the grammar. + * + * SECTION: Program Structure/Probe Descriptions + * + */ + + +BEGIN +{ + i = 0; +} + +tick-1 +/i != 20/ +{ + i++; + x = 0; + stack(); + @a = count(); + @b = max(x); + @c[x] = count(); + @d[x] = max(x); +} + +tick-1 +/i = 20/ +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/inline/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/inline/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/inline/err.D_DECL_IDRED.redef1.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/inline/err.D_DECL_IDRED.redef1.d new file mode 100644 index 00000000..39f2996a --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/inline/err.D_DECL_IDRED.redef1.d @@ -0,0 +1,42 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * + * Test handling of an inline definition that overrides a previous + * definition of an inline definition. + * + * SECTION: Type and Constant Definitions/Inlines + * + * NOTES: + * + */ + +inline int foo = timestamp; +inline int foo = 8; diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/inline/err.D_DECL_IDRED.redef2.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/inline/err.D_DECL_IDRED.redef2.d new file mode 100644 index 00000000..1df59080 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/inline/err.D_DECL_IDRED.redef2.d @@ -0,0 +1,41 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * + * Test handling of an inline definition that overrides a previous + * definition of a dtrace built-in function. + * + * SECTION: Type and Constant Definitions/Inlines + * + * NOTES: + * + */ + +inline int rand = 7; diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/inline/err.D_IDENT_UNDEF.recur.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/inline/err.D_IDENT_UNDEF.recur.d new file mode 100644 index 00000000..95522d0e --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/inline/err.D_IDENT_UNDEF.recur.d @@ -0,0 +1,41 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * + * D program to test recursive inline definitions. This script should + * properly detect that foo is undefined on the right-hand side and fail. + * + * SECTION: Type and Constant Definitions/Inlines + * + * NOTES: + * + */ + +inline int foo = foo + 3; diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/inline/err.D_OP_INCOMPAT.baddef1.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/inline/err.D_OP_INCOMPAT.baddef1.d new file mode 100644 index 00000000..a42afb74 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/inline/err.D_OP_INCOMPAT.baddef1.d @@ -0,0 +1,41 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * + * Attempt to create an invalid inline definition by creating an + * inline of a function type. This should fail to compile. + * + * SECTION: Type and Constant Definitions/Inlines + * + * NOTES: + * + */ + +inline cyc_func_t i = "i am a cyclic function"; diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/inline/err.D_OP_INCOMPAT.baddef2.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/inline/err.D_OP_INCOMPAT.baddef2.d new file mode 100644 index 00000000..9a246b4b --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/inline/err.D_OP_INCOMPAT.baddef2.d @@ -0,0 +1,41 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * + * Attempt to create an invalid inline definition by creating an + * inline of incompatible types. This should fail to compile. + * + * SECTION: Type and Constant Definitions/Inlines + * + * NOTES: + * + */ + +inline int i = "i am a string"; diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/inline/err.D_OP_INCOMPAT.badxlate.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/inline/err.D_OP_INCOMPAT.badxlate.d new file mode 100644 index 00000000..963b6048 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/inline/err.D_OP_INCOMPAT.badxlate.d @@ -0,0 +1,41 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * + * Test an invalid inline definition of a translator. An inlined translation + * must have the same type as the translator output. + * + * SECTION: Type and Constant Definitions/Inlines + * + * NOTES: + * + */ + +inline vfs_t *invalid = xlate(curthread->t_procp); diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/inline/tst.InlineDataAssign.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/inline/tst.InlineDataAssign.d new file mode 100644 index 00000000..c7ab62fd --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/inline/tst.InlineDataAssign.d @@ -0,0 +1,68 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +/* + * ASSERTION: + * Declare different types of inline data types. + * + * SECTION: Type and Constant Definitions/Inlines + * + * NOTES: The commented lines defining floats and doubles should be uncommented + * once the functionality is provided. + * + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma D option quiet + + +inline char new_char = 'c'; +inline short new_short = 10; +inline int new_int = 100; +inline long new_long = 1234567890; +inline long long new_long_long = 1234512345; +inline int8_t new_int8 = 'p'; +inline int16_t new_int16 = 20; +inline int32_t new_int32 = 200; +inline int64_t new_int64 = 2000000; +inline intptr_t new_intptr = 0x12345; +inline uint8_t new_uint8 = 'q'; +inline uint16_t new_uint16 = 30; +inline uint32_t new_uint32 = 300; +inline uint64_t new_uint64 = 3000000; +inline uintptr_t new_uintptr = 0x67890; +/* inline float new_float = 1.23456; +inline double new_double = 2.34567890; +inline long double new_long_double = 3.567890123; +*/ + +inline int * pointer = &`kmem_flags; + +BEGIN +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/inline/tst.InlineExpression.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/inline/tst.InlineExpression.d new file mode 100644 index 00000000..d67d3f27 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/inline/tst.InlineExpression.d @@ -0,0 +1,80 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +/* + * ASSERTION: + * + * Test different inline assignments by various expressions. + * + * SECTION: Type and Constant Definitions/Inlines + * + * NOTES: The commented lines for the floats and doubles should be uncommented + * once the functionality is implemented. + * + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma D option quiet + + +inline char new_char = 'c' + 2; +inline short new_short = 10 * new_char; +inline int new_int = 100 + new_short; +inline long new_long = 1234567890; +inline long long new_long_long = 1234512345 * new_long; +inline int8_t new_int8 = 'p'; +inline int16_t new_int16 = 20 / new_int8; +inline int32_t new_int32 = 200; +inline int64_t new_int64 = 2000000 * (-new_int16); +inline intptr_t new_intptr = 0x12345 - 129; +inline uint8_t new_uint8 = 'q'; +inline uint16_t new_uint16 = 30 - new_uint8; +inline uint32_t new_uint32 = 300 - 0; +inline uint64_t new_uint64 = 3000000; +inline uintptr_t new_uintptr = 0x67890 / new_uint64; + +/* inline float new_float = 1.23456; +inline double new_double = 2.34567890; +inline long double new_long_double = 3.567890123; +*/ + +inline int * pointer = &`kmem_flags; +inline int result = 3 > 2 ? 3 : 2; + +BEGIN +{ + printf("new_char: %c\nnew_short: %d\nnew_int: %d\nnew_long: %d\n", + new_char, new_short, new_int, new_long); + printf("new_long_long: %d\nnew_int8: %d\nnew_int16: %d\n", + new_long_long, new_int8, new_int16); + printf("new_int32: %d\nnew_int64: %d\n", new_int32, new_int64); + printf("new_intptr: %d\nnew_uint8: %d\nnew_uint16: %d\n", + new_intptr, new_uint8, new_uint16); + printf("new_uint32:%d\nnew_uint64: %d\nnew_uintptr:%d\nresult:%d", + new_uint32, new_uint64, new_uintptr, result); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/inline/tst.InlineKinds.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/inline/tst.InlineKinds.d new file mode 100644 index 00000000..7f188fb0 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/inline/tst.InlineKinds.d @@ -0,0 +1,64 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * Test the code generation and results of the various kinds of inlines. + * In particular, we test constant and expression-based scalar inlines, + * associative array inlines, and inlines using translators. + */ + +#pragma D option quiet + +inline int i0 = 100 + 23; /* constant-folded integer constant */ +inline string i1 = probename; /* string variable reference */ +inline int i2 = pid != 0; /* expression involving a variable */ + +struct s { + int s_x; +}; + +translator struct s < int T > { + s_x = T + 1; +}; + +inline struct s i3 = xlate < struct s > (i0); /* translator */ +inline int i4[int x, int y] = x + y; /* associative array */ +inline int i5[int x] = (xlate < struct s > (x)).s_x; /* array by xlate */ + +BEGIN +{ + printf("i0 = %d\n", i0); + printf("i1 = %s\n", i1); + printf("i2 = %d\n", i2); + + printf("i3.s_x = %d\n", i3.s_x); + printf("i4[10, 20] = %d\n", i4[10, 20]); + printf("i5[123] = %d\n", i5[123]); + + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/inline/tst.InlineKinds.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/inline/tst.InlineKinds.d.out new file mode 100644 index 00000000..c9a603b2 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/inline/tst.InlineKinds.d.out @@ -0,0 +1,7 @@ +i0 = 123 +i1 = BEGIN +i2 = 1 +i3.s_x = 124 +i4[10, 20] = 30 +i5[123] = 124 + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/inline/tst.InlineTypedef.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/inline/tst.InlineTypedef.d new file mode 100644 index 00000000..a6247659 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/inline/tst.InlineTypedef.d @@ -0,0 +1,52 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +/* + * ASSERTION: + * Create inline names from aliases created using typedef. + * + * SECTION: Type and Constant Definitions/Inlines + * + * NOTES: + * + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma D option quiet + + +typedef char new_char; +inline new_char char_var = 'c'; + +typedef int * pointer; +inline pointer p = &`kmem_flags; + +BEGIN +{ + printf("char_var: %c\npointer p: %d", char_var, *p); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/inline/tst.InlineWritableAssign.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/inline/tst.InlineWritableAssign.d new file mode 100644 index 00000000..a7842a33 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/inline/tst.InlineWritableAssign.d @@ -0,0 +1,66 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +/* + * ASSERTION: + * Create inline names from aliases created using typedef. + * + * SECTION: Type and Constant Definitions/Inlines + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma D option quiet + + +struct record { + char c; + int i; +}; + +struct record rec1; +inline struct record rec2 = rec1; + +union var { + char c; + int i; +}; + +union var un1; +inline union var un2 = un1; + + +BEGIN +{ + rec1.c = 'c'; + rec1.i = 10; + + un1.c = 'd'; + + printf("rec1.c: %c\nrec1.i:%d\nun1.c: %c\n", rec1.c, rec1.i, un1.c); + printf("rec2.c: %c\nrec2.i:%d\nun2.c: %c\n", rec2.c, rec2.i, un2.c); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/io/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/io/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/io/tst.fds.c b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/io/tst.fds.c new file mode 100644 index 00000000..2785b51f --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/io/tst.fds.c @@ -0,0 +1,100 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#include +#include +#include +#include +#include +#include +#include + +static sigjmp_buf env; + +static void +interrupt(int sig) +{ + siglongjmp(env, sig); +} + +int +main(int argc, char *argv[]) +{ + const char *file = "/dev/null"; + int i, n, fds[10]; + struct sigaction act; + + if (argc > 1) { + (void) fprintf(stderr, "Usage: %s\n", argv[0]); + return (EXIT_FAILURE); + } + + act.sa_handler = interrupt; + act.sa_flags = 0; + + (void) sigemptyset(&act.sa_mask); + (void) sigaction(SIGUSR1, &act, NULL); + + closefrom(0); + n = 0; + + /* + * With all of our file descriptors closed, wait here spinning in bogus + * ioctl() calls until DTrace hits us with a SIGUSR1 to start the test. + */ + if (sigsetjmp(env, 1) == 0) { + for (;;) + (void) ioctl(-1, -1, NULL); + } + + /* + * To test the fds[] array, we open /dev/null (a file with reliable + * pathname and properties) using various flags and seek offsets. + */ + fds[n++] = open(file, O_RDONLY); + fds[n++] = open(file, O_WRONLY); + fds[n++] = open(file, O_RDWR); + + fds[n++] = open(file, O_RDWR | O_APPEND | O_CREAT | O_DSYNC | + O_LARGEFILE | O_NOCTTY | O_NONBLOCK | O_NDELAY | O_RSYNC | + O_SYNC | O_TRUNC | O_XATTR); + + fds[n++] = open(file, O_RDWR); + (void) lseek(fds[n - 1], 123, SEEK_SET); + + /* + * Once we have all the file descriptors in the state we want to test, + * issue a bogus ioctl() on each fd with cmd -1 and arg NULL to whack + * our DTrace script into recording the content of the fds[] array. + */ + for (i = 0; i < n; i++) + (void) ioctl(fds[i], -1, NULL); + + assert(n <= sizeof (fds) / sizeof (fds[0])); + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/io/tst.fds.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/io/tst.fds.d new file mode 100644 index 00000000..52a3312d --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/io/tst.fds.d @@ -0,0 +1,54 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma D option destructive +#pragma D option quiet + +syscall::ioctl:entry +/pid == $1 && arg0 == -1u/ +{ + raise(SIGUSR1); /* kick tst.fds.c out of its busy-wait loop */ +} + +syscall::ioctl:entry +/pid == $1 && arg0 != -1u && arg1 == -1u && arg2 == NULL/ +{ + printf("fds[%d] fi_name = %s\n", arg0, fds[arg0].fi_name); + printf("fds[%d] fi_dirname = %s\n", arg0, fds[arg0].fi_dirname); + printf("fds[%d] fi_pathname = %s\n", arg0, fds[arg0].fi_pathname); + printf("fds[%d] fi_fs = %s\n", arg0, fds[arg0].fi_fs); + printf("fds[%d] fi_mount = %s\n", arg0, fds[arg0].fi_mount); + printf("fds[%d] fi_offset = %d\n", arg0, fds[arg0].fi_offset); + printf("fds[%d] fi_oflags = 0x%x\n", arg0, fds[arg0].fi_oflags); +} + +proc:::exit +/pid == $1/ +{ + exit(0); +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/io/tst.fds.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/io/tst.fds.d.out new file mode 100644 index 00000000..9d268268 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/io/tst.fds.d.out @@ -0,0 +1,36 @@ +fds[0] fi_name = mm@0:null +fds[0] fi_dirname = /devices/pseudo +fds[0] fi_pathname = /devices/pseudo/mm@0:null +fds[0] fi_fs = specfs +fds[0] fi_mount = /devices +fds[0] fi_offset = 0 +fds[0] fi_oflags = 0x0 +fds[1] fi_name = mm@0:null +fds[1] fi_dirname = /devices/pseudo +fds[1] fi_pathname = /devices/pseudo/mm@0:null +fds[1] fi_fs = specfs +fds[1] fi_mount = /devices +fds[1] fi_offset = 0 +fds[1] fi_oflags = 0x1 +fds[2] fi_name = mm@0:null +fds[2] fi_dirname = /devices/pseudo +fds[2] fi_pathname = /devices/pseudo/mm@0:null +fds[2] fi_fs = specfs +fds[2] fi_mount = /devices +fds[2] fi_offset = 0 +fds[2] fi_oflags = 0x2 +fds[3] fi_name = mm@0:null +fds[3] fi_dirname = /devices/pseudo +fds[3] fi_pathname = /devices/pseudo/mm@0:null +fds[3] fi_fs = specfs +fds[3] fi_mount = /devices +fds[3] fi_offset = 0 +fds[3] fi_oflags = 0xebda +fds[4] fi_name = mm@0:null +fds[4] fi_dirname = /devices/pseudo +fds[4] fi_pathname = /devices/pseudo/mm@0:null +fds[4] fi_fs = specfs +fds[4] fi_mount = /devices +fds[4] fi_offset = 123 +fds[4] fi_oflags = 0x2 + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/get.ipv4remote.pl b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/get.ipv4remote.pl new file mode 100755 index 00000000..fb412554 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/get.ipv4remote.pl @@ -0,0 +1,104 @@ +#!/usr/bin/perl -w +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +#pragma ident "%Z%%M% %I% %E% SMI" + +# +# get.ipv4remote.pl [tcpport] +# +# Find an IPv4 reachable remote host using both ifconfig(1M) and ping(1M). +# If a tcpport is specified, return a host that is also listening on this +# TCP port. Print the local address and the remote address, or an +# error message if no suitable remote host was found. Exit status is 0 if +# a host was found. +# + +use strict; +use IO::Socket; + +my $MAXHOSTS = 32; # max hosts to port scan +my $TIMEOUT = 3; # connection timeout +my $tcpport = @ARGV == 1 ? $ARGV[0] : 0; + +# +# Determine local IP address +# +my $local = ""; +my $remote = ""; +my %Broadcast; +my $up; +open IFCONFIG, '/usr/sbin/ifconfig -a |' or die "Couldn't run ifconfig: $!\n"; +while () { + next if /^lo/; + + # "UP" is always printed first (see print_flags() in ifconfig.c): + $up = 1 if /^[a-z].*) { + if (/bytes from (.*): / and not defined $Broadcast{$1}) { + my $addr = $1; + + if ($tcpport != 0) { + # + # Test TCP + # + my $socket = IO::Socket::INET->new( + Proto => "tcp", + PeerAddr => $addr, + PeerPort => $tcpport, + Timeout => $TIMEOUT, + ); + next unless $socket; + close $socket; + } + + $remote = $addr; + last; + } +} +close PING; +die "Can't find a remote host for testing: No suitable response from " . + "$Broadcast{$local}\n" if $remote eq ""; + +print "$local $remote\n"; diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/get.ipv6remote.pl b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/get.ipv6remote.pl new file mode 100755 index 00000000..051ab8c3 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/get.ipv6remote.pl @@ -0,0 +1,88 @@ +#!/usr/bin/perl -w +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +#pragma ident "%Z%%M% %I% %E% SMI" + +# +# get.ipv6remote.pl +# +# Find an IPv6 reachable remote host using both ifconfig(1M) and ping(1M). +# Print the local address and the remote address, or print nothing if either +# no IPv6 interfaces or remote hosts were found. (Remote IPv6 testing is +# considered optional, and so not finding another IPv6 host is not an error +# state we need to log.) Exit status is 0 if a host was found. +# + +use strict; +use IO::Socket; + +my $MAXHOSTS = 32; # max hosts to scan +my $TIMEOUT = 3; # connection timeout +my $MULTICAST = "FF02::1"; # IPv6 multicast address + +# +# Determine local IP address +# +my $local = ""; +my $remote = ""; +my %Local; +my $up; +open IFCONFIG, '/usr/sbin/ifconfig -a inet6 |' + or die "Couldn't run ifconfig: $!\n"; +while () { + next if /^lo/; + + # "UP" is always printed first (see print_flags() in ifconfig.c): + $up = 1 if /^[a-z].*) { + if (/bytes from (.*): / and not defined $Local{$1}) { + $remote = $1; + last; + } +} +close PING; +exit 2 if $remote eq ""; + +print "$local $remote\n"; diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv4localicmp.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv4localicmp.ksh new file mode 100755 index 00000000..0965040e --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv4localicmp.ksh @@ -0,0 +1,70 @@ +#!/usr/bin/ksh +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +#pragma ident "%Z%%M% %I% %E% SMI" + +# +# Test ip:::{send,receive} of IPv4 ICMP to a local address. +# +# This may fail due to: +# +# 1. A change to the ip stack breaking expected probe behavior, +# which is the reason we are testing. +# 2. The lo0 interface missing or not up. +# 3. Unrelated ICMP on lo0 traced by accident. +# + +if (( $# != 1 )); then + print -u2 "expected one argument: " + exit 2 +fi + +dtrace=$1 +local=127.0.0.1 + +$dtrace -c "/usr/sbin/ping $local 3" -qs /dev/stdin <ip_saddr == "$local" && args[2]->ip_daddr == "$local" && + args[4]->ipv4_protocol == IPPROTO_ICMP/ +{ + printf("1 ip:::send ("); + printf("args[2]: %d %d, ", args[2]->ip_ver, args[2]->ip_plength); + printf("args[4]: %d %d %d %d %d)\n", + args[4]->ipv4_ver, args[4]->ipv4_length, args[4]->ipv4_flags, + args[4]->ipv4_offset, args[4]->ipv4_ttl); +} + +ip:::receive +/args[2]->ip_saddr == "$local" && args[2]->ip_daddr == "$local" && + args[4]->ipv4_protocol == IPPROTO_ICMP/ +{ + printf("2 ip:::receive ("); + printf("args[2]: %d %d, ", args[2]->ip_ver, args[2]->ip_plength); + printf("args[4]: %d %d %d %d %d)\n", + args[4]->ipv4_ver, args[4]->ipv4_length, args[4]->ipv4_flags, + args[4]->ipv4_offset, args[4]->ipv4_ttl); +} +EOF diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv4localicmp.ksh.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv4localicmp.ksh.out new file mode 100644 index 00000000..41d6e0c8 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv4localicmp.ksh.out @@ -0,0 +1,6 @@ + +1 ip:::send (args[2]: 4 64, args[4]: 4 84 0 0 255) +1 ip:::send (args[2]: 4 64, args[4]: 4 84 0 0 255) +2 ip:::receive (args[2]: 4 64, args[4]: 4 84 0 0 255) +2 ip:::receive (args[2]: 4 64, args[4]: 4 84 0 0 255) +127.0.0.1 is alive diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv4localtcp.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv4localtcp.ksh new file mode 100644 index 00000000..6fa8c35b --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv4localtcp.ksh @@ -0,0 +1,125 @@ +#!/usr/bin/ksh +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. +# + +# +# Test {ip,tcp}:::{send,receive} of IPv4 TCP to local host. +# +# This may fail due to: +# +# 1. A change to the ip stack breaking expected probe behavior, +# which is the reason we are testing. +# 2. The lo0 interface missing or not up. +# 3. The local ssh service is not online. +# 4. An unlikely race causes the unlocked global send/receive +# variables to be corrupted. +# +# This test performs a TCP connection and checks that at least the +# following packet counts were traced: +# +# 3 x ip:::send (2 during the TCP handshake, then a FIN) +# 3 x tcp:::send (2 during the TCP handshake, then a FIN) +# 2 x ip:::receive (1 during the TCP handshake, then the FIN ACK) +# 2 x tcp:::receive (1 during the TCP handshake, then the FIN ACK) + +# The actual count tested is 5 each way, since we are tracing both +# source and destination events. +# +# For this test to work, we are assuming that the TCP handshake and +# TCP close will enter the IP code path and not use tcp fusion. +# + +if (( $# != 1 )); then + print -u2 "expected one argument: " + exit 2 +fi + +dtrace=$1 +local=127.0.0.1 +tcpport=22 +DIR=/var/tmp/dtest.$$ + +mkdir $DIR +cd $DIR + +cat > test.pl <<-EOPERL + use IO::Socket; + my \$s = IO::Socket::INET->new( + Proto => "tcp", + PeerAddr => "$local", + PeerPort => $tcpport, + Timeout => 3); + die "Could not connect to host $local port $tcpport" unless \$s; + close \$s; +EOPERL + +$dtrace -c '/usr/bin/perl test.pl' -qs /dev/stdin <ip_saddr == "$local" && args[2]->ip_daddr == "$local" && + args[4]->ipv4_protocol == IPPROTO_TCP/ +{ + ipsend++; +} + +tcp:::send +/args[2]->ip_saddr == "$local" && args[2]->ip_daddr == "$local"/ +{ + tcpsend++; +} + +ip:::receive +/args[2]->ip_saddr == "$local" && args[2]->ip_daddr == "$local" && + args[4]->ipv4_protocol == IPPROTO_TCP/ +{ + ipreceive++; +} + +tcp:::receive +/args[2]->ip_saddr == "$local" && args[2]->ip_daddr == "$local"/ +{ + tcpreceive++; +} + +END +{ + printf("Minimum TCP events seen\n\n"); + printf("ip:::send - %s\n", ipsend >= 5 ? "yes" : "no"); + printf("ip:::receive - %s\n", ipreceive >= 5 ? "yes" : "no"); + printf("tcp:::send - %s\n", tcpsend >= 5 ? "yes" : "no"); + printf("tcp:::receive - %s\n", tcpreceive >= 5 ? "yes" : "no"); +} +EODTRACE + +status=$? + +cd / +/usr/bin/rm -rf $DIR + +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv4localtcp.ksh.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv4localtcp.ksh.out new file mode 100644 index 00000000..2a85b98b --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv4localtcp.ksh.out @@ -0,0 +1,7 @@ +Minimum TCP events seen + +ip:::send - yes +ip:::receive - yes +tcp:::send - yes +tcp:::receive - yes + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv4localudp.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv4localudp.ksh new file mode 100644 index 00000000..fa8f7acf --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv4localudp.ksh @@ -0,0 +1,93 @@ +#!/usr/bin/ksh +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. +# + +# +# Test ip:::{send,receive} of IPv4 UDP to a local address. +# +# This may fail due to: +# +# 1. A change to the ip stack breaking expected probe behavior, +# which is the reason we are testing. +# 2. No physical network interface is plumbed and up. +# 3. No other hosts on this subnet are reachable and listening on rpcbind. +# 4. An unlikely race causes the unlocked global send/receive +# variables to be corrupted. +# +# This test sends a UDP message using ping and checks that at least the +# following counts were traced: +# +# 1 x ip:::send (UDP sent to ping's base UDP port) +# 1 x udp:::send (UDP sent to ping's base UDP port) +# 1 x ip:::receive (UDP received) +# +# No udp:::receive event is expected as the response ping -U elicits is +# an ICMP PORT_UNREACHABLE response rather than a UDP packet, and locally +# the echo request UDP packet only reaches IP, so the udp:::receive probe +# is not triggered by it. +# + +if (( $# != 1 )); then + print -u2 "expected one argument: " + exit 2 +fi + +dtrace=$1 +local=127.0.0.1 + +$dtrace -c "/usr/sbin/ping -U $local" -qs /dev/stdin <ip_saddr == "$local" && args[2]->ip_daddr == "$local" && + args[4]->ipv4_protocol == IPPROTO_UDP/ +{ + ipsend++; +} + +udp:::send +/args[2]->ip_saddr == "$local" && args[2]->ip_daddr == "$local"/ +{ + udpsend++; +} + +ip:::receive +/args[2]->ip_saddr == "$local" && args[2]->ip_daddr == "$local" && + args[4]->ipv4_protocol == IPPROTO_UDP/ +{ + ipreceive++; +} + +END +{ + printf("Minimum UDP events seen\n\n"); + printf("ip:::send - %s\n", ipsend >= 1 ? "yes" : "no"); + printf("ip:::receive - %s\n", ipreceive >= 1 ? "yes" : "no"); + printf("udp:::send - %s\n", udpsend >= 1 ? "yes" : "no"); +} +EOF diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv4localudp.ksh.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv4localudp.ksh.out new file mode 100644 index 00000000..bca55327 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv4localudp.ksh.out @@ -0,0 +1,6 @@ +Minimum UDP events seen + +ip:::send - yes +ip:::receive - yes +udp:::send - yes + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv4remoteicmp.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv4remoteicmp.ksh new file mode 100755 index 00000000..efe0d30f --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv4remoteicmp.ksh @@ -0,0 +1,81 @@ +#!/usr/bin/ksh +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +#pragma ident "%Z%%M% %I% %E% SMI" + +# +# Test ip:::{send,receive} of IPv4 ICMP to a remote host. +# +# This may fail due to: +# +# 1. A change to the ip stack breaking expected probe behavior, +# which is the reason we are testing. +# 2. No physical network interface is plumbed and up. +# 3. No other hosts on this subnet are reachable. +# 4. An unrelated ICMP between these hosts was traced by accident. +# + +if (( $# != 1 )); then + print -u2 "expected one argument: " + exit 2 +fi + +dtrace=$1 +getaddr=./get.ipv4remote.pl + +if [[ ! -x $getaddr ]]; then + print -u2 "could not find or execute sub program: $getaddr" + exit 3 +fi +$getaddr | read source dest +if (( $? != 0 )); then + exit 4 +fi + +$dtrace -c "/usr/sbin/ping $dest 3" -qs /dev/stdin <ip_saddr == "$source" && args[2]->ip_daddr == "$dest" && + args[4]->ipv4_protocol == IPPROTO_ICMP/ +{ + printf("1 ip:::send ("); + printf("args[2]: %d %d, ", args[2]->ip_ver, args[2]->ip_plength); + printf("args[4]: %d %d %d %d %d)\n", + args[4]->ipv4_ver, args[4]->ipv4_length, args[4]->ipv4_flags, + args[4]->ipv4_offset, args[4]->ipv4_ttl); +} + +ip:::receive +/args[2]->ip_saddr == "$dest" && args[2]->ip_daddr == "$source" && + args[4]->ipv4_protocol == IPPROTO_ICMP/ +{ + printf("2 ip:::receive ("); + printf("args[2]: %d %d, ", args[2]->ip_ver, args[2]->ip_plength); + printf("args[4]: %d %d %d %d %d)\n", + args[4]->ipv4_ver, args[4]->ipv4_length, args[4]->ipv4_flags, + args[4]->ipv4_offset, args[4]->ipv4_ttl); +} +EOF diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv4remoteicmp.ksh.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv4remoteicmp.ksh.out new file mode 100644 index 00000000..b5915f8d --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv4remoteicmp.ksh.out @@ -0,0 +1,3 @@ + +1 ip:::send (args[2]: 4 64, args[4]: 4 84 0 0 255) +2 ip:::receive (args[2]: 4 64, args[4]: 4 84 4 0 255) diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv4remotetcp.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv4remotetcp.ksh new file mode 100644 index 00000000..89a0cdb9 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv4remotetcp.ksh @@ -0,0 +1,128 @@ +#!/usr/bin/ksh +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. +# + +# +# Test {tcp,ip}:::{send,receive} of IPv4 TCP to a remote host. +# +# This may fail due to: +# +# 1. A change to the ip stack breaking expected probe behavior, +# which is the reason we are testing. +# 2. No physical network interface is plumbed and up. +# 3. No other hosts on this subnet are reachable and listening on ssh. +# 4. An unlikely race causes the unlocked global send/receive +# variables to be corrupted. +# +# This test performs a TCP connection and checks that at least the +# following packet counts were traced: +# +# 3 x ip:::send (2 during the TCP handshake, then a FIN) +# 3 x tcp:::send (2 during the TCP handshake, then a FIN) +# 2 x ip:::receive (1 during the TCP handshake, then the FIN ACK) +# 2 x tcp:::receive (1 during the TCP handshake, then the FIN ACK) +# + +if (( $# != 1 )); then + print -u2 "expected one argument: " + exit 2 +fi + +dtrace=$1 +getaddr=./get.ipv4remote.pl +tcpport=22 +DIR=/var/tmp/dtest.$$ + +if [[ ! -x $getaddr ]]; then + print -u2 "could not find or execute sub program: $getaddr" + exit 3 +fi +$getaddr $tcpport | read source dest +if (( $? != 0 )); then + exit 4 +fi + +mkdir $DIR +cd $DIR + +cat > test.pl <<-EOPERL + use IO::Socket; + my \$s = IO::Socket::INET->new( + Proto => "tcp", + PeerAddr => "$dest", + PeerPort => $tcpport, + Timeout => 3); + die "Could not connect to host $dest port $tcpport" unless \$s; + close \$s; +EOPERL + +$dtrace -c '/usr/bin/perl test.pl' -qs /dev/stdin <ip_saddr == "$source" && args[2]->ip_daddr == "$dest" && + args[4]->ipv4_protocol == IPPROTO_TCP/ +{ + ipsend++; +} + +tcp:::send +/args[2]->ip_saddr == "$source" && args[2]->ip_daddr == "$dest"/ +{ + tcpsend++; +} + +ip:::receive +/args[2]->ip_saddr == "$dest" && args[2]->ip_daddr == "$source" && + args[4]->ipv4_protocol == IPPROTO_TCP/ +{ + ipreceive++; +} + +tcp:::receive +/args[2]->ip_saddr == "$dest" && args[2]->ip_daddr == "$source"/ +{ + tcpreceive++; +} + +END +{ + printf("Minimum TCP events seen\n\n"); + printf("ip:::send - %s\n", ipsend >= 3 ? "yes" : "no"); + printf("ip:::receive - %s\n", ipreceive >= 2 ? "yes" : "no"); + printf("tcp:::send - %s\n", tcpsend >= 3 ? "yes" : "no"); + printf("tcp:::receive - %s\n", tcpreceive >= 2 ? "yes" : "no"); +} +EODTRACE + +status=$? + +cd / +/usr/bin/rm -rf $DIR + +exit $? diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv4remotetcp.ksh.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv4remotetcp.ksh.out new file mode 100644 index 00000000..2a85b98b --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv4remotetcp.ksh.out @@ -0,0 +1,7 @@ +Minimum TCP events seen + +ip:::send - yes +ip:::receive - yes +tcp:::send - yes +tcp:::receive - yes + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv4remoteudp.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv4remoteudp.ksh new file mode 100644 index 00000000..b0893c81 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv4remoteudp.ksh @@ -0,0 +1,88 @@ +#!/usr/bin/ksh +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. +# + +# +# Test {udp,ip}:::{send,receive} of IPv4 UDP to a remote host. +# +# This may fail due to: +# +# 1. A change to the ip stack breaking expected probe behavior, +# which is the reason we are testing. +# 2. No physical network interface is plumbed and up. +# 3. No other hosts on this subnet are reachable and listening on rpcbind. +# 4. An unlikely race causes the unlocked global send/receive +# variables to be corrupted. +# +# This test sends a UDP message using ping and checks that at least the +# following counts were traced: +# +# 1 x ip:::send (UDP sent to ping's base UDP port) +# 1 x udp:::send (UDP sent to ping's base UDP port) +# + +if (( $# != 1 )); then + print -u2 "expected one argument: " + exit 2 +fi + +dtrace=$1 +getaddr=./get.ipv4remote.pl + +if [[ ! -x $getaddr ]]; then + print -u2 "could not find or execute sub program: $getaddr" + exit 3 +fi +$getaddr | read source dest +if (( $? != 0 )); then + exit 4 +fi + +$dtrace -c "/usr/sbin/ping -U $dest" -qs /dev/stdin <ip_saddr == "$source" && args[2]->ip_daddr == "$dest" && + args[4]->ipv4_protocol == IPPROTO_UDP/ +{ + ipsend++; +} + +udp:::send +/args[2]->ip_saddr == "$source" && args[2]->ip_daddr == "$dest"/ +{ + udpsend++; +} + +END +{ + printf("Minimum UDP events seen\n\n"); + printf("ip:::send - %s\n", ipsend >= 1 ? "yes" : "no"); + printf("udp:::send - %s\n", udpsend >= 1 ? "yes" : "no"); +} +EOF diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv4remoteudp.ksh.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv4remoteudp.ksh.out new file mode 100644 index 00000000..bdbbe1fd --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv4remoteudp.ksh.out @@ -0,0 +1,5 @@ +Minimum UDP events seen + +ip:::send - yes +udp:::send - yes + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv6localicmp.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv6localicmp.ksh new file mode 100755 index 00000000..5912ee7c --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv6localicmp.ksh @@ -0,0 +1,82 @@ +#!/usr/bin/ksh +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +#pragma ident "%Z%%M% %I% %E% SMI" + +# +# Test ip:::{send,receive} of IPv6 ICMP to a local address. This creates a +# temporary lo0/inet6 interface if one doesn't already exist. +# +# This may fail due to: +# +# 1. A change to the ip stack breaking expected probe behavior, +# which is the reason we are testing. +# 2. Unrelated ICMPv6 on lo0 traced by accident. +# + +if (( $# != 1 )); then + print -u2 "expected one argument: " + exit 2 +fi + +dtrace=$1 +local=::1 + +if ! ifconfig lo0 inet6 > /dev/null 2>&1; then + if ! ifconfig lo0 inet6 plumb up; then + print -u2 "could not plumb lo0 inet6 for testing" + exit 3 + fi + removeinet6=1 +else + removeinet6=0 +fi + +$dtrace -c "/usr/sbin/ping -A inet6 $local 3" -qs /dev/stdin <ip_saddr == "$local" && args[2]->ip_daddr == "$local" && + args[5]->ipv6_nexthdr == IPPROTO_ICMPV6/ +{ + printf("1 ip:::send ("); + printf("args[2]: %d %d, ", args[2]->ip_ver, args[2]->ip_plength); + printf("args[5]: %d %d %d)\n", + args[5]->ipv6_ver, args[5]->ipv6_tclass, args[5]->ipv6_plen); +} + +ip:::receive +/args[2]->ip_saddr == "$local" && args[2]->ip_daddr == "$local" && + args[5]->ipv6_nexthdr == IPPROTO_ICMPV6/ +{ + printf("2 ip:::receive ("); + printf("args[2]: %d %d, ", args[2]->ip_ver, args[2]->ip_plength); + printf("args[5]: %d %d %d)\n", + args[5]->ipv6_ver, args[5]->ipv6_tclass, args[5]->ipv6_plen); +} +EOF + +if (( removeinet6 )); then + ifconfig lo0 inet6 unplumb +fi diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv6localicmp.ksh.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv6localicmp.ksh.out new file mode 100644 index 00000000..529d251f --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv6localicmp.ksh.out @@ -0,0 +1,6 @@ + +::1 is alive +1 ip:::send (args[2]: 6 64, args[5]: 6 0 64) +1 ip:::send (args[2]: 6 64, args[5]: 6 0 64) +2 ip:::receive (args[2]: 6 64, args[5]: 6 0 64) +2 ip:::receive (args[2]: 6 64, args[5]: 6 0 64) diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv6remoteicmp.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv6remoteicmp.ksh new file mode 100755 index 00000000..b94b7843 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv6remoteicmp.ksh @@ -0,0 +1,88 @@ +#!/usr/bin/ksh +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +#pragma ident "%Z%%M% %I% %E% SMI" + +# +# Test ip:::{send,receive} of IPv6 ICMP to a remote host. This test is +# skipped if there are no physical interfaces configured with IPv6, or no +# other IPv6 hosts are reachable. +# +# This may fail due to: +# +# 1. A change to the ip stack breaking expected probe behavior, +# which is the reason we are testing. +# 2. An unrelated ICMPv6 between these hosts was traced by accident. +# + +if (( $# != 1 )); then + print -u2 "expected one argument: " + exit 2 +fi + +dtrace=$1 +getaddr=./get.ipv6remote.pl + +if [[ ! -x $getaddr ]]; then + print -u2 "could not find or execute sub program: $getaddr" + exit 3 +fi +$getaddr | read source dest +if (( $? != 0 )); then + print -nu2 "Could not find a local IPv6 interface and a remote IPv6 " + print -u2 "host. Aborting test.\n" + print -nu2 "For this test to continue, a \"ping -ns -A inet6 FF02::1\" " + print -u2 "must respond with a\nremote IPv6 host." + exit 3 +fi + +# +# Shake loose any ICMPv6 Neighbor advertisement messages before tracing. +# +/usr/sbin/ping $dest 3 > /dev/null 2>&1 + +$dtrace -c "/usr/sbin/ping $dest 3" -qs /dev/stdin <ip_saddr == "$source" && args[2]->ip_daddr == "$dest" && + args[5]->ipv6_nexthdr == IPPROTO_ICMPV6/ +{ + printf("1 ip:::send ("); + printf("args[2]: %d %d, ", args[2]->ip_ver, args[2]->ip_plength); + printf("args[5]: %d %d %d)\n", + args[5]->ipv6_ver, args[5]->ipv6_tclass, args[5]->ipv6_plen); +} + +ip:::receive +/args[2]->ip_saddr == "$dest" && args[2]->ip_daddr == "$source" && + args[5]->ipv6_nexthdr == IPPROTO_ICMPV6/ +{ + printf("2 ip:::receive ("); + printf("args[2]: %d %d, ", args[2]->ip_ver, args[2]->ip_plength); + printf("args[5]: %d %d %d)\n", + args[5]->ipv6_ver, args[5]->ipv6_tclass, args[5]->ipv6_plen); +} +EOF diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv6remoteicmp.ksh.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv6remoteicmp.ksh.out new file mode 100644 index 00000000..1ddcd07b --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.ipv6remoteicmp.ksh.out @@ -0,0 +1,3 @@ + +1 ip:::send (args[2]: 6 64, args[5]: 6 0 64) +2 ip:::receive (args[2]: 6 64, args[5]: 6 0 64) diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.localtcpstate.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.localtcpstate.ksh new file mode 100644 index 00000000..8a65ce6f --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.localtcpstate.ksh @@ -0,0 +1,182 @@ +#!/usr/bin/ksh +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. +# + +# +# Test tcp:::state-change and tcp:::{send,receive} by connecting to +# the local ssh service and sending a test message. This should result +# in a "Protocol mismatch" response and a close of the connection. +# A number of state transition events along with tcp fusion send and +# receive events for the message should result. +# +# This may fail due to: +# +# 1. A change to the ip stack breaking expected probe behavior, +# which is the reason we are testing. +# 2. The lo0 interface missing or not up. +# 3. The local ssh service is not online. +# 4. An unlikely race causes the unlocked global send/receive +# variables to be corrupted. +# +# This test performs a TCP connection to the ssh service (port 22) and +# checks that at least the following packet counts were traced: +# +# 3 x ip:::send (2 during the TCP handshake, then a FIN) +# 4 x tcp:::send (2 during the TCP handshake, 1 message then a FIN) +# 2 x ip:::receive (1 during the TCP handshake, then the FIN ACK) +# 3 x tcp:::receive (1 during the TCP handshake, 1 message then the FIN ACK) +# +# The actual ip count tested is 5 each way, since we are tracing both +# source and destination events. The actual tcp count tested is 7 +# each way, since the TCP fusion send/receive events will not reach IP. +# +# For this test to work, we are assuming that the TCP handshake and +# TCP close will enter the IP code path and not use tcp fusion. +# + +if (( $# != 1 )); then + print -u2 "expected one argument: " + exit 2 +fi + +dtrace=$1 +local=127.0.0.1 +tcpport=22 +DIR=/var/tmp/dtest.$$ + +mkdir $DIR +cd $DIR + +cat > test.pl <<-EOPERL + use IO::Socket; + my \$s = IO::Socket::INET->new( + Proto => "tcp", + PeerAddr => "$local", + PeerPort => $tcpport, + Timeout => 3); + die "Could not connect to host $local port $tcpport" unless \$s; + print \$s "testing state machine transitions"; + close \$s; +EOPERL + +$dtrace -c '/usr/bin/perl test.pl' -qs /dev/stdin <ip_saddr == "$local" && args[2]->ip_daddr == "$local" && + args[4]->ipv4_protocol == IPPROTO_TCP/ +{ + ipsend++; +} + +tcp:::send +/args[2]->ip_saddr == "$local" && args[2]->ip_daddr == "$local" && + (args[4]->tcp_sport == $tcpport || args[4]->tcp_dport == $tcpport)/ +{ + tcpsend++; +} + +ip:::receive +/args[2]->ip_saddr == "$local" && args[2]->ip_daddr == "$local" && + args[4]->ipv4_protocol == IPPROTO_TCP/ +{ + ipreceive++; +} + +tcp:::receive +/args[2]->ip_saddr == "$local" && args[2]->ip_daddr == "$local" && + (args[4]->tcp_sport == $tcpport || args[4]->tcp_dport == $tcpport)/ +{ + tcpreceive++; +} + +tcp:::state-change +{ + state_event[args[3]->tcps_state]++; +} + +tcp:::connect-request +/args[2]->ip_saddr == "$local" && args[2]->ip_daddr == "$local" && + args[4]->tcp_dport == $tcpport/ +{ + connreq++; +} + +tcp:::connect-established +/args[2]->ip_saddr == "$local" && args[2]->ip_daddr == "$local" && + args[4]->tcp_sport == $tcpport/ +{ + connest++; +} + +tcp:::accept-established +/args[2]->ip_saddr == "$local" && args[2]->ip_daddr == "$local" && + args[4]->tcp_dport == $tcpport/ +{ + connaccept++; +} + +END +{ + printf("Minimum TCP events seen\n\n"); + printf("ip:::send - %s\n", ipsend >= 5 ? "yes" : "no"); + printf("ip:::receive - %s\n", ipreceive >= 5 ? "yes" : "no"); + printf("tcp:::send - %s\n", tcpsend >= 7 ? "yes" : "no"); + printf("tcp:::receive - %s\n", tcpreceive >= 7 ? "yes" : "no"); + printf("tcp:::state-change to syn-sent - %s\n", + state_event[TCP_STATE_SYN_SENT] >=1 ? "yes" : "no"); + printf("tcp:::state-change to syn-received - %s\n", + state_event[TCP_STATE_SYN_RECEIVED] >=1 ? "yes" : "no"); + printf("tcp:::state-change to established - %s\n", + state_event[TCP_STATE_ESTABLISHED] >= 2 ? "yes" : "no"); + printf("tcp:::state-change to fin-wait-1 - %s\n", + state_event[TCP_STATE_FIN_WAIT_1] >= 1 ? "yes" : "no"); + printf("tcp:::state-change to close-wait - %s\n", + state_event[TCP_STATE_CLOSE_WAIT] >= 1 ? "yes" : "no"); + printf("tcp:::state-change to fin-wait-2 - %s\n", + state_event[TCP_STATE_FIN_WAIT_2] >= 1 ? "yes" : "no"); + printf("tcp:::state-change to last-ack - %s\n", + state_event[TCP_STATE_LAST_ACK] >= 1 ? "yes" : "no"); + printf("tcp:::state-change to time-wait - %s\n", + state_event[TCP_STATE_TIME_WAIT] >= 1 ? "yes" : "no"); + printf("tcp:::connect-request - %s\n", + connreq >=1 ? "yes" : "no"); + printf("tcp:::connect-established - %s\n", + connest >=1 ? "yes" : "no"); + printf("tcp:::accept-established - %s\n", + connaccept >=1 ? "yes" : "no"); +} +EODTRACE + +status=$? + +cd / +/usr/bin/rm -rf $DIR + +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.localtcpstate.ksh.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.localtcpstate.ksh.out new file mode 100644 index 00000000..ea1c27e5 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.localtcpstate.ksh.out @@ -0,0 +1,18 @@ +Minimum TCP events seen + +ip:::send - yes +ip:::receive - yes +tcp:::send - yes +tcp:::receive - yes +tcp:::state-change to syn-sent - yes +tcp:::state-change to syn-received - yes +tcp:::state-change to established - yes +tcp:::state-change to fin-wait-1 - yes +tcp:::state-change to close-wait - yes +tcp:::state-change to fin-wait-2 - yes +tcp:::state-change to last-ack - yes +tcp:::state-change to time-wait - yes +tcp:::connect-request - yes +tcp:::connect-established - yes +tcp:::accept-established - yes + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.remotetcpstate.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.remotetcpstate.ksh new file mode 100644 index 00000000..b6b9545d --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.remotetcpstate.ksh @@ -0,0 +1,172 @@ +#!/usr/bin/ksh +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. +# + +# +# Test tcp:::state-change and tcp:::{send,receive} by connecting to +# the remote ssh service and sending a test message. This should result +# in a "Protocol mismatch" response and a close of the connection. +# A number of state transition events along with tcp send and receive +# events for the message should result. +# +# This may fail due to: +# +# 1. A change to the ip stack breaking expected probe behavior, +# which is the reason we are testing. +# 2. The lo0 interface missing or not up. +# 3. The remote ssh service is not online. +# 4. An unlikely race causes the unlocked global send/receive +# variables to be corrupted. +# +# This test performs a TCP connection to the ssh service (port 22) and +# checks that at least the following packet counts were traced: +# +# 4 x ip:::send (2 during the TCP handshake, the message, then a FIN) +# 4 x tcp:::send (2 during the TCP handshake, the messages, then a FIN) +# 3 x ip:::receive (1 during the TCP handshake, the response, then the FIN ACK) +# 3 x tcp:::receive (1 during the TCP handshake, the response, then the FIN ACK) +# +# For this test to work, we are assuming that the TCP handshake and +# TCP close will enter the IP code path and not use tcp fusion. +# + +if (( $# != 1 )); then + print -u2 "expected one argument: " + exit 2 +fi + +dtrace=$1 +getaddr=./get.ipv4remote.pl +tcpport=22 +DIR=/var/tmp/dtest.$$ + +if [[ ! -x $getaddr ]]; then + print -u2 "could not find or execute sub program: $getaddr" + exit 3 +fi +$getaddr $tcpport | read source dest +if (( $? != 0 )); then + exit 4 +fi + +mkdir $DIR +cd $DIR + +cat > test.pl <<-EOPERL + use IO::Socket; + my \$s = IO::Socket::INET->new( + Proto => "tcp", + PeerAddr => "$dest", + PeerPort => $tcpport, + Timeout => 3); + die "Could not connect to host $dest port $tcpport" unless \$s; + print \$s "testing state machine transitions"; + close \$s; +EOPERL + +$dtrace -c '/usr/bin/perl test.pl' -qs /dev/stdin <ip_saddr == "$source" && args[2]->ip_daddr == "$dest" && + args[4]->ipv4_protocol == IPPROTO_TCP/ +{ + ipsend++; +} + +tcp:::send +/args[2]->ip_saddr == "$source" && args[2]->ip_daddr == "$dest" && + args[4]->tcp_dport == $tcpport/ +{ + tcpsend++; +} + +ip:::receive +/args[2]->ip_saddr == "$dest" && args[2]->ip_daddr == "$source" && + args[4]->ipv4_protocol == IPPROTO_TCP/ +{ + ipreceive++; +} + +tcp:::receive +/args[2]->ip_saddr == "$dest" && args[2]->ip_daddr == "$source" && + args[4]->tcp_sport == $tcpport/ +{ + tcpreceive++; +} + +tcp:::state-change +{ + state_event[args[3]->tcps_state]++; +} + +tcp:::connect-request +/args[2]->ip_saddr == "$source" && args[2]->ip_daddr == "$dest" && + args[4]->tcp_dport == $tcpport/ +{ + connreq++; +} + +tcp:::connect-established +/args[2]->ip_saddr == "$dest" && args[2]->ip_daddr == "$source" && + args[4]->tcp_sport == $tcpport/ +{ + connest++; +} + +END +{ + printf("Minimum TCP events seen\n\n"); + printf("ip:::send - %s\n", ipsend >= 4 ? "yes" : "no"); + printf("ip:::receive - %s\n", ipreceive >= 3 ? "yes" : "no"); + printf("tcp:::send - %s\n", tcpsend >= 4 ? "yes" : "no"); + printf("tcp:::receive - %s\n", tcpreceive >= 3 ? "yes" : "no"); + printf("tcp:::state-change to syn-sent - %s\n", + state_event[TCP_STATE_SYN_SENT] >=1 ? "yes" : "no"); + printf("tcp:::state-change to established - %s\n", + state_event[TCP_STATE_ESTABLISHED] >= 1 ? "yes" : "no"); + printf("tcp:::state-change to fin-wait-1 - %s\n", + state_event[TCP_STATE_FIN_WAIT_1] >= 1 ? "yes" : "no"); + printf("tcp:::state-change to fin-wait-2 - %s\n", + state_event[TCP_STATE_FIN_WAIT_2] >= 1 ? "yes" : "no"); + printf("tcp:::state-change to time-wait - %s\n", + state_event[TCP_STATE_TIME_WAIT] >= 1 ? "yes" : "no"); + printf("tcp:::connect-request - %s\n", + connreq >=1 ? "yes" : "no"); + printf("tcp:::connect-established - %s\n", + connest >=1 ? "yes" : "no"); +} +EODTRACE + +status=$? + +cd / +/usr/bin/rm -rf $DIR + +exit $status diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.remotetcpstate.ksh.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.remotetcpstate.ksh.out new file mode 100644 index 00000000..27388fba --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/ip/tst.remotetcpstate.ksh.out @@ -0,0 +1,15 @@ +Minimum TCP events seen + +ip:::send - yes +ip:::receive - yes +tcp:::send - yes +tcp:::receive - yes +tcp:::state-change to syn-sent - yes +tcp:::state-change to established - yes +tcp:::state-change to fin-wait-1 - yes +tcp:::state-change to close-wait - yes +tcp:::state-change to fin-wait-2 - yes +tcp:::state-change to time-wait - yes +tcp:::connect-request - yes +tcp:::connect-established - yes + diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/Makefile b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/Makefile new file mode 100644 index 00000000..fe213dd2 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/Makefile @@ -0,0 +1,79 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +#ident "%Z%%M% %I% %E% SMI" + +include $(SRC)/Makefile.master + +ROOTOPTPKG = $(ROOT)/opt/SUNWdtrt +JAR_DSTDIR = $(ROOTOPTPKG)/tst/common/java_api +JAR_SRCDIR = $(SRC)/cmd/dtrace/test/tst/common/java_api + +# Use the proto dtrace.jar if it exists, otherwise use whatever is +# installed on the system. It should be possible to build +# usr/src/cmd/dtrace/test independently, even if only on systems that +# have a compatible dtrace.jar installed. +DTRACE_JAR=usr/share/lib/java/dtrace.jar +PROTO_DTRACE_JAR=$(ROOT)/$(DTRACE_JAR) +INSTALLED_DTRACE_JAR=/$(DTRACE_JAR) +CLASSPATH=$(PROTO_DTRACE_JAR):$(INSTALLED_DTRACE_JAR) +SRCDIR=src +CLASSDIR=classes +MANIFESTDIR=manifest +MANIFEST=$(MANIFESTDIR)/test.jar-manifest +TEST_JAR=$(JAR_SRCDIR)/test.jar +PROTO_TEST_JAR=$(JAR_DSTDIR)/test.jar + +default: $(TEST_JAR) + +clean: + $(RM) $(CLASSDIR)/*.class + +clobber: clean + $(RM) $(TEST_JAR) + +all: default + +lint: + +install: all $(PROTO_TEST_JAR) + +JFLAGS= -g -cp $(CLASSPATH) -d $(CLASSDIR) -deprecation +JFLAGS += -target 1.5 +JFLAGS += -Xlint +COMPILE.java=$(JAVAC) $(JFLAGS) + +$(TEST_JAR): $(SRCDIR)/*.java + @mkdir -p $(CLASSDIR) + $(COMPILE.java) $(SRCDIR)/*.java + $(JAR) -cmf $(MANIFEST) $(TEST_JAR) -C $(CLASSDIR) . + +$(PROTO_TEST_JAR): $(JAR_DSTDIR) + +$(JAR_DSTDIR): + $(INS.dir) + +$(JAR_DSTDIR)/%: $(JAR_SRCDIR)/% + $(INS.file) diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/manifest/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/manifest/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/manifest/test.jar-manifest b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/manifest/test.jar-manifest new file mode 100644 index 00000000..7e454ad8 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/manifest/test.jar-manifest @@ -0,0 +1,2 @@ +Manifest-Version: 1.0 +Class-Path: /usr/share/lib/java/dtrace.jar diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/src/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/src/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/src/TestAbort.java b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/src/TestAbort.java new file mode 100644 index 00000000..310dd184 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/src/TestAbort.java @@ -0,0 +1,158 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + * + * ident "%Z%%M% %I% %E% SMI" + */ + +import org.opensolaris.os.dtrace.*; +import java.util.NoSuchElementException; + +/** + * Regression for 6426129 abort() after close() throws + * NoSuchElementException. + */ +public class TestAbort { + static boolean aborted = false; + + public static void + main(String[] args) + { + Consumer consumer = new LocalConsumer(); + + // Test for deadlock (bug 6419880) + try { + consumer.open(); + consumer.compile("syscall:::entry { @[execname] = count(); } " + + "tick-101ms { printa(@); }"); + consumer.enable(); + consumer.go(); + try { + Thread.currentThread().sleep(1000); + } catch (InterruptedException e) { + e.printStackTrace(); + System.exit(1); + } + consumer.close(); + } catch (DTraceException e) { + e.printStackTrace(); + System.exit(1); + } + + consumer = new LocalConsumer(); + + // Should be able to abort an unopened consumer + try { + aborted = false; + consumer.addConsumerListener(new ConsumerAdapter() { + public void consumerStopped(ConsumerEvent e) { + aborted = true; + } + }); + consumer.abort(); + consumer.open(); + consumer.compile("syscall:::entry { @[execname] = count(); } " + + "tick-101ms { printa(@); }"); + consumer.enable(); + consumer.go(); + try { + Thread.currentThread().sleep(1000); + } catch (InterruptedException e) { + e.printStackTrace(); + System.exit(1); + } + if (!aborted) { + throw new IllegalStateException("consumer not aborted"); + } + consumer.close(); + } catch (Exception e) { + e.printStackTrace(); + System.exit(1); + } + + consumer = new LocalConsumer(); + + // Should be safe to call abort() in any state + try { + consumer.abort(); + consumer.open(); + consumer.abort(); + consumer.compile("syscall:::entry { @[execname] = count(); } " + + "tick-101ms { printa(@); }"); + consumer.abort(); + consumer.enable(); + consumer.abort(); + consumer.go(); + consumer.abort(); + consumer.close(); + // Should be safe to call after close() + try { + consumer.abort(); + } catch (NoSuchElementException e) { + e.printStackTrace(); + System.exit(1); + } + } catch (Exception e) { + e.printStackTrace(); + System.exit(1); + } + + consumer = new LocalConsumer(); + + // Tests that close() throws expected exception when called on + // synchronized consumer. + try { + consumer.open(); + consumer.compile("syscall:::entry { @[execname] = count(); } " + + "tick-101ms { printa(@); }"); + consumer.enable(); + consumer.go(); + try { + Thread.currentThread().sleep(1000); + } catch (InterruptedException e) { + e.printStackTrace(); + System.exit(1); + } + try { + synchronized (consumer) { + consumer.close(); + } + } catch (IllegalThreadStateException e) { + try { + consumer.close(); + System.out.println("Successful"); + System.exit(0); + } catch (NoSuchElementException x) { + x.printStackTrace(); + System.exit(1); + } + } + } catch (DTraceException e) { + e.printStackTrace(); + System.exit(1); + } + System.err.println("Failed"); + System.exit(1); + } +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/src/TestBean.java b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/src/TestBean.java new file mode 100644 index 00000000..dd4a969d --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/src/TestBean.java @@ -0,0 +1,706 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + * + * ident "%Z%%M% %I% %E% SMI" + */ + +import org.opensolaris.os.dtrace.*; +import java.util.*; +import java.io.*; +import java.beans.*; +import java.lang.reflect.*; + +/** + * Regression test for serialization and XML encoding/decoding. Tests + * every Serializable class in the Java DTrace API by creating a dummy + * instance, writing it to a file, then reading it back in and comparing + * the string values of the object before and after, as well as + * verifying object equality before and after if the class overrides the + * equals() method. + */ +public class TestBean { + public static final String[] TESTS = new String[] { + "ExitRecord", + "AggregationRecord", + "Aggregation", + "Tuple", + "ScalarRecord", + "KernelStackRecord", + "LogDistribution", + "LinearDistribution", + "Option", + "ProcessState", + "ProbeDescription", + "PrintaRecord", + "PrintfRecord", + "ProbeData", + "Aggregate", + "UserStackRecord", + "AvgValue", + "CountValue", + "SumValue", + "MinValue", + "MaxValue", + "Error", + "Drop", + "InterfaceAttributes", + "ProgramInfo", + "ProbeInfo", + "Probe", + "Flow", + "KernelSymbolRecord", + "UserSymbolRecord", + "UserSymbolRecord$Value", + "Program", + "Program$File", + "StddevValue" + }; + + static File file; + + static void + exit(int status) + { + System.out.flush(); + System.err.flush(); + System.exit(status); + } + + public static XMLEncoder + getXMLEncoder(File file) + { + XMLEncoder encoder = null; + try { + OutputStream out = new BufferedOutputStream + (new FileOutputStream(file)); + encoder = new XMLEncoder(out); + } catch (Exception e) { + e.printStackTrace(); + exit(1); + } + return encoder; + } + + public static XMLDecoder + getXMLDecoder(File file) + { + return getXMLDecoder(file, null); + } + + public static XMLDecoder + getXMLDecoder(File file, ExceptionListener exceptionListener) + { + XMLDecoder decoder = null; + try { + InputStream in = new BufferedInputStream + (new FileInputStream(file)); + decoder = new XMLDecoder(in, null, exceptionListener); + } catch (Exception e) { + e.printStackTrace(); + exit(1); + } + return decoder; + } + + public static ExitRecord + getExitRecord() + { + ExitRecord r = new ExitRecord(1); + return r; + } + + public static AggregationRecord + getAggregationRecord() + { + Tuple tuple = getTuple(); + AggregationValue value = new CountValue(7); + AggregationRecord r = new AggregationRecord(tuple, value); + return r; + } + + public static Aggregation + getAggregation() + { + List < AggregationRecord > list = + new ArrayList < AggregationRecord > (); + AggregationRecord r; + r = getAggregationRecord(); + list.add(r); + + ValueRecord v1 = new ScalarRecord(new byte[] {(byte)1, (byte)2, + (byte)3}, 3); + ValueRecord v2 = new ScalarRecord("shebang!", 256); + Tuple tuple = new Tuple(v1, v2); + AggregationValue value = getLinearDistribution(); + r = new AggregationRecord(tuple, value); + list.add(r); + + Aggregation a = new Aggregation("counts", 2, list); + return a; + } + + public static Tuple + getTuple() + { + ValueRecord r1 = new ScalarRecord("cat", 256); + ValueRecord r2 = new ScalarRecord(new Integer(9), 2); + ValueRecord r3 = new KernelStackRecord( + new StackFrame[] { + new StackFrame("has"), + new StackFrame("nine"), + new StackFrame("lives")}, + new byte[] { (byte)0, (byte)1, (byte)2 }); + ValueRecord r4 = new ScalarRecord(new byte[] {(byte)1, (byte)2, + (byte)3}, 3); + + Tuple tuple = new Tuple(r1, r2, r3, r4); + return tuple; + } + + public static ScalarRecord + getScalarRecord() + { + Object v = new byte[] {(byte)1, (byte)2, (byte)3}; + ScalarRecord r = new ScalarRecord(v, 3); + return r; + } + + public static KernelStackRecord + getKernelStackRecord() + { + StackFrame[] stackFrames = new StackFrame[] { + new StackFrame("Frame 1"), + new StackFrame("Frame 2"), + new StackFrame("Frame 3") + }; + KernelStackRecord r = new KernelStackRecord(stackFrames, + new byte[] { (byte)0, (byte)1, (byte)2 }); + return r; + } + + public static LogDistribution + getLogDistribution() + { + List < Distribution.Bucket > buckets = + new ArrayList < Distribution.Bucket > (); + Distribution.Bucket bucket; + int n = 0; + long base = 0; + long i; + long sign; + long nextSign; + long power; + long nextPower; + long lowerBound; + long upperBound; + for (i = -62; i <= 62; ++i) { + if (i == 0) { + bucket = new Distribution.Bucket(-1, -1, n++); + buckets.add(bucket); + bucket = new Distribution.Bucket(0, 0, n++); + buckets.add(bucket); + bucket = new Distribution.Bucket(1, 1, n++); + buckets.add(bucket); + continue; + } + sign = ((i < 0) ? -1L : 1L); + power = (sign * i); + nextSign = (((i + 1) < 0) ? -1L : 1L); + nextPower = (nextSign * (i + 1)); + lowerBound = sign * ((long) Math.pow(2L, power)); + upperBound = (nextPower == 0 ? -2L : + (nextSign * ((long) Math.pow(2L, nextPower))) - 1); + if ((upperBound > 0) && ((upperBound * 2L) < 0)) { + upperBound = Long.MAX_VALUE; + } + bucket = new Distribution.Bucket(lowerBound, upperBound, n++); + buckets.add(bucket); + } + LogDistribution d = new LogDistribution(buckets); + return d; + } + + public static LinearDistribution + getLinearDistribution() + { + List < Distribution.Bucket > buckets = + new ArrayList < Distribution.Bucket > (); + Distribution.Bucket bucket; + int n = 10; // number of buckets + int base = 1; + int step = 10; + bucket = new Distribution.Bucket(Long.MIN_VALUE, (base - 1), 0); + buckets.add(bucket); + for (int i = base; i < (n * step); i += step) { + bucket = new Distribution.Bucket(i, (i + (step - 1)), + ((i - 1) / step)); + buckets.add(bucket); + } + bucket = new Distribution.Bucket((n * step) + 1, Long.MAX_VALUE, 0); + buckets.add(bucket); + LinearDistribution d = new LinearDistribution(base, step, buckets); + return d; + } + + public static Option + getOption() + { + Option option = new Option("aggrate", "1s"); + return option; + } + + public static ProcessState + getProcessState() + { + ProcessState p = new ProcessState(123456, "UNDEAD", + 3, "SIGSTOP", + -2, "Process stopped on dime"); + return p; + } + + public static ProbeDescription + getProbeDescription() + { + ProbeDescription d = new ProbeDescription(256, "syscall", null, + "malloc", "entry"); + return d; + } + + public static PrintaRecord + getPrintaRecord() + { + List < Aggregation > aggregations = new ArrayList < Aggregation > (); + Aggregation a = getAggregation(); + aggregations.add(a); + aggregations.add(a); + Map < Tuple, String > formattedOutput = + new HashMap < Tuple, String > (); + for (Tuple t : a.asMap().keySet()) { + formattedOutput.put(t, "cat"); + } + List < Tuple > tuples = new ArrayList < Tuple > (); + for (Tuple t : a.asMap().keySet()) { + tuples.add(t); + } + Collections.sort(tuples); + PrintaRecord r = new PrintaRecord(1234567890L, + aggregations, formattedOutput, tuples, + "Yes, this is the formatted printa() output"); + return r; + } + + public static PrintfRecord + getPrintfRecord() + { + List < ValueRecord > list = new ArrayList < ValueRecord > (); + ValueRecord v1 = getScalarRecord(); + ValueRecord v2 = new ScalarRecord(new Integer(7), 4); + list.add(v1); + list.add(v2); + PrintfRecord r = new PrintfRecord(list, + "long formatted string"); + return r; + } + + public static ProbeData + getProbeData() + { + List < Record > list = new ArrayList < Record > (); + list.add(getPrintaRecord()); + list.add(getPrintfRecord()); + list.add(getScalarRecord()); + list.add(getUserSymbolRecord()); + list.add(getUserStackRecord()); + list.add(getExitRecord()); + ProbeData d = new ProbeData(7, 1, getProbeDescription(), + getFlow(), list); + return d; + } + + public static Aggregate + getAggregate() + { + List < Aggregation > list = new ArrayList < Aggregation > (); + list.add(getAggregation()); + + List < AggregationRecord > reclist = + new ArrayList < AggregationRecord > (); + AggregationRecord r; + ValueRecord v1 = new ScalarRecord("cat", 256); + ValueRecord v2 = new ScalarRecord("dog", 256); + ValueRecord v3 = new ScalarRecord("mouse", 256); + ValueRecord v4 = new ScalarRecord("mouse", 256); + ValueRecord v5 = new ScalarRecord(new Byte((byte) 'C'), 1); + ValueRecord v6 = new ScalarRecord(new Short((short) 7), 2); + Tuple tuple = new Tuple(v1, v2, v3, v4, v5, v6); + AggregationValue value = getCountValue(); + r = new AggregationRecord(tuple, value); + reclist.add(r); + list.add(new Aggregation("times", 1, reclist)); + + Aggregate a = new Aggregate(1234567890L, list); + return a; + } + + public static UserStackRecord + getUserStackRecord() + { + StackFrame[] frames = new StackFrame[] { + new StackFrame("User Stack Frame 1"), + new StackFrame("User Stack Frame 2"), + new StackFrame("User Stack Frame 3") + }; + UserStackRecord r = new UserStackRecord(123456, frames, + new byte[] { (byte)0, (byte)1, (byte)2 }); + return r; + } + + public static AvgValue + getAvgValue() + { + AvgValue v = new AvgValue(5, 20, 4); + return v; + } + + public static CountValue + getCountValue() + { + CountValue v = new CountValue(9); + return v; + } + + public static MinValue + getMinValue() + { + MinValue v = new MinValue(101); + return v; + } + + public static MaxValue + getMaxValue() + { + MaxValue v = new MaxValue(101); + return v; + } + + public static SumValue + getSumValue() + { + SumValue v = new SumValue(25); + return v; + } + + public static org.opensolaris.os.dtrace.Error + getError() + { + ProbeDescription probe = getProbeDescription(); + org.opensolaris.os.dtrace.Error e = + new org.opensolaris.os.dtrace.Error(probe, 8, 3, + 1, 20, "DTRACEFLT_BADALIGN", -1, "error on enabled probe ID 8 " + + "(ID " + probe.getID() + ": " + probe + "): Bad alignment " + + "(0x33ef) in action #1 at DIF offset 20"); + return e; + } + + public static Drop + getDrop() + { + Drop drop = new Drop(2, "SPECBUSY", 72, 1041, + "Guess we dropped stuff all over the place."); + return drop; + } + + public static InterfaceAttributes + getInterfaceAttributes() + { + InterfaceAttributes a = new InterfaceAttributes( + InterfaceAttributes.Stability.UNSTABLE, + InterfaceAttributes.Stability.EVOLVING, + InterfaceAttributes.DependencyClass.ISA); + return a; + } + + public static ProgramInfo + getProgramInfo() + { + ProgramInfo info = new ProgramInfo(getInterfaceAttributes(), + getInterfaceAttributes(), 256); + return info; + } + + public static ProbeInfo + getProbeInfo() + { + ProbeInfo info = new ProbeInfo(getInterfaceAttributes(), + getInterfaceAttributes()); + return info; + } + + public static Probe + getProbe() + { + Probe p = new Probe(getProbeDescription(), getProbeInfo()); + return p; + } + + public static Flow + getFlow() + { + Flow f = new Flow(Flow.Kind.RETURN.name(), 3); + return f; + } + + public static KernelSymbolRecord + getKernelSymbolRecord() + { + KernelSymbolRecord r = new KernelSymbolRecord("mod`func+0x4", -1L); + return r; + } + + public static UserSymbolRecord + getUserSymbolRecord() + { + UserSymbolRecord r = new UserSymbolRecord(7, "mod`func+0x4", -1L); + return r; + } + + public static UserSymbolRecord.Value + getUserSymbolRecord$Value() + { + UserSymbolRecord.Value v = new UserSymbolRecord.Value(7, -1L); + return v; + } + + public static Program + getProgram() + { + final String PROGRAM = "syscall:::entry { @[execname] = count(); }"; + Consumer consumer = new LocalConsumer(); + Program p; + try { + consumer.open(); + p = consumer.compile(PROGRAM); + consumer.close(); + } catch (DTraceException e) { + e.printStackTrace(); + p = null; + } + return p; + } + + public static Program.File + getProgram$File() + { + final String PROGRAM = "syscall:::entry { @[execname] = count(); }"; + Consumer consumer = new LocalConsumer(); + Program p; + try { + OutputStream out = new FileOutputStream(file); + out.write(PROGRAM.getBytes(), 0, PROGRAM.length()); + out.flush(); + out.close(); + consumer.open(); + p = consumer.compile(file); + consumer.close(); + } catch (Exception e) { + e.printStackTrace(); + p = null; + } + return Program.File.class.cast(p); + } + + public static StddevValue + getStddevValue() + { + StddevValue v = new StddevValue(37, 114, 5, Integer.toString(9544)); + return v; + } + + @SuppressWarnings("unchecked") + static String + getString(Object o) + { + String s; + if (o instanceof ScalarRecord) { + o = ((ScalarRecord)o).getValue(); + } + + if (o instanceof byte[]) { + s = Arrays.toString((byte[])o); + } else if (o instanceof Object[]) { + s = Arrays.toString((Object[])o); + } else { + Class c = o.getClass(); + try { + Method m = c.getDeclaredMethod("toLogString"); + s = (String)m.invoke(o); + } catch (Exception e) { + s = o.toString(); + } + } + return s; + } + + static void + checkEquality(Object obj, Object newobj) + { + // If the class overrides equals(), make sure the re-created + // object still equals the original object + try { + Method eq = obj.getClass().getDeclaredMethod("equals", + Object.class); + Boolean ret = (Boolean) eq.invoke(obj, newobj); + if (ret != true) { + System.err.println("serialization failed: " + + obj.getClass().getName()); + exit(1); + } + } catch (Exception e) { + // Does not override equals(), although a super-class might. + // A better test would check for any superclass other than + // Object.class. + } + } + + static void + performSerializationTest(File file, String classname) + throws IOException, ClassNotFoundException + { + String methodName = "get" + classname; + Object obj = null; + Object newobj = null; + try { + Method method = TestBean.class.getDeclaredMethod(methodName); + obj = method.invoke(null); + } catch (Exception e) { + e.printStackTrace(); + exit(1); + } + + System.out.println(classname + ":"); + String serialized = getString(obj); + System.out.println(" serialized: " + serialized); + FileOutputStream fos = new FileOutputStream(file); + ObjectOutputStream out = new ObjectOutputStream(fos); + out.writeObject(obj); + out.close(); + FileInputStream fis = new FileInputStream(file); + ObjectInputStream in = new ObjectInputStream(fis); + newobj = in.readObject(); + in.close(); + String deserialized = getString(newobj); + System.out.println(" deserialized: " + deserialized); + + if (!serialized.equals(deserialized)) { + System.err.println("serialization failed: " + classname); + exit(1); + } + checkEquality(obj, newobj); + } + + static void + performBeanTest(File file, String classname) + { + String methodName = "get" + classname; + Object obj = null; + Object newobj = null; + try { + Method method = TestBean.class.getDeclaredMethod(methodName); + obj = method.invoke(null); + } catch (Exception e) { + e.printStackTrace(); + exit(1); + } + + Class c = obj.getClass(); + if (c.getConstructors().length == 0) { + return; + } + + System.out.println(classname + ":"); + XMLEncoder encoder = getXMLEncoder(file); + String encoded = getString(obj); + System.out.println(" encoded: " + encoded); + encoder.writeObject(obj); + encoder.close(); + XMLDecoder decoder = getXMLDecoder(file); + newobj = decoder.readObject(); + String decoded = getString(newobj); + System.out.println(" decoded: " + decoded); + decoder.close(); + + if (!encoded.equals(decoded)) { + System.err.println("bean persistence failed: " + classname); + exit(1); + } + checkEquality(obj, newobj); + } + + public static void + main(String[] args) + { + if ((args.length != 1) && (args.length != 2)) { + System.err.println("usage: java TestBean < filename > " + + "[ < classname > ]"); + exit(1); + } + + String filename = args[0]; + String classname = null; + if (args.length >= 2) { + classname = args[1]; + } + + file = new File(filename); + try { + if (!file.canRead()) { + try { + file.createNewFile(); + } catch (Exception e) { + System.err.println("failed to create " + filename); + exit(1); + } + } + } catch (SecurityException e) { + System.err.println("failed to open " + filename); + exit(1); + } + + String[] tests = (classname == null ? TESTS: + new String[] { classname }); + try { + for (int i = 0; i < tests.length; ++i) { + performSerializationTest(file, tests[i]); + performBeanTest(file, tests[i]); + } + } catch (IOException e) { + e.printStackTrace(); + exit(1); + } catch (ClassNotFoundException e) { + e.printStackTrace(); + exit(1); + } + } +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/src/TestClose.java b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/src/TestClose.java new file mode 100644 index 00000000..c7a9e89d --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/src/TestClose.java @@ -0,0 +1,90 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + * + * ident "%Z%%M% %I% %E% SMI" + */ + +import org.opensolaris.os.dtrace.*; + +/** + * Regression for bug 6419880 close() hangs running consumer. + */ +public class TestClose { + public static void + main(String[] args) + { + Consumer consumer = new LocalConsumer(); + + try { + consumer.open(); + consumer.compile("syscall:::entry { @[execname] = count(); } " + + "tick-101ms { printa(@); }"); + consumer.enable(); + consumer.go(); + try { + Thread.currentThread().sleep(1000); + } catch (InterruptedException e) { + e.printStackTrace(); + System.exit(1); + } + consumer.close(); + } catch (DTraceException e) { + e.printStackTrace(); + System.exit(1); + } + + consumer = new LocalConsumer(); + + try { + consumer.open(); + consumer.compile("syscall:::entry { @[execname] = count(); } " + + "tick-101ms { printa(@); }"); + consumer.enable(); + consumer.go(); + try { + Thread.currentThread().sleep(1000); + } catch (InterruptedException e) { + e.printStackTrace(); + System.exit(1); + } + try { + // Test new rule that close() is illegal while holding + // lock on consumer. + synchronized (consumer) { + consumer.close(); + } + } catch (IllegalThreadStateException e) { + consumer.close(); + System.out.println("Successful"); + System.exit(0); + } + } catch (DTraceException e) { + e.printStackTrace(); + System.exit(1); + } + System.err.println("Failed"); + System.exit(1); + } +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/src/TestDrop.java b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/src/TestDrop.java new file mode 100644 index 00000000..b5ace25b --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/src/TestDrop.java @@ -0,0 +1,169 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + * + * ident "%Z%%M% %I% %E% SMI" + */ +import java.util.*; +import java.util.concurrent.atomic.*; +import org.opensolaris.os.dtrace.*; + +/** + * Regression test for 6521523 aggregation drops can hang the Java + * DTrace API. + */ +public class TestDrop { + static final String PROGRAM = + "fbt:genunix::entry { @[execname, pid] = count(); }"; + + static AtomicLong consumerThreadID = new AtomicLong(); + static AtomicLong getAggregateThreadID = new AtomicLong(); + static AtomicBoolean done = new AtomicBoolean(); + static int seconds; + + private static void + startTimer() + { + if (seconds <= 0) { + return; + } + + final Timer timer = new Timer(); + timer.schedule(new TimerTask() { + public void run() { + done.set(true); + timer.cancel(); + } + }, seconds * 1000L); + } + + private static void + sampleAggregate(Consumer consumer) throws DTraceException + { + while (consumer.isRunning() && !done.get()) { + try { + Thread.currentThread().sleep(50); + } catch (InterruptedException e) { + } + + consumer.getAggregate(Collections. emptySet()); + } + } + + private static void + startAggregateThread(final Consumer consumer) + { + Runnable aggregateSampler = new Runnable() { + public void run() { + Thread t = Thread.currentThread(); + getAggregateThreadID.set(t.getId()); + Throwable x = null; + try { + sampleAggregate(consumer); + } catch (Throwable e) { + x = e; + } + + if (Thread.holdsLock(LocalConsumer.class)) { + if (x != null) { + x.printStackTrace(); + } + System.out.println("Lock held"); + System.exit(1); + } else { + System.out.println("Lock released"); + consumer.close(); // blocks if lock held + } + } + }; + + Thread t = new Thread(aggregateSampler, "Aggregate Sampler"); + t.start(); + } + + static void + usage() + { + System.err.println("usage: java TestDrop [ seconds ]"); + System.exit(2); + } + + public static void + main(String[] args) + { + if (args.length == 1) { + try { + seconds = Integer.parseInt(args[0]); + } catch (NumberFormatException e) { + usage(); + } + } else if (args.length > 1) { + usage(); + } + + final Consumer consumer = new LocalConsumer() { + protected Thread createThread() { + Runnable worker = new Runnable() { + public void run() { + Thread t = Thread.currentThread(); + consumerThreadID.set(t.getId()); + work(); + } + }; + Thread t = new Thread(worker); + return t; + } + }; + + consumer.addConsumerListener(new ConsumerAdapter() { + public void consumerStarted(ConsumerEvent e) { + startAggregateThread(consumer); + startTimer(); + } + public void dataDropped(DropEvent e) throws ConsumerException { + Thread t = Thread.currentThread(); + if (t.getId() == getAggregateThreadID.get()) { + Drop drop = e.getDrop(); + throw new ConsumerException(drop.getDefaultMessage(), + drop); + } + } + }); + + try { + consumer.open(); + consumer.setOption(Option.aggsize, Option.kb(1)); + consumer.setOption(Option.aggrate, Option.millis(101)); + consumer.compile(PROGRAM); + consumer.enable(); + consumer.go(new ExceptionHandler() { + public void handleException(Throwable e) { + e.printStackTrace(); + } + }); + } catch (DTraceException e) { + e.printStackTrace(); + } + } +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/src/TestEnable.java b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/src/TestEnable.java new file mode 100644 index 00000000..0e5a6086 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/src/TestEnable.java @@ -0,0 +1,151 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + * + * ident "%Z%%M% %I% %E% SMI" + */ + +import org.opensolaris.os.dtrace.*; + +/** + * Prove that enable() handles multiple programs, recognizing programs + * that are already enabled and programs that were compiled by another + * consumer. + */ +public class TestEnable { + static void + exit(int status) + { + System.out.flush(); + System.err.flush(); + System.exit(status); + } + + public static void + main(String[] args) + { + Consumer consumer = new LocalConsumer(); + + try { + consumer.open(); + Program p0 = consumer.compile("dtrace:::BEGIN"); + Program p1 = consumer.compile("syscall:::entry"); + Program p2 = consumer.compile("dtrace:::END"); + consumer.enable(p0); + consumer.enable(p1); + try { + consumer.go(); + System.err.println("go() illegal, not all programs " + + "enabled (p0, p1)"); + exit(1); + } catch (IllegalStateException e) { + System.out.println(e); + } catch (Exception e) { + e.printStackTrace(); + exit(1); + } + try { + consumer.enable(); + System.err.println("enable() illegal, some programs " + + "already enabled (p0, p1)"); + exit(1); + } catch (IllegalStateException e) { + System.out.println(e); + } catch (Exception e) { + e.printStackTrace(); + exit(1); + } + try { + consumer.enable(p0); + System.err.println("cannot enable a program that " + + "has already been enabled (p0)"); + exit(1); + } catch (IllegalStateException e) { + System.out.println(e); + } catch (Exception e) { + e.printStackTrace(); + exit(1); + } + consumer.enable(p2); + Program p3 = consumer.compile("syscall:::return"); + try { + consumer.go(); + System.err.println("go() illegal, not all programs " + + "enabled (p0, p1, p2)"); + exit(1); + } catch (IllegalStateException e) { + System.out.println(e); + } catch (Exception e) { + e.printStackTrace(); + exit(1); + } + try { + consumer.enable(); + System.err.println("enable() illegal, some programs " + + "already enabled (p0, p1, p2)"); + exit(1); + } catch (IllegalStateException e) { + System.out.println(e); + } catch (Exception e) { + e.printStackTrace(); + exit(1); + } + // Try to fool the consumer with a program compiled by + // another consumer + Consumer consumer2 = new LocalConsumer(); + consumer2.open(); + Program p3x = consumer2.compile("syscall:::return"); + try { + consumer.enable(p3x); + System.err.println("cannot enable program compiled " + + "by another consumer"); + exit(1); + } catch (IllegalArgumentException e) { + System.out.println(e); + } catch (Exception e) { + e.printStackTrace(); + exit(1); + } finally { + consumer2.close(); + } + consumer.enable(p3); + consumer.go(); + consumer.close(); + + // Enable all compiled programs at once + consumer = new LocalConsumer(); + consumer.open(); + consumer.compile("dtrace:::BEGIN"); + consumer.compile("syscall:::entry"); + consumer.compile("dtrace:::END"); + consumer.enable(); + consumer.go(); + consumer.close(); + exit(0); + } catch (DTraceException e) { + e.printStackTrace(); + exit(1); + } + } +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/src/TestFunctionLookup.java b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/src/TestFunctionLookup.java new file mode 100644 index 00000000..2bc43ea6 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/src/TestFunctionLookup.java @@ -0,0 +1,114 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +import org.opensolaris.os.dtrace.*; + +/** + * Regression for bug 6413280 lookupKernelFunction() and + * lookupUserFunction() truncate last character. + */ +public class TestFunctionLookup { + static final String kernelLookupProgram = "sdt:::callout-start { " + + "@[((callout_t *)arg0)->c_func] = count(); }"; + static final String userLookupProgram = "pid$target::f2:entry { " + + "@[arg0] = count(); }"; + + public static void + main(String[] args) + { + if (args.length != 1) { + System.err.println("usage: java TestFunctionLookup "); + System.exit(1); + } + String cmd = args[0]; + + Consumer consumer = new LocalConsumer(); + try { + consumer.open(); + consumer.compile(kernelLookupProgram); + consumer.enable(); + consumer.go(); + Aggregate a; + Number address; + String f; + boolean done = false; + for (int i = 0; (i < 20) && !done; ++i) { + Thread.currentThread().sleep(100); + a = consumer.getAggregate(); + for (Aggregation agg : a.getAggregations()) { + for (Tuple tuple : agg.asMap().keySet()) { + address = (Number)tuple.get(0).getValue(); + if (address instanceof Integer) { + int addr = (Integer)address; + f = consumer.lookupKernelFunction(addr); + } else { + long addr = (Long)address; + f = consumer.lookupKernelFunction(addr); + } + if (f.equals("genunix`cv_wakeup")) { + System.out.println(f); + done = true; + } + } + } + } + consumer.close(); + } catch (Exception e) { + e.printStackTrace(); + System.exit(1); + } + + consumer = new LocalConsumer(); + try { + consumer.open(); + int pid = consumer.createProcess(cmd); + consumer.compile(userLookupProgram); + consumer.enable(); + consumer.go(); + Thread.currentThread().sleep(500); + Aggregate a = consumer.getAggregate(); + Number address; + String f; + for (Aggregation agg : a.getAggregations()) { + for (Tuple tuple : agg.asMap().keySet()) { + address = (Number)tuple.get(0).getValue(); + if (address instanceof Integer) { + int addr = (Integer)address; + f = consumer.lookupUserFunction(pid, addr); + } else { + long addr = (Long)address; + f = consumer.lookupUserFunction(pid, addr); + } + System.out.println(f); + } + } + consumer.close(); + } catch (Exception e) { + e.printStackTrace(); + System.exit(1); + } + } +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/src/TestGetAggregate.java b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/src/TestGetAggregate.java new file mode 100644 index 00000000..e02df858 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/src/TestGetAggregate.java @@ -0,0 +1,252 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +import org.opensolaris.os.dtrace.*; +import java.util.*; + +/** + * Assert getAggregate() can explicitly specify the anonymous aggregation. + */ +public class TestGetAggregate { + static final String programString = + "profile:::tick-50ms" + + "{" + + " @ = count();" + + " @a = count();" + + "}"; + + static final String ANONYMOUS_AGGREGATION = ""; + static final int TICK = 50; + static final int EXPECTED_TICKS = 3; + static final int INTERVALS = 4; + + static void + testIncluded(Consumer consumer, String ... aggregationNames) + throws DTraceException, InterruptedException + { + Aggregate aggregate; + Set included = new HashSet (); + int n = 1; + + for (String name : aggregationNames) { + included.add(name); + } + + // Wait up to a full second to obtain aggregate data. Without a + // time limit, we'll loop forever if no aggregation was + // successfully included. + do { + Thread.sleep(TICK); + aggregate = consumer.getAggregate(included, null); + } while (aggregate.asMap().isEmpty() && n++ < (1000 / TICK)); + + for (String name : included) { + if (aggregate.getAggregation(name) == null) { + throw new IllegalStateException("@" + name + + " was explicitly included but did not appear " + + "in the aggregate"); + } + } + for (Aggregation a : aggregate.getAggregations()) { + if (!included.contains(a.getName())) { + throw new IllegalStateException("@" + a.getName() + + " was not explicitly included but appeared " + + "in the aggregate anyway"); + } + } + + if (!consumer.isRunning()) { + throw new IllegalStateException("consumer exited"); + } + } + + static void + testCleared(Consumer consumer, String ... aggregationNames) + throws DTraceException, InterruptedException + { + Aggregate aggregate; + AggregationRecord rec; + long value; + Long firstValue; + int n = 1; + Map firstValues = new HashMap (); + Set cleared = new HashSet (); + + for (String name : aggregationNames) { + cleared.add(name); + } + + do { + Thread.sleep(TICK); + aggregate = consumer.getAggregate(null, cleared); + } while (aggregate.asMap().isEmpty() && n++ < (1000 / TICK)); + n = 1; + + do { + Thread.sleep(TICK * EXPECTED_TICKS); + aggregate = consumer.getAggregate(null, cleared); + + for (Aggregation a : aggregate.getAggregations()) { + if (!firstValues.containsKey(a.getName())) { + rec = a.getRecord(Tuple.EMPTY); + value = rec.getValue().getValue().longValue(); + firstValues.put(a.getName(), value); + } + } + } while (consumer.isRunning() && n++ < INTERVALS); + + for (Aggregation a : aggregate.getAggregations()) { + rec = a.getRecord(Tuple.EMPTY); + value = rec.getValue().getValue().longValue(); + firstValue = firstValues.get(a.getName()); + + if (cleared.contains(a.getName())) { + // last value should be about the same as first value + if (value > (firstValue * 2)) { + throw new IllegalStateException( + "@" + a.getName() + " should have " + + "been cleared but instead grew from " + + firstValue + " to " + value); + } + } else { + // last value should be about (INTERVALS * firstValue) + if (value < (firstValue * 2)) { + throw new IllegalStateException( + "@" + a.getName() + " should have " + + "accumulated a running total but " + + "instead went from " + + firstValue + " to " + value); + } + } + } + + if (!consumer.isRunning()) { + throw new IllegalStateException("consumer exited"); + } + } + + static Integer includedStatus; + static Integer clearedStatus; + + static void + startIncludedTest() + { + final Consumer consumer = new LocalConsumer(); + consumer.addConsumerListener(new ConsumerAdapter() { + public void consumerStarted(ConsumerEvent e) { + new Thread(new Runnable() { + public void run() { + try { + testIncluded(consumer, ANONYMOUS_AGGREGATION); + includedStatus = 0; + } catch (Exception e) { + includedStatus = 1; + e.printStackTrace(); + } finally { + consumer.abort(); + } + } + }).start(); + } + }); + + try { + consumer.open(); + consumer.setOption(Option.aggrate, Option.millis(TICK)); + consumer.compile(programString); + consumer.enable(); + consumer.go(); + } catch (Exception e) { + includedStatus = 1; + e.printStackTrace(); + } + } + + static void + startClearedTest() + { + final Consumer consumer = new LocalConsumer(); + consumer.addConsumerListener(new ConsumerAdapter() { + public void consumerStarted(ConsumerEvent e) { + new Thread(new Runnable() { + public void run() { + try { + testCleared(consumer, ANONYMOUS_AGGREGATION); + clearedStatus = 0; + } catch (Exception e) { + clearedStatus = 1; + e.printStackTrace(); + } finally { + consumer.abort(); + } + } + }).start(); + } + }); + + try { + consumer.open(); + consumer.setOption(Option.aggrate, Option.millis(TICK)); + consumer.compile(programString); + consumer.enable(); + consumer.go(); + } catch (Exception e) { + clearedStatus = 1; + e.printStackTrace(); + } + } + + public static void + main(String[] args) + { + startIncludedTest(); + + do { + try { + Thread.sleep(TICK); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } while (includedStatus == null); + + startClearedTest(); + + do { + try { + Thread.sleep(TICK); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } while (clearedStatus == null); + + if (includedStatus != 0 || clearedStatus != 0) { + System.out.println("Failure"); + System.exit(1); + } + + System.out.println("Success"); + } +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/src/TestMaxConsumers.java b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/src/TestMaxConsumers.java new file mode 100644 index 00000000..50eeac23 --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/src/TestMaxConsumers.java @@ -0,0 +1,97 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + * + * ident "%Z%%M% %I% %E% SMI" + */ + +import org.opensolaris.os.dtrace.*; + +/** + * Regression for 6506495 -DJAVA_DTRACE_MAX_CONSUMERS=N for any N < 8 + * is treated as if it were 8. + */ +public class TestMaxConsumers { + static final String MAX_CONSUMERS_PROPERTY_NAME = + "JAVA_DTRACE_MAX_CONSUMERS"; + + static Integer + getIntegerProperty(String name) + { + Integer value = null; + String property = System.getProperty(name); + if (property != null && property.length() != 0) { + try { + value = Integer.parseInt(property); + } catch (NumberFormatException e) { + e.printStackTrace(); + } + } + return value; + } + + public static void + main(String[] args) + { + Integer property = getIntegerProperty(MAX_CONSUMERS_PROPERTY_NAME); + int max = (property == null ? 0 : property); + int n = (property == null ? 11 : (max < 1 ? 1 : max)); + + Consumer[] consumers = new Consumer[n]; + try { + for (int i = 0; i < n; ++i) { + consumers[i] = new LocalConsumer(); + consumers[i].open(); + } + for (int i = 0; i < n; ++i) { + consumers[i].close(); + } + for (int i = 0; i < n; ++i) { + consumers[i] = new LocalConsumer(); + consumers[i].open(); + } + } catch (Exception e) { + e.printStackTrace(); + System.exit(1); + } + + try { + Consumer consumer = new LocalConsumer(); + consumer.open(); + if (max > 0) { + System.out.println("Error: " + (max + 1) + " > " + + MAX_CONSUMERS_PROPERTY_NAME); + } else { + System.out.println("Success"); + } + consumer.close(); + } catch (Exception e) { + System.out.println("Success"); + } finally { + for (int i = 0; i < n; ++i) { + consumers[i].close(); + } + } + } +} diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/src/TestMultiAggPrinta.java b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/src/TestMultiAggPrinta.java new file mode 100644 index 00000000..facdf7fa --- /dev/null +++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/java_api/src/TestMultiAggPrinta.java @@ -0,0 +1,144 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + * + * ident "%Z%%M% %I% %E% SMI" + */ + +import java.io.File; +import java.io.IOException; +import java.util.List; +import org.opensolaris.os.dtrace.*; + +/** + * Regression for multi-aggregation printa() corner cases. + */ +public class TestMultiAggPrinta { + static int exitStatus; + + // Gets a string representation of the given PrintaRecord minus the + // timestamp of the aggregate snapshot, so that the output is + // comparable across multiple test runs. + static String + printaRecordString(PrintaRecord rec) + { + StringBuffer buf = new StringBuffer(); + buf.append(PrintaRecord.class.getName()); + buf.append("[aggregations = "); + buf.append(rec.getAggregations()); + buf.append(", formattedStrings = "); + buf.append(rec.getFormattedStrings()); + buf.append(", tuples = "); + buf.append(rec.getTuples()); + buf.append(", output = "); + buf.append(rec.getOutput()); + buf.append(']'); + return buf.toString(); + } + + static String + probeDataString(ProbeData data) + { + StringBuffer buf = new StringBuffer(); + buf.append(ProbeData.class.getName()); + buf.append("[epid = "); + buf.append(data.getEnabledProbeID()); + // Do not include cpu, since it can change across test runs + buf.append(", enabledProbeDescription = "); + buf.append(data.getEnabledProbeDescription()); + buf.append(", flow = "); + buf.append(data.getFlow()); + buf.append(", records = "); + + List records = data.getRecords(); + Record record; + Object value; + buf.append('['); + for (int i = 0; i < records.size(); ++i) { + if (i > 0) { + buf.append(", "); + } + record = records.get(i); + if (record instanceof ValueRecord) { + value = ((ValueRecord)record).getValue(); + if (value instanceof String) { + buf.append("\""); + buf.append((String)value); + buf.append("\""); + } else { + buf.append(record); + } + } else if (record instanceof PrintaRecord) { + PrintaRecord printa = (PrintaRecord)record; + buf.append(printaRecordString(printa)); + } else { + buf.append(record); + } + } + buf.append(']'); + return buf.toString(); + } + + public static void + main(String[] args) + { + if (args.length != 1) { + System.err.println("usage: java TestMultiAggPrinta