[apparmor] [PATCH 08/11] tests: Adjust parser_supports() to accept test rules with spaces

John Johansen john.johansen at canonical.com
Fri May 27 12:22:22 UTC 2016


On 05/25/2016 01:59 PM, Tyler Hicks wrote:
> Quote $@ so that the for loop doesn't iterate on the space-delimited
> version of the rule(s) under test. This allows more complex rules such
> as "change_profile foo -> bar," to be tested where, before this patch,
> only "change_profile," could be tested.
> 
> Signed-off-by: Tyler Hicks <tyhicks at canonical.com>

Acked-by: John Johansen <john.johansen at canonical.com>

> ---
>  tests/regression/apparmor/prologue.inc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/regression/apparmor/prologue.inc b/tests/regression/apparmor/prologue.inc
> index 67e1aae..a77fda5 100755
> --- a/tests/regression/apparmor/prologue.inc
> +++ b/tests/regression/apparmor/prologue.inc
> @@ -69,7 +69,7 @@ requires_query_interface()
>  
>  parser_supports()
>  {
> -	for R in $@ ; do
> +	for R in "$@" ; do
>  		echo "/test { $R }" | $subdomain ${parser_args} -qQT 2>/dev/null 1>/dev/null
>  		if [ $? -ne 0 ] ; then
>  			echo "Compiler does not support rule '$R'"
> 




More information about the AppArmor mailing list