diff options
author | hunt <hunt> | 2007-07-02 18:28:19 +0000 |
---|---|---|
committer | hunt <hunt> | 2007-07-02 18:28:19 +0000 |
commit | 2c5a50d4a6292786476cdcb1821377a68dd92408 (patch) | |
tree | dd01559073b35bb7ae4afefd59c3404b4932d9f3 /testsuite/systemtap.context/pid.tcl | |
parent | e1ddd7c988592f33a7dc659b378bec81293388ec (diff) | |
download | systemtap-steved-2c5a50d4a6292786476cdcb1821377a68dd92408.tar.gz systemtap-steved-2c5a50d4a6292786476cdcb1821377a68dd92408.tar.xz systemtap-steved-2c5a50d4a6292786476cdcb1821377a68dd92408.zip |
2007-07-02 Martin Hunt <hunt@redhat.com>
* systemtap.context/context.exp: Add pid tests.
* systemtap.context/pid.*: New tests.
Diffstat (limited to 'testsuite/systemtap.context/pid.tcl')
-rw-r--r-- | testsuite/systemtap.context/pid.tcl | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/testsuite/systemtap.context/pid.tcl b/testsuite/systemtap.context/pid.tcl new file mode 100644 index 00000000..36ee6b9c --- /dev/null +++ b/testsuite/systemtap.context/pid.tcl @@ -0,0 +1,54 @@ +spawn stap pid.stp +expect { + -timeout 240 + "READY" { + set pid [exec echo 1 > /proc/stap_test_cmd &] + set uid [exec id -ru] + set gid [exec id -rg] + set euid [exec id -u] + set egid [exec id -g] + expect { + -timeout 5 + "execname: echo\r\n" { + pass "execname" + exp_continue + } + "pexecname: expect\r\n" { + pass "pexecname" + exp_continue + } + "pid: $pid\r\n" { + pass "pid" + exp_continue + } + -re {ppid: [^\r\n]+\r\n} { + pass "ppid" + exp_continue + } + "tid: $pid\r\n" { + pass "tid" + exp_continue + } + "uid: $uid\r\n" { + pass "uid" + exp_continue + } + "euid: $euid\r\n" { + pass "euid" + exp_continue + } + "gid: $gid\r\n" { + pass "gid" + exp_continue + } + "egid: $egid\r\n" { + pass "egid" + exp_continue + } + eof {} + } + } + eof {} +} +catch {close} +wait |