[CRIU] [PATCH 1/2] zdtm: execute static/apparmor in CT

Tycho Andersen tycho.andersen at canonical.com
Tue May 19 05:18:42 PDT 2015


On Mon, May 18, 2015 at 09:50:38PM +0300, Andrey Vagin wrote:
> Signed-off-by: Andrey Vagin <avagin at openvz.org>

Is this necessary, or just nice to have? In any case, it looks like a
fine change:

Acked-by: Tycho Andersen <tycho.andersen at canonical.com>

> ---
>  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
> 
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu


More information about the CRIU mailing list