[apparmor] [patch 2/5] tests: check for early task exit in onexec tests
Tyler Hicks
tyhicks at canonical.com
Fri Mar 18 22:15:50 UTC 2016
On 2016-03-18 10:29:06, steve at nxnw.org wrote:
> Based on a patch by John Johansen <john.johansen at canonical.com>
>
> (I converted the check to look for the process directory in /proc
> rather than sending signal 0 to the task, as John had done in a patch
> sent to me, to prevent failures in signal delivery from blocking the
> check from working correctly.)
>
> Signed-off-by: Steve Beattie <steve at nxnw.org>
Acked-by: Tyler Hicks <tyhicks at canonical.com>
Thanks!
> ---
> tests/regression/apparmor/onexec.sh | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> Index: b/tests/regression/apparmor/onexec.sh
> ===================================================================
> --- a/tests/regression/apparmor/onexec.sh
> +++ b/tests/regression/apparmor/onexec.sh
> @@ -103,6 +103,12 @@ do_test()
> # give the onexec process a chance to run
> sleep 0.05
>
> + # check that task hasn't exited because change_onexec failed
> + if ! [ -d "/proc/${_pid}" ] ; then
> + checktestfg
> + return
> + fi
> +
> if ! check_current "${desc}" $_pid $prof ; then
> checktestfg
> return
>
>
> --
> AppArmor mailing list
> AppArmor at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/apparmor
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20160318/459f8bd9/attachment.pgp>
More information about the AppArmor
mailing list