mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 16:35:02 +01:00
![]() This patch rewrites the caching test in python, using python's unittest framework. It has been used with python 2.7 and python 3.3; python2.6 may have issues. It covers the tests in the existing caching.sh test script (with the exception of the test that checks for when the parser in $PATH is newer), as well as adding additional tests that more extensively cover using a cache in an alternate location from basedir. It also adds simple tests for the --create-cache-dir option (along with that option's interaction with the alt-cache option). (Some further work to be done is listed under TODO.) Patch history: v1: - initial version v2: - create template base class - add keep_on_fail() decorator to keep temporary test files around after a test fails - don't dump raw cache file to failure output in test_cache_writing_updates_cache_file() - push run_cmd into template class - create run_cmd_check wrapper to run_cmd that adds an assertion check based on whether return code matches the expected rc (the valgrind tests only want to verify that the rc is not a specific set of values, hence the separate wrapper function) - similarly, add a check to run_cmd_check for verifying the output contains a specific string, also simplifying many of the caching tests. - create testlib.write_file() to simplify writing file Signed-off-by: Steve Beattie <steve@nxnw.org> Acked-by: Christian Boltz <apparmor@cboltz.de> |
||
---|---|---|
.. | ||
libapparmor_re | ||
po | ||
tst | ||
apparmor-parser.spec.in | ||
apparmor.d.pod | ||
apparmor.pod | ||
apparmor_parser.pod | ||
COPYING.GPL | ||
dbus.c | ||
dbus.h | ||
frob_slack_rc | ||
immunix.h | ||
lib.c | ||
lib.h | ||
Makefile | ||
mount.c | ||
mount.h | ||
parser.conf | ||
parser.h | ||
parser_alias.c | ||
parser_common.c | ||
parser_include.c | ||
parser_include.h | ||
parser_interface.c | ||
parser_lex.l | ||
parser_main.c | ||
parser_merge.c | ||
parser_misc.c | ||
parser_policy.c | ||
parser_regex.c | ||
parser_symtab.c | ||
parser_variable.c | ||
parser_yacc.y | ||
policydb.h | ||
profile.cc | ||
profile.h | ||
rc.aaeventd.redhat | ||
rc.aaeventd.suse | ||
rc.apparmor.debian | ||
rc.apparmor.functions | ||
rc.apparmor.redhat | ||
rc.apparmor.slackware | ||
rc.apparmor.suse | ||
README | ||
subdomain.conf | ||
subdomain.conf.pod | ||
techdoc.tex | ||
unit_test.h |
The apparmor_parser allows you to add, replace, and remove AppArmor policy through the use of command line options. The default is to add. `apparmor_parser --help` shows what the command line options are. You can also find more information at http://wiki.apparmor.net Please send all complaints, feature requests, rants about the software, and questions to the apparmor@lists.ubuntu.com mailing list. Bug reports can be filed against the AppArmor project on launchpad.net at https://launchpad.net/apparmor or reported to the mailing list directly for those who wish not to register for an account on launchpad. Security issues can be filed as security bugs on launchpad or directed to security@ubuntu.com. We will attempt to conform to the RFP vulnerability disclosure protocol: http://www.wiretrip.net/rfp/policy.html Thanks. -- The AppArmor development team