[CRIU] [PATCH 1/2] zdtm: execute static/apparmor in CT
Andrey Vagin
avagin at openvz.org
Mon May 18 11:50:38 PDT 2015
Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
test/zdtm.sh | 1 +
test/zdtm/live/static/apparmor.c | 10 ----------
test/zdtm/live/static/apparmor.checkskip | 3 ++-
3 files changed, 3 insertions(+), 11 deletions(-)
diff --git a/test/zdtm.sh b/test/zdtm.sh
index a78a8b5..fbaca11 100755
--- a/test/zdtm.sh
+++ b/test/zdtm.sh
@@ -199,6 +199,7 @@ generate_test_list()
static/remap_dead_pid
static/poll
static/apparmor
+ ns/static/apparmor
"
TEST_CR_KERNEL="
diff --git a/test/zdtm/live/static/apparmor.c b/test/zdtm/live/static/apparmor.c
index 5da3f44..7af0be8 100644
--- a/test/zdtm/live/static/apparmor.c
+++ b/test/zdtm/live/static/apparmor.c
@@ -78,16 +78,6 @@ int main(int argc, char **argv)
{
test_init(argc, argv);
- if (access("/sys/kernel/security/apparmor", F_OK) != 0) {
- skip("apparmor not enabled\n");
- return 1;
- }
-
- if (system("apparmor_parser -r apparmor.profile") < 0) {
- fail("apparmor profile parse failed");
- return -1;
- }
-
setprofile();
test_daemon();
diff --git a/test/zdtm/live/static/apparmor.checkskip b/test/zdtm/live/static/apparmor.checkskip
index eb506f1..99fa727 100755
--- a/test/zdtm/live/static/apparmor.checkskip
+++ b/test/zdtm/live/static/apparmor.checkskip
@@ -1,3 +1,4 @@
#!/bin/bash
-test -d /sys/kernel/security/apparmor
+test -d /sys/kernel/security/apparmor || exit 1
+apparmor_parser -r `dirname $0`/apparmor.profile
--
2.1.0
More information about the CRIU
mailing list