From b8f8a639adb173ff91f5fd7ba3c1163b3c59a9bc Mon Sep 17 00:00:00 2001 From: hunt Date: Tue, 10 Jul 2007 15:50:57 +0000 Subject: 2007-07-10 Martin Hunt * systemtap.context/pid.tcl: Don't try to get real ppid, just match pattern. --- testsuite/systemtap.context/pid.tcl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'testsuite/systemtap.context/pid.tcl') diff --git a/testsuite/systemtap.context/pid.tcl b/testsuite/systemtap.context/pid.tcl index e1ae9897..a99f69b1 100644 --- a/testsuite/systemtap.context/pid.tcl +++ b/testsuite/systemtap.context/pid.tcl @@ -1,10 +1,11 @@ set tests [list execname pexecname pid ppid tid uid euid gid egid] spawn stap pid.stp +exp_internal 1 expect { -timeout 240 "READY" { set pid [exec echo 1 > /proc/stap_test_cmd &] - set ppid [lindex [split [exec grep PPid /proc/$pid/status]] 1] + set ppid {[0-9]*} set uid [exec id -ru] set gid [exec id -rg] set euid [exec id -u] @@ -13,9 +14,10 @@ expect { set i 0 foreach t $tests { + puts "Expecting [lindex $results $i]" expect { -timeout 5 - [lindex $results $i] { + -re [lindex $results $i] { pass $t } timeout {fail "$t - timeout"} -- cgit