diff options
Diffstat (limited to 'testsuite/systemtap.samples/transport.exp')
-rw-r--r-- | testsuite/systemtap.samples/transport.exp | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/testsuite/systemtap.samples/transport.exp b/testsuite/systemtap.samples/transport.exp new file mode 100644 index 00000000..b7d6d77b --- /dev/null +++ b/testsuite/systemtap.samples/transport.exp @@ -0,0 +1,73 @@ +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 60 + 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 60 + 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 60 + 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 60 + 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)" } |