summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.samples/transport.exp
blob: b7d6d77bd0e3142133a30b9efd661ede339775fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
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)" }