HomeFreeBSD

Refactor pkill-j_test to reflect the relevant changes done to pgrep-j_test

Description

Refactor pkill-j_test to reflect the relevant changes done to pgrep-j_test

r278742:

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

r278636:

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

r278633:

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

Details

Provenance
ngieAuthored on
Parents
rS278775: sync with the version in head (r274338):
Branches
Unknown
Tags
Unknown

Event Timeline