[apparmor] [PATCH 08/11] tests: Adjust parser_supports() to accept test rules with spaces
Tyler Hicks
tyhicks at canonical.com
Wed May 25 20:59:40 UTC 2016
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>
---
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'"
--
2.7.4
More information about the AppArmor
mailing list