* systemtap.samples/syscalls.stp: Use printf
for output to avoid problems with long paths.
From Quentin Barnes.
* systemtap.samples/system_func.exp: Change expect matching.
+2007-06-14 Martin Hunt <hunt@redhat.com>
+
+ * systemtap.samples/syscalls.stp: Use printf
+ for output to avoid problems with long paths.
+
+ From Quentin Barnes.
+ * systemtap.samples/system_func.exp: Change expect matching.
+
2007-06-14 David Smith <dsmith@redhat.com>
* systemtap.samples/profile.stp: Change output to avoid problems
global count
probe kernel.function("sys_*").call {
- print (sprint(pid()) . " " . pp() . "\n")
- if (++count > 100) exit()
+ printf("%d %s\n", pid(), pp())
+ if (++count > 100) exit()
}
set user [exec whoami]
expect {
-timeout 30
- -re "^$user\[^\r\]*\[\r\n\]*" {incr saw_user; exp_continue}
- -re {^sys_open[^\r]*[\r\n]*} {incr open; exp_continue }
- -re {DONE[^\r]*[\r\n]*} {incr done; exp_continue }
+ -re "($user|sys_open|DONE)\r" {
+ switch $expect_out(1,string) {
+ sys_open {incr open}
+ DONE {incr done}
+ default {incr saw_user}
+ }
+ exp_continue
+ }
timeout { fail "$test (timeout)" }
eof { }
}