Debian Codegraph @

testsuite/systemtap.pass1-4/semko.exp

raw
1 set self semko
2 foreach runtime [get_runtime_list] {
3 foreach file [lsort [glob -nocomplain $srcdir/$self/*.stp]] {
4 set test $self/[file tail $file]
5 if {$runtime != ""} {
6 switch $test {
7 semko/utrace.stp {
8 # These tests require a system without utrace-like
9 # functionality. Since dyninst supports
10 # utrace-like functionality, mark this test as
11 # 'untested'.
12 untested $test; continue }
13 }
14
15 verbose -log "Running $file ($runtime)"
16 set rc [stap_run_batch $file --runtime=$runtime]
17 lappend test "($runtime)"
18 } else {
19 switch $test {
20 semko/utrace.stp {
21 # These tests require a system without utrace.
22 if {[utrace_p]} { untested $test; continue } }
23 semko/twentytwo.stp {
24 # This test requires a kernel where an inlined
25 # version of vfs_read() doesn't exist. One does
26 # exist on 3.10.0-327.el7.ppc64.
27 set pp "kernel.function(\"vfs_read\").inline"
28
29 # Notice we are using the tcl 'exec' command
30 # redirection of '2>@1', which is equivalent to
31 # the shell's '2>&1'.
32 if {![catch {exec stap -l ${pp} 2>@1} dummy]} {
33 untested $test; continue } }
34 }
35
36 verbose -log "Running $file"
37 set rc [stap_run_batch $file]
38 }
39 if {$rc < 0} {
40 # crashed
41 fail $test
42 } else {
43 setup_xfail *-*-*
44 if {$rc == 0} { pass $test } else { fail $test }
45 }
46 }
47 }