regression tests: fix aa_policy_cache to use correct config file

The aa_policy_cache test is using the system parser.conf file even
when the tests are set to use source. This can lead to failures
if the system parser.conf contain options not understood by
the source parser.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/653
Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit 1033e19171)
This commit is contained in:
John Johansen 2020-10-13 04:34:24 -07:00
parent 350b4a5358
commit 4527abd028
3 changed files with 6 additions and 3 deletions

View file

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

View file

@ -3,7 +3,8 @@ subdomain=${PWD}/../../../parser/apparmor_parser
#subdomain=/sbin/apparmor_parser
# 2. additional arguments to the apparmor parser
parser_args="--config-file=${PWD}/../../../parser.conf -q -K"
parser_config="--config-file=${PWD}/../../../parser/parser.conf"
parser_args="${parser_config} -q -K"
# 3. directory to be used for temp files
# Need to be able to access this directory by the root and nobody users.

View file

@ -3,7 +3,9 @@
subdomain=/sbin/apparmor_parser
# 2. additional arguments to the apparmor parser
parser_args="-q -K"
parser_config=""
parser_args="${parser_config} -q -K"
# 3. directory to be used for temp files
# Need to be able to access this directory by the root and nobody users.