From 6a8e98d4b7346f56f6e1a04d0b17b86a33d3d059 Mon Sep 17 00:00:00 2001 From: Steve Beattie Date: Fri, 30 Nov 2012 21:25:23 -0800 Subject: [PATCH] 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 Acked-By: John Johansen (via IRC) --- tests/regression/apparmor/onexec.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/regression/apparmor/onexec.sh b/tests/regression/apparmor/onexec.sh index 915d4dcd5..b728c53d2 100644 --- a/tests/regression/apparmor/onexec.sh +++ b/tests/regression/apparmor/onexec.sh @@ -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