diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am index 50676f97..3951ec42 100644 --- a/testsuite/Makefile.am +++ b/testsuite/Makefile.am @@ -5,6 +5,7 @@ DEJATOOL = \ free \ pgrep \ pmap \ + ps \ pwdx \ uptime \ vmstat \ @@ -18,6 +19,8 @@ EXTRA_DIST = \ config/unix.exp \ uptime.test/uptime.exp \ pmap.test/pmap.exp \ + ps.test/ps_output.exp \ + ps.test/ps_personality.exp \ pwdx.test/pwdx.exp \ free.test/free.exp \ global-conf.exp \ diff --git a/testsuite/pgrep.test/pgrep.exp b/testsuite/pgrep.test/pgrep.exp index dedef793..99d1fff1 100644 --- a/testsuite/pgrep.test/pgrep.exp +++ b/testsuite/pgrep.test/pgrep.exp @@ -45,8 +45,8 @@ spawn $pgrep -d : $newsleep expect_pass "$test" "^${sleep1_pid}:${sleep2_pid}\\s*$" # FIXME - Need to test against -f flag -#set test "pgrep match against full process name" -#untested $test +set test "pgrep match against full process name" +untested $test set test "pgrep with matching gid" spawn $pgrep -G $gid $newsleep diff --git a/testsuite/ps.test/ps_output.exp b/testsuite/ps.test/ps_output.exp new file mode 100644 index 00000000..740e026c --- /dev/null +++ b/testsuite/ps.test/ps_output.exp @@ -0,0 +1,38 @@ +# +# Dejagnu tests for ps (output options) - part of procps +# +set ps ${topdir}ps/pscommand + +set mypid [pid] +set not_ppid [ expr { $mypid + 1 } ] +set uid [ exec id -u ] +set not_uid [ expr { $uid + 1 } ] +set gid [ exec id -g ] +set not_gid [ expr { $gid + 1 } ] +set raw_tty [ exec tty ] +regexp "/dev/(.+)" $raw_tty > tty + +# All the fields +# Cannot do args,cmd,comm +set ps_digit "\\d+\\s*" +set ps_state "\[A-Z