* systemtap.samples/transport*: Removed.
+++ /dev/null
-#!/usr/bin/perl
-
-# tracks gaps (missing records) and repeats in the transport-testing
-# output. If there aren't any missing records or repeats, it prints
-# "test passed", otherwise "test failed"
-#
-# Usage: transport-counts <output file>
-
-$prev = 0;
-$total_missing = 0;
-$repeats = 0;
-
-open TRACEFILE, $ARGV[0]
- or die "Couldn't open trace file $ARGV[0]";
-
-while (<TRACEFILE>) {
- chomp;
- if (/\[(\d*)/) {
- if ($prev + 1 != $1) {
- $start_missing = $prev + 1;
- $end_missing = $1 - 1;
- if ($start_missing > $end_missing) {
- $repeats++;
- } else {
- $total_missing += $end_missing - $start_missing;
- }
- }
- $prev = $1;
- }
-}
-print "total missing: $total_missing\n";
-print "repeats: $repeats\n";
-print "last event logged: $prev\n";
-if ($total_missing == 0 && $repeats == 0) {
- print "test passed\n";
-} else {
- print "test failed\n";
-}
+++ /dev/null
-set test "transport normal - procfs"
-if {![installtest_p]} { untested $test; return }
-
-spawn stap -o probe.out -DMAXACTION=1000000 $srcdir/$subdir/transport1.stp
-set ok 0
-expect {
- -timeout 150
- timeout { fail "$test (timeout)" }
- eof { spawn $srcdir/$subdir/transport-counts probe.out
- expect {
- -ex {test passed} { incr ok; exp_continue }
- eof { spawn rm probe.out }
- }
- }
-}
-close
-wait
-
-if {$ok >= 1} { pass "$test ($ok)" } { fail "$test ($ok)" }
-
-set test "transport normal - relayfs"
-spawn stap -b -o probe.out -DMAXACTION=1000000 $srcdir/$subdir/transport1.stp
-set ok 0
-expect {
- -timeout 150
- timeout { fail "$test (timeout)" }
- eof { spawn $srcdir/$subdir/transport-counts probe.out
- expect {
- -ex {test passed} { incr ok; exp_continue }
- eof { spawn rm probe.out }
- }
- }
-}
-close
-wait
-
-if {$ok >= 1} { pass "$test ($ok)" } { fail "$test ($ok)" }
-
-set test "transport fill staging buffer - procfs"
-spawn stap -o probe.out -DMAXACTION=1000000 $srcdir/$subdir/transport2.stp
-set ok 0
-expect {
- -timeout 150
- timeout { fail "$test (timeout)" }
- eof { spawn $srcdir/$subdir/transport-counts probe.out
- expect {
- -ex {test passed} { incr ok; exp_continue }
- eof { spawn rm probe.out }
- }
- }
-}
-close
-wait
-
-if {$ok >= 1} { pass "$test ($ok)" } { fail "$test ($ok)" }
-
-set test "transport fill staging buffer - relayfs"
-spawn stap -b -o probe.out -DMAXACTION=1000000 $srcdir/$subdir/transport2.stp
-set ok 0
-expect {
- -timeout 150
- timeout { fail "$test (timeout)" }
- eof { spawn $srcdir/$subdir/transport-counts probe.out
- expect {
- -ex {test passed} { incr ok; exp_continue }
- eof { spawn rm probe.out }
- }
- }
-}
-close
-wait
-
-if {$ok >= 1} { pass "$test ($ok)" } { fail "$test ($ok)" }
+++ /dev/null
-# This script tests normal logging - it logs a fair amount of data
-# in each probe hit, but not enough to fill up the staging buffers.
-
-global maxcount
-global count
-global n
-
-function write_output()
-{
- for (i = 0; i < n; i++)
- log("[".sprint(count++)."] testing 123, testing, testing. testing 123, testing, testing")
-}
-
-probe timer.jiffies(5)
-{
- write_output();
- if (count >= maxcount)
- exit()
-}
-
-probe begin
-{
- count = 1
- n = 50
- maxcount = 1000
-}
-
-probe end
-{
- log("total records written: ".sprint(count - 1))
- log("records per iteration: ".sprint(n))
-}
+++ /dev/null
-# This script tests normal logging - it logs a larger amount of data
-# in each probe hit, enough to fill up the staging buffers, so it
-# should detect anomalies in flushing the staging buffers.
-
-global maxcount
-global count
-global n
-
-function write_output()
-{
- for (i = 0; i < n; i++)
- log("[".sprint(count++)."] testing 123, testing, testing. testing 123, testing, testing")
-}
-
-probe timer.jiffies(5)
-{
- write_output();
- if (count >= maxcount)
- exit()
-}
-
-probe begin
-{
- count = 1
- n = 500
- maxcount = 10000
-}
-
-probe end
-{
- log("total records written: ".sprint(count - 1))
- log("records per iteration: ".sprint(n))
-}