testsuite: pgrep: Provide test for matching a more than 4k command line; beware as TCL does not seem to match on strings >4k

This commit is contained in:
Clay Baenziger
2019-08-03 05:58:18 -04:00
committed by Craig Small
parent 61b627d53c
commit e516cf4a18
2 changed files with 18 additions and 7 deletions

View File

@@ -34,9 +34,9 @@ set test "pgrep with : delimiter"
spawn $pgrep -d : $testproc_comm
expect_pass "$test" "^${testproc1_pid}:${testproc2_pid}\\s*$"
# FIXME - Need to test against -f flag
set test "pgrep match against full process name"
untested $test
spawn $pgrep -f "$testproc_path\\s+$testproc_arg_str"
expect_pass "$test" "^$testproc1_pid\\s*$"
set test "pgrep with matching gid"
spawn $pgrep -G $gid $testproc_comm
@@ -51,8 +51,8 @@ spawn $pgrep -l $testproc_comm
expect_pass "$test" "^$testproc1_pid\\s+$testproc_comm\\s+$testproc2_pid\\s+$testproc_comm\\s*$"
set test "pgrep with full command line"
spawn $pgrep -a $testproc_comm
expect_pass "$test" "^$testproc1_pid\\s+$testproc_path\\s+$testproc2_pid\\s+$testproc_path\\s*$"
spawn $pgrep -af "$testproc_path$"
expect_pass "$test" "^$testproc2_pid\\s+$testproc_path\\s*$"
set test "pgrep find newest test pid"
spawn $pgrep -n $testproc_comm