Create test process
For the test suite, procps used to use sleep which would just create a process or two to test the tools against. Some setups coreutils creates all programs including sleep into one blob which means a lot of the tests fail, see issue #2 procps has its own sleep program now.
This commit is contained in:
@ -1,4 +1,6 @@
|
||||
|
||||
make_testproc
|
||||
|
||||
set pwdx "${topdir}pwdx"
|
||||
# Run pwdx with no arguments
|
||||
set test "pwdx no args"
|
||||
@ -11,10 +13,10 @@ spawn $pwdx 0
|
||||
expect_pass "$test" "\(lt-\)\?pwdx\: invalid process id\: 0"
|
||||
|
||||
# Run pwdx with existing pid
|
||||
set test "pwdx finds sleep in cwd"
|
||||
set sleep_pid [ exec sleep 600 & ]
|
||||
set sleep_pwd [ pwd ]
|
||||
spawn $pwdx $sleep_pid
|
||||
expect_pass "$test" "^$sleep_pid: $sleep_pwd"
|
||||
exec kill $sleep_pid
|
||||
set test "pwdx find test process cwd"
|
||||
set my_pwd [ pwd ]
|
||||
spawn $pwdx $testproc1_pid
|
||||
expect_pass "$test" "^$testproc1_pid: $my_pwd"
|
||||
|
||||
# Cleanup
|
||||
kill_testproc
|
||||
|
Reference in New Issue
Block a user