[apparmor] [PATCH] regression test: update query label tests to reflect, fixed xpass cases
Seth Arnold
seth.arnold at canonical.com
Wed Sep 6 20:45:31 UTC 2017
On Wed, Sep 06, 2017 at 01:10:49PM -0700, John Johansen wrote:
> newer versions of apparmor that support multi-transaction have this xpass case fixed
>
> Signed-off-by: John Johansen <john.johansen at canonical.com>
Nice :)
Acked-by: Seth Arnold <seth.arnold at canonical.com>
Thanks
> ---
> tests/regression/apparmor/query_label.sh | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/tests/regression/apparmor/query_label.sh b/tests/regression/apparmor/query_label.sh
> index e9028f1..44e1e8a 100755
> --- a/tests/regression/apparmor/query_label.sh
> +++ b/tests/regression/apparmor/query_label.sh
> @@ -213,8 +213,13 @@ querytest "QUERY dbus (svc receive)" fail $dbus_svc_query
> genqueryprofile "file,"
> expect allow
> perms file exec,write,read,append,create,delete,setattr,getattr,chmod,chown,link,linksubset,lock,exec_mmap
> -querytest "QUERY file (all base perms #1)" xpass /anything
> -querytest "QUERY file (all base perms #2)" xpass /everything
> +if [ "$(kernel_features query/label/multi_transaction)" == "true" ] ; then
> + querytest "QUERY file (all base perms #1)" pass /anything
> + querytest "QUERY file (all base perms #2)" pass /everything
> +else
> + querytest "QUERY file (all base perms #1)" xpass /anything
> + querytest "QUERY file (all base perms #2)" xpass /everything
> +fi
>
> genqueryprofile "/etc/passwd r,"
> expect allow
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20170906/863f0c43/attachment.sig>
More information about the AppArmor
mailing list