| 1 |
set test "probe_point_expansion" |
| 2 |
|
| 3 |
if {![installtest_p]} {untested $test; return} |
| 4 |
|
| 5 |
proc run_test {test pp expected} { |
| 6 |
set success 0 |
| 7 |
spawn stap -p1 -e "probe $pp {}" |
| 8 |
expect { |
| 9 |
-timeout 30 |
| 10 |
-re $expected { incr success } |
| 11 |
} |
| 12 |
catch { close }; catch { wait } |
| 13 |
if {$success == 1} { pass $test } { fail $test } |
| 14 |
} |
| 15 |
|
| 16 |
run_test noexpand "a.b.c" "a.b.c" |
| 17 |
run_test single "{a,b}" "a,b" |
| 18 |
run_test singlechained1 "{a,b}.c" "a.c,b.c" |
| 19 |
run_test singlechained2 "a.{b,c}" "a.b,a.c" |
| 20 |
run_test multi "{a,b}.{c,d}" "a.c,a.d,b.c,b.d" |
| 21 |
run_test nested "{a,b}.{c,d,{e.f,g}}" "a.c,a.d,a.e.f,a.g,b.c,b.d,b.e.f,b.g" |