[Bug 191019] pgrep/pkill -j testcases fail on 11-CURRENT

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Jul 8 00:15:17 UTC 2014


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191019

--- Comment #5 from yaneurabeya at gmail.com ---
Aha! The commands are missing the -x option:

     -x          Require an exact match of the process name, or argument list
                 if -f is given.  The default is to match any substring.

With some more work, now the testcases pass 100%:
https://github.com/yaneurabeya/freebsd/commit/7091f8f4e13171a7f122ead5a63a54c9d0a0de30

Script started on Mon Jul  7 17:06:51 2014
command: sh -c cd /usr/tests/bin/pkill/ ; kyua test; prove -rv p*
pgrep-F_test:main  ->  passed  [0.345s]^M
pgrep-LF_test:main  ->  passed  [0.693s]^M
pgrep-P_test:main  ->  passed  [0.354s]^M
pgrep-U_test:main  ->  passed  [0.692s]^M
pgrep-_g_test:main  ->  passed  [0.679s]^M
pgrep-_s_test:main  ->  passed  [0.037s]^M
pgrep-g_test:main  ->  passed  [0.691s]^M
pgrep-i_test:main  ->  passed  [0.349s]^M
pgrep-j_test:main  ->  passed  [24.439s]^M
pgrep-l_test:main  ->  passed  [0.322s]^M
pgrep-n_test:main  ->  passed  [0.341s]^M
pgrep-o_test:main  ->  passed  [0.346s]^M
pgrep-q_test:main  ->  passed  [0.353s]^M
pgrep-s_test:main  ->  passed  [0.667s]^M
pgrep-t_test:main  ->  passed  [0.352s]^M
pgrep-v_test:main  ->  passed  [0.357s]^M
pgrep-x_test:main  ->  passed  [0.360s]^M
pkill-F_test:main  ->  passed  [0.336s]^M
pkill-LF_test:main  ->  passed  [0.684s]^M
pkill-P_test:main  ->  passed  [0.346s]^M
pkill-U_test:main  ->  passed  [0.695s]^M
pkill-_g_test:main  ->  passed  [0.687s]^M
pkill-g_test:main  ->  passed  [0.681s]^M
pkill-i_test:main  ->  passed  [0.349s]^M
pkill-j_test:main  ->  passed  [19.325s]^M
pkill-s_test:main  ->  passed  [0.679s]^M
pkill-t_test:main  ->  passed  [0.680s]^M
pkill-x_test:main  ->  passed  [0.690s]^M
^M
28/28 passed (0 failed)^M
Committed action 270^M

...

pgrep-v_test ... ^M
1..2^[[0m^M
ok 1 - pgrep -v^[[0m^M
ok 2 - pgrep -v^[[0m^M
ok^M
pgrep-x_test ... ^M
1..4^[[0m^M
ok 1 - pgrep -x^[[0m^M
ok 2 - pgrep -x^[[0m^M
ok 3 - pgrep -x -f^[[0m^M
ok 4 - pgrep -x -f^[[0m^M
ok^M
pkill-F_test ... ^M
1..1^[[0m^M
ok - pkill -F <pidfile>^[[0m^M
ok^M
pkill-LF_test .. ^M
1..2^[[0m^M
ok 1 - pkill -LF <pidfile>^[[0m^M
ok 2 - pkill -LF <pidfile>^[[0m^M
ok^M
pkill-P_test ... ^M
1..1^[[0m^M
ok - pkill -P <ppid>^[[0m^M
ok^M
pkill-U_test ... ^M
1..2^[[0m^M
ok 1 - pkill -U <uid>^[[0m^M
ok 2 - pkill -U <user>^[[0m^M
ok^M
pkill-_g_test .. ^M
1..2^[[0m^M
ok 1 - pkill -G <gid>^[[0m^M
ok 2 - pkill -G <group>^[[0m^M
ok^M
pkill-g_test ... ^M
1..2^[[0m^M
ok 1 - pkill -g <pgrp>^[[0m^M
ok 2 - pkill -g 0^[[0m^M
ok^M
pkill-i_test ... ^M
1..1^[[0m^M
ok - pkill -i^[[0m^M
ok^M
pkill-j_test ... ^M
1..3^[[0m^M
jail: /usr/tests/bin/pkill/pkill-j_test.ujLT6PV/sleep.txt 5: exited on signal
15^M
kill: 10901: No such process^M
ok 1 - pkill -j <jid>^[[0m^M
jail: /usr/tests/bin/pkill/pkill-j_test.ujLT6PV/sleep.txt 5: exited on signal
15^M
jail: /usr/tests/bin/pkill/pkill-j_test.ujLT6PV/sleep.txt 5: exited on signal
15^M
kill: 10913: No such process^M
kill: 10914: No such process^M
ok 2 - pkill -j any^[[0m^M
ok 3 - pkill -j none^[[0m^M
kill: 10922: No such process^M
jail: "pkill-j_test_1-2" not found^M
jail: "pkill-j_test_3" not found^M
ok^M
pkill-s_test ... ^M
1..2^[[0m^M
ok 1 - pkill -s <sid>^[[0m^M
ok 2 - pkill -s 0^[[0m^M
ok^M
pkill-t_test ... ^M
1..2^[[0m^M
ok 1 - pkill -t <tty>^[[0m^M
ok 2 - pkill -t <tty>^[[0m^M
ok^M
pkill-x_test ... ^M
1..4^[[0m^M
ok 1 - pkill -x^[[0m^M
ok 2 - pkill -x^[[0m^M
ok 3 - pkill -x -f^[[0m^M
ok 4 - pkill -x -f^[[0m^M
ok^M
^[[32mAll tests successful.^M
^[[0mFiles=28, Tests=55, 56 wallclock secs ( 0.18 usr  0.14 sys +  0.18 cusr 
0.91 csys =  1.41 CPU)^M
Result: PASS^M

Script done on Mon Jul  7 17:08:44 2014

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list