| 1 |
set self semok |
| 2 |
|
| 3 |
proc dyninst_kfails {test} { |
| 4 |
global plt_probes_p |
| 5 |
global effective_uid |
| 6 |
# Use setup_kfail <pr number> <target triplet> for known bugs. |
| 7 |
# |
| 8 |
# (Note that tcl doesn't like comments directly inside the switch |
| 9 |
# statement, but comments can go in sub-blocks.) |
| 10 |
switch $test { |
| 11 |
semok/autocast14.stp - |
| 12 |
semok/badvar.stp - |
| 13 |
semok/badvar_undefined.stp - |
| 14 |
semok/bz10475.stp - |
| 15 |
semok/context-globals.stp - |
| 16 |
semok/defined_list_vars.stp - |
| 17 |
semok/deprecated01.stp - |
| 18 |
semok/doubleglob.stp - |
| 19 |
semok/entry01.stp - |
| 20 |
semok/entry02.stp - |
| 21 |
semok/entry03.stp - |
| 22 |
semok/entry04.stp - |
| 23 |
semok/gurufunc.stp - |
| 24 |
semok/kretprobe-data.stp - |
| 25 |
semok/nodwf01.stp - |
| 26 |
semok/nodwf02.stp - |
| 27 |
semok/nodwf03.stp - |
| 28 |
semok/nodwf04.stp - |
| 29 |
semok/nodwf05.stp - |
| 30 |
semok/nodwf06.stp - |
| 31 |
semok/nodwf07.stp - |
| 32 |
semok/netfilter01.stp - |
| 33 |
semok/pretty.stp - |
| 34 |
semok/pretty2.stp - |
| 35 |
semok/seventeen.stp - |
| 36 |
semok/target_addr.stp - |
| 37 |
semok/thirteen.stp - |
| 38 |
semok/thirtyeight.stp - |
| 39 |
semok/thirtyfive.stp - |
| 40 |
semok/thirtyfour.stp - |
| 41 |
semok/thirtynine.stp - |
| 42 |
semok/thirtyone.stp - |
| 43 |
semok/thirtysix.stp - |
| 44 |
semok/thirtythree.stp - |
| 45 |
semok/thirtytwo.stp - |
| 46 |
semok/transko.stp - |
| 47 |
semok/twelve.stp - |
| 48 |
semok/twenty.stp - |
| 49 |
semok/twentyeight.stp - |
| 50 |
semok/twentyfive.stp - |
| 51 |
semok/twentyfour.stp - |
| 52 |
semok/twentynine.stp - |
| 53 |
semok/twentyseven.stp - |
| 54 |
semok/umask01.stp - |
| 55 |
semok/umask02.stp - |
| 56 |
semok/umask03.stp - |
| 57 |
semok/umask04.stp - |
| 58 |
semok/umask05.stp - |
| 59 |
semok/umask06.stp - |
| 60 |
semok/umask07.stp - |
| 61 |
semok/vfs_add_to_page_cache.stp - |
| 62 |
semok/xfslines.stp { |
| 63 |
# Use setup_kfail DYNINST <target triplet> for known |
| 64 |
# failures when running with the dyninst runtime (scripts |
| 65 |
# that use kernel features or kernel-only tapset |
| 66 |
# functions). |
| 67 |
setup_kfail DYNINST *-*-* |
| 68 |
} |
| 69 |
|
| 70 |
semok/thirtysix-utrace.stp { |
| 71 |
# Use setup_kfail 14708 <target triplet> for known |
| 72 |
# failures when running with the dyninst runtime (scripts |
| 73 |
# that use utrace-like probes) |
| 74 |
setup_kfail 14708 *-*-* |
| 75 |
} |
| 76 |
|
| 77 |
semok/plt1.stp - |
| 78 |
semok/plt2.stp { |
| 79 |
# Note that this isn't quite right. plt_probes_p really |
| 80 |
# checks for kenel-runtime plt probe support, but it is |
| 81 |
# close enough for our purposes. |
| 82 |
if {!$plt_probes_p} { setup_kfail PLT *-*-* } |
| 83 |
} |
| 84 |
|
| 85 |
semok/utrace14.stp { |
| 86 |
# Use setup_kfail ROOT_ONLY for tests that must be run as |
| 87 |
# root. |
| 88 |
# |
| 89 |
# In the case of utrace14.stp, it probes pid 1, which only |
| 90 |
# root can do. |
| 91 |
if {$effective_uid != 0} { setup_kfail ROOT_ONLY *-*-* } |
| 92 |
} |
| 93 |
} |
| 94 |
} |
| 95 |
|
| 96 |
set uprobes_p [uprobes_p] |
| 97 |
set utrace_p [utrace_p] |
| 98 |
set plt_probes_p [plt_probes_p] |
| 99 |
set effective_uid [exec /usr/bin/id -u] |
| 100 |
foreach runtime [get_runtime_list] { |
| 101 |
foreach file [lsort [glob -nocomplain $srcdir/$self/*.stp]] { |
| 102 |
set test $self/[file tail $file] |
| 103 |
if {$runtime != ""} { |
| 104 |
verbose -log "Running $file ($runtime)" |
| 105 |
set rc [stap_run_batch $file --runtime=$runtime] |
| 106 |
if {$rc != 0} { ${runtime}_kfails $test } |
| 107 |
lappend test "($runtime)" |
| 108 |
} else { |
| 109 |
switch $test { |
| 110 |
semok/thirtysix-utrace.stp - |
| 111 |
semok/utrace01.stp { |
| 112 |
# These tests need utrace |
| 113 |
if {!$utrace_p} { untested $test; continue } } |
| 114 |
|
| 115 |
semok/bz11911.stp - |
| 116 |
semok/mangled.stp - |
| 117 |
semok/pretty-uprobes.stp { |
| 118 |
# These tests need uprobes |
| 119 |
if {!$uprobes_p} { untested $test; continue } } |
| 120 |
|
| 121 |
semok/plt1.stp - |
| 122 |
semok/plt2.stp { |
| 123 |
if {!$plt_probes_p} { untested $test; continue } } |
| 124 |
|
| 125 |
semok/utrace14.stp { |
| 126 |
# Use setup_kfail ROOT_ONLY for tests that must be run as |
| 127 |
# root. |
| 128 |
# |
| 129 |
# In the case of utrace14.stp, it probes pid 1, which only |
| 130 |
# root can do. |
| 131 |
if {$effective_uid != 0} { setup_kfail ROOT_ONLY *-*-* } } |
| 132 |
} |
| 133 |
verbose -log "Running $file" |
| 134 |
set rc [stap_run_batch $file] |
| 135 |
} |
| 136 |
if {$rc == 0} { pass $test } else { fail $test } |
| 137 |
} |
| 138 |
} |