diff options
Diffstat (limited to 'testsuite/pgrep.test/pgrep.exp')
-rw-r--r-- | testsuite/pgrep.test/pgrep.exp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/testsuite/pgrep.test/pgrep.exp b/testsuite/pgrep.test/pgrep.exp index 1110e70..0c4836f 100644 --- a/testsuite/pgrep.test/pgrep.exp +++ b/testsuite/pgrep.test/pgrep.exp @@ -5,9 +5,9 @@ set mypid [pid] set not_ppid [ expr { $mypid + 1 } ] set pgrep "${topdir}src/pgrep" set uid [ exec id -u ] -set not_uid [ expr { $uid + 1 } ] +set not_uid [ expr { $uid + 1 } ] set gid [ exec id -g ] -set not_gid [ expr { $gid + 1 } ] +set not_gid [ expr { $gid + 1 } ] set ps "${topdir}src/ps/pscommand" set tty [ get_tty ] @@ -79,12 +79,16 @@ set test "pgrep doesn't match with bogus sid" spawn $pgrep -s $not_testproc1_sid $testproc_comm expect_blank "$test" -set test "pgrep matches on tty" +set test1 "pgrep matches on tty" +set test2 "pgrep doesn't match on tty and wrong runstate" if { $tty == "" } { - untested "$test" + untested "$test1" + untested "$test2" } else { spawn $pgrep -t $tty $testproc_comm - expect_pass "$test" "^$testproc1_pid\\s+$testproc2_pid\\s*$" + expect_pass "$test1" "^$testproc1_pid\\s+$testproc2_pid\\s*$" + spawn $pgrep -t $tty -r D $testproc_comm + expect_blank "$test2" } set test "pgrep doesn't match with bogus tty" |