mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-31 14:25:52 +00:00
parser: move error count print of equality tesets to run_tests end
The original location in the middle of the priority function helper was completely nonsensical. We can instead do this check just once after running all the tests. Signed-off-by: Ryan Lee <ryan.lee@canonical.com>
This commit is contained in:
@@ -912,12 +912,6 @@ verify_binary_equality "'$p1'x'$p2' mount specific deny doesn't affect non-overl
|
||||
"/t { $p2 audit deny mount /s/** -> /**,
|
||||
mount options=bind /e/ -> /**, }"
|
||||
|
||||
if [ $fails -ne 0 ] || [ $errors -ne 0 ]
|
||||
then
|
||||
printf "ERRORS: %d\nFAILS: %d\n" $errors $fails 1>&2
|
||||
exit $((fails + errors))
|
||||
fi
|
||||
|
||||
|
||||
## priority override equivalence tests
|
||||
## compare single rule, to multi-rule profile where one rule overrides
|
||||
@@ -1109,8 +1103,13 @@ run_tests()
|
||||
done
|
||||
|
||||
[ -z "${verbose}" ] && printf "\n"
|
||||
printf "PASS\n"
|
||||
exit 0
|
||||
if [ $fails -ne 0 ] || [ $errors -ne 0 ]; then
|
||||
printf "ERRORS: %d\nFAILS: %d\n" $errors $fails 1>&2
|
||||
exit $((fails + errors))
|
||||
else
|
||||
printf "PASS\n"
|
||||
exit 0
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user