2011-11-23 16:14:51 +05:30
|
|
|
|
2015-06-13 10:34:31 +05:30
|
|
|
make_testproc
|
|
|
|
|
2022-08-29 14:43:10 +05:30
|
|
|
set pwdx "${topdir}src/pwdx"
|
2011-11-23 16:14:51 +05:30
|
|
|
# Run pwdx with no arguments
|
|
|
|
set test "pwdx no args"
|
2011-11-30 17:41:35 +05:30
|
|
|
spawn $pwdx
|
2012-01-02 12:09:41 +05:30
|
|
|
expect_pass "$test" "^\\s*Usage:\\s+\(lt-\)\?pwdx \\\[options\\\] pid\.\.\."
|
2011-11-23 16:14:51 +05:30
|
|
|
|
2011-12-03 19:20:36 +05:30
|
|
|
# Run pwdx with pid 0 which is invalid
|
|
|
|
set test "pwdx pid 0 should be invalid"
|
|
|
|
spawn $pwdx 0
|
2012-02-10 01:48:14 +05:30
|
|
|
expect_pass "$test" "\(lt-\)\?pwdx\: invalid process id\: 0"
|
2011-11-23 16:14:51 +05:30
|
|
|
|
|
|
|
# Run pwdx with existing pid
|
2015-06-13 10:34:31 +05:30
|
|
|
set test "pwdx find test process cwd"
|
|
|
|
set my_pwd [ pwd ]
|
|
|
|
spawn $pwdx $testproc1_pid
|
|
|
|
expect_pass "$test" "^$testproc1_pid: $my_pwd"
|
2011-11-23 16:14:51 +05:30
|
|
|
|
2015-06-13 10:34:31 +05:30
|
|
|
# Cleanup
|
|
|
|
kill_testproc
|