2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-30 05:47:59 +00:00

Add a small sleep call to the onexec test to give the forked process a

chance to run before verifying it's current and future confinement
state. In testing the combined sleeps added roughly a second to
onexec.sh's total time on relatively reasonable hardware.

Signed-off-by: Steve Beattie <sbeattie@ubuntu.com>
Acked-By: John Johansen <john.johansen@canonical.com> (via IRC)
This commit is contained in:
Steve Beattie 2012-11-30 21:25:23 -08:00
parent 7d5f45d9e3
commit 6a8e98d4b7

View File

@ -89,7 +89,10 @@ do_test()
runtestbg "ONEXEC $desc ($prof -> $target_prof)" $res $target_prof "$@"
# check that transition does not happen before exec, and that transition
# is set
# give the onexec process a chance to run
sleep 0.05
if ! check_current $_pid $prof ; then
checktestfg
return