From 100d708a89b57164d20b52a22b08d8c29d8620ef Mon Sep 17 00:00:00 2001 From: hunt Date: Thu, 14 Jun 2007 15:32:14 +0000 Subject: 2007-06-14 Martin Hunt * 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. --- testsuite/systemtap.samples/system_func.exp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'testsuite/systemtap.samples/system_func.exp') 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 { } } -- cgit