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/ChangeLog | 5 +++++ testsuite/systemtap.context/pid.tcl | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'testsuite') diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog index e4e46c4f..c5c68bc4 100644 --- a/testsuite/ChangeLog +++ b/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2007-07-10 Martin Hunt + + * systemtap.context/pid.tcl: Don't try to get real ppid, + just match pattern. + 2007-07-09 Martin Hunt * systemtap.context/systemtap_test_module1.c (stm_write_cmd): 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