~xfactor973/apparmor/bug-1564625

Viewing all changes in revision 3489.

  • Committer: Tyler Hicks
  • Date: 2016-06-25 15:25:28 UTC
  • Revision ID: tyhicks@canonical.com-20160625152528-yvvui7h9gtw6tbfy
tests: Fix onexec.sh races by using the transition test program

The onexec.sh test has periodically exhibited unexplicable failures that
are possibly due to race conditions when onexec.sh is verifying the
/proc/PID/attr/{current,exec} values of the process under test. This
patch attempts to solve the flaky test failures by removing the need for
IPC to coordinate between the test script and the test program.

The old onexec test program is removed and the transition test program
is used instead. This allows for the test script to tell the transition
test program what its current and exec procattr labels should be via
command line options.

Since IPC is no longer needed, the signal:ALL allow rule can be dropped
from the test profile. A new allow rule is needed to grant reading of
/proc/*/attr/{current,exec} since transition must verify the contents of
these files.

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Acked-by: Seth Arnold <seth.arnold@canonical.com>

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: