diff options
author | hunt <hunt> | 2007-06-14 15:32:14 +0000 |
---|---|---|
committer | hunt <hunt> | 2007-06-14 15:32:14 +0000 |
commit | 100d708a89b57164d20b52a22b08d8c29d8620ef (patch) | |
tree | ba66ca9fbc8f06ea025f13c23cce3b7317d162fe /testsuite/systemtap.samples | |
parent | 9861ce16e993592ca39095a6884e775917e3cd1a (diff) | |
download | systemtap-steved-100d708a89b57164d20b52a22b08d8c29d8620ef.tar.gz systemtap-steved-100d708a89b57164d20b52a22b08d8c29d8620ef.tar.xz systemtap-steved-100d708a89b57164d20b52a22b08d8c29d8620ef.zip |
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.
Diffstat (limited to 'testsuite/systemtap.samples')
-rw-r--r-- | testsuite/systemtap.samples/syscalls.stp | 4 | ||||
-rw-r--r-- | testsuite/systemtap.samples/system_func.exp | 11 |
2 files changed, 10 insertions, 5 deletions
diff --git a/testsuite/systemtap.samples/syscalls.stp b/testsuite/systemtap.samples/syscalls.stp index 68e0348a..3ccfb8e5 100644 --- a/testsuite/systemtap.samples/syscalls.stp +++ b/testsuite/systemtap.samples/syscalls.stp @@ -2,6 +2,6 @@ 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() } diff --git a/testsuite/systemtap.samples/system_func.exp b/testsuite/systemtap.samples/system_func.exp index d191e872..ec935783 100644 --- a/testsuite/systemtap.samples/system_func.exp +++ b/testsuite/systemtap.samples/system_func.exp @@ -7,9 +7,14 @@ set saw_user 0 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 { } } |