mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-30 05:47:59 +00:00
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 unconditionally passed as an 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 to pass a single args argument to the parser which will only include parser_config if it is not empty. This fixes the regression tests to run to completion without error when USE_SYSTEM=1 is set. Signed-off-by: Alex Murray <alex.murray@canonical.com>
This commit is contained in:
parent
bbdd563955
commit
0f2a33e7fb
@ -56,7 +56,13 @@ create_cache_files()
|
||||
do
|
||||
cachefile="${cachedir}/${policy}"
|
||||
|
||||
echo "profile $policy { /f r, }" | ${subdomain} "${parser_config}" -qS > "$cachefile"
|
||||
args="-qS"
|
||||
if [ -n "${parser_config}" ]
|
||||
then
|
||||
args="${args} ${parser_config}"
|
||||
fi
|
||||
echo "profile $policy { /f r, }" | ${subdomain} "${args}" > "$cachefile"
|
||||
|
||||
done
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user