[apparmor] [PATCH] regression test: update query label tests to reflect, fixed xpass cases

John Johansen john.johansen at canonical.com
Wed Sep 6 20:10:49 UTC 2017

newer versions of apparmor that support multi-transaction have this xpass case fixed

Signed-off-by: John Johansen <john.johansen at canonical.com>
 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
+    querytest "QUERY file (all base perms #1)" xpass /anything
+    querytest "QUERY file (all base perms #2)" xpass /everything
 genqueryprofile "/etc/passwd r,"
 expect allow

More information about the AppArmor mailing list