History log of /freebsd-11.0-release/bin/pkill/tests/pgrep-j_test.sh
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 303975 11-Aug-2016 gjb

Copy stable/11@r303970 to releng/11.0 as part of the 11.0-RELEASE
cycle.

Prune svn:mergeinfo from the new branch, and rename it to RC1.

Update __FreeBSD_version.

Use the quarterly branch for the default FreeBSD.conf pkg(8) repo and
the dvd1.iso packages population.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 302408 08-Jul-2016 gjb

Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle.
Prune svn:mergeinfo from the new branch, as nothing has been merged
here.

Additional commits post-branch will follow.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 287012 22-Aug-2015 jamie

Make pkill/pgrep -j ARG take jname, not just jid.

PR: 201588
Submitted by: Daniel Shahaf <danielsh at apache.org>
MFC after: 3 days


# 279121 21-Feb-2015 ngie

Disguising stderr from jls generally considered harmful

Undisguising it dumps out the following logspew:

jls: unknown parameter: allow

PR: 191019


# 278742 14-Feb-2015 ngie

Simplify jail_name_to_jid and try to be more fault tolerant when scanning for
the jail ID (poll up to 10 times for the jail IDs to become available)

If the scan fails, the code will fall through and fail as it does with Jenkins
today


# 278653 13-Feb-2015 ngie

Call wait to ensure that background processes have died

This is being done to establish parity with pgrep-j_test


# 278636 12-Feb-2015 ngie

Parameterize out the amount of sleep done in each test

Set the value in each test to a different amount to avoid potential
side-effects with other instances of the test (or lingering processes) still
being present on the system


# 278633 12-Feb-2015 ngie

Refactor the tests

1. `id -u` -> 0 is now only checked once; the entire test script is now skipped
if this assertion is violated
2. De-dent whitespace, based on 1.
3. Only setup the symlink for $sleep once at the top of the script, and tear it
down once at the bottom of the script


# 278618 12-Feb-2015 ngie

Add debugging output to help track down the recent Jenkins failures


# 272305 30-Sep-2014 rodrigc

Fix pkill unit tests.

- use daemon(8) to write out a pid file for processes,
and check for for the existence of that file after
killing processes
- use explict named parameters to jail(8)


# 263351 19-Mar-2014 jmmv

Migrate tools/regression/usr.bin/pkill to the new tests layout.

Interestingly, the pkill tool lives in bin, not usr.bin. Haven't bothered
to check if this is because the tool moved or because the tests were
originally added in the wrong place.


# 164558 23-Nov-2006 yar

Fix and extend the -j option to pkill/pgrep WRT the jail
wildcard specifications. Earlier the only wildcard syntax
was "-j 0" for "any jail". There were at least
two shortcomings in it: First, jail ID 0 was abused; it
meant "no jail" in other utils, e.g., ps(1). Second, it
was impossible to match processed not in jail, which could
be useful to rc.d developers. Therefore a new syntax is
introduced: "-j any" means any jail while "-j none" means
out of jail. The old syntax is preserved for compatibility,
but now it's deprecated because it's limited and confusing.

Update the respective regression tests. While I'm here,
make the tests more complex but sensitive: Start several
processes, some in jail and some out of jail, so we can
detect that only the right processes are killed by pkill
or matched by pgrep.

Reviewed by: gad, pjd
MFC after: 1 week


# 143880 20-Mar-2005 pjd

Add regression tests for pkill/pgrep.

MFC after: 3 days