regression tests: fix aa_policy_cache when using system parser

When using the system parser ${parser_config} will be empty and so if this
is quoted when passed as  argument to the parser then this gets in
interpreted as the name of a file to be compiled and hence the parser just
prints:

File  not found, skipping...
File  not found, skipping...
File  not found, skipping...
...

for all the aa_policy_cache tests - instead fix this by just not quoting
this argument as suggested by cboltz.

This fixes the regression tests to run to completion without error when
USE_SYSTEM=1 is set.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/788
Signed-off-by: Alex Murray <alex.murray@canonical.com>
Acked-by: Christian Boltz <apparmor@cboltz.de>
This commit is contained in:
Alex Murray 2021-08-11 17:57:11 +09:30
parent 131ae8425b
commit 516733950e
Failed to generate hash of commit

View file

@ -56,7 +56,7 @@ create_cache_files()
do
cachefile="${cachedir}/${policy}"
echo "profile $policy { /f r, }" | ${subdomain} "${parser_config}" -qS > "$cachefile"
echo "profile $policy { /f r, }" | ${subdomain} ${parser_config} -qS > "$cachefile"
done
}