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:
@@ -26,9 +26,9 @@ spawn $pgrep $testproc_comm
|
||||
expect_pass "$test" "^$testproc1_pid\\s+$testproc2_pid\\s*$"
|
||||
|
||||
# In Debian only
|
||||
#set test "pgrep counts 2 test pids"
|
||||
#spawn $pgrep -c $testproc_comm
|
||||
#expect_pass "$test" "^2\\s*"
|
||||
set test "pgrep counts 2 test pids"
|
||||
spawn $pgrep -c $testproc_comm
|
||||
expect_pass "$test" "^2\\s*"
|
||||
|
||||
set test "pgrep with : delimiter"
|
||||
spawn $pgrep -d : $testproc_comm
|
||||
@@ -52,7 +52,7 @@ expect_pass "$test" "^$testproc1_pid\\s+$testproc_comm\\s+$testproc2_pid\\s+$tes
|
||||
|
||||
set test "pgrep with full command line"
|
||||
spawn $pgrep -a $testproc_comm
|
||||
expect_pass "$test" "^$testproc1_pid\\s+$testproc_path\\s+$sleep_time\\s+$testproc2_pid\\s+$testproc_path\\s+$sleep_time\\s*$"
|
||||
expect_pass "$test" "^$testproc1_pid\\s+$testproc_path\\s+$testproc2_pid\\s+$testproc_path\\s*$"
|
||||
|
||||
set test "pgrep find newest test pid"
|
||||
spawn $pgrep -n $testproc_comm
|
||||
|
||||
Reference in New Issue
Block a user