[apparmor] [patch] split flags_bad.sd

Christian Boltz apparmor at cboltz.de
Sat Jun 6 21:00:43 UTC 2015


Hello,

I just went through all "FAIL" test profiles, checked for files
containing multiple expected failures [1] and found one ;-)

flags_bad.sd contains multiple failures. Split the file into multiple
files with one failure in each and, while on it, using more helpful
filenames.



[ split_flags_bad.diff ]

=== removed file 'parser/tst/simple_tests/profile/flags/flags_bad.sd'
--- parser/tst/simple_tests/profile/flags/flags_bad.sd  2014-08-16 11:22:51 +0000
+++ parser/tst/simple_tests/profile/flags/flags_bad.sd  1970-01-01 00:00:00 +0000
@@ -1,30 +0,0 @@
-#
-#=DESCRIPTION Ensure debug flag is no longer accepted
-#=EXRESULT FAIL
-# vim:syntax=subdomain
-# Last Modified: Sun Apr 17 19:44:44 2005
-#
-/does/not/exist flags=(debug) {
-  /usr/X11R6/lib/lib*so* r,
-  /does/not/exist r,
-}
-
-/does/not/exist2 flags=(audit,debug) {
-  /usr/X11R6/lib/lib*so* r,
-  /does/not/exist2 r,
-}
-
-/does/not/exist3 flags=(debug,complain) {
-  /usr/X11R6/lib/lib*so* r,
-  /does/not/exist5 r,
-}
-
-/does/not/exist4 flags=(audit,complain) {
-  /usr/X11R6/lib/lib*so* r,
-  /does/not/exist7 r,
-
-  ^debug flags=(debug) {
-    /var/log/debug rwl,
-  }
-}
-

=== added file 'parser/tst/simple_tests/profile/flags/flags_bad_debug_1.sd'
--- parser/tst/simple_tests/profile/flags/flags_bad_debug_1.sd  1970-01-01 00:00:00 +0000
+++ parser/tst/simple_tests/profile/flags/flags_bad_debug_1.sd  2015-06-06 20:47:06 +0000
@@ -0,0 +1,11 @@
+#
+#=DESCRIPTION Ensure debug flag is no longer accepted
+#=EXRESULT FAIL
+# vim:syntax=subdomain
+# Last Modified: Sun Apr 17 19:44:44 2005
+#
+/does/not/exist flags=(debug) {
+  /usr/X11R6/lib/lib*so* r,
+  /does/not/exist r,
+}
+

=== added file 'parser/tst/simple_tests/profile/flags/flags_bad_debug_2.sd'
--- parser/tst/simple_tests/profile/flags/flags_bad_debug_2.sd  1970-01-01 00:00:00 +0000
+++ parser/tst/simple_tests/profile/flags/flags_bad_debug_2.sd  2015-06-06 20:47:15 +0000
@@ -0,0 +1,11 @@
+#
+#=DESCRIPTION Ensure debug flag is no longer accepted
+#=EXRESULT FAIL
+# vim:syntax=subdomain
+# Last Modified: Sun Apr 17 19:44:44 2005
+#
+
+/does/not/exist2 flags=(audit,debug) {
+  /usr/X11R6/lib/lib*so* r,
+  /does/not/exist2 r,
+}

=== added file 'parser/tst/simple_tests/profile/flags/flags_bad_debug_3.sd'
--- parser/tst/simple_tests/profile/flags/flags_bad_debug_3.sd  1970-01-01 00:00:00 +0000
+++ parser/tst/simple_tests/profile/flags/flags_bad_debug_3.sd  2015-06-06 20:47:22 +0000
@@ -0,0 +1,12 @@
+#
+#=DESCRIPTION Ensure debug flag is no longer accepted
+#=EXRESULT FAIL
+# vim:syntax=subdomain
+# Last Modified: Sun Apr 17 19:44:44 2005
+#
+
+/does/not/exist3 flags=(debug,complain) {
+  /usr/X11R6/lib/lib*so* r,
+  /does/not/exist5 r,
+}
+

=== added file 'parser/tst/simple_tests/profile/flags/flags_bad_debug_4.sd'
--- parser/tst/simple_tests/profile/flags/flags_bad_debug_4.sd  1970-01-01 00:00:00 +0000
+++ parser/tst/simple_tests/profile/flags/flags_bad_debug_4.sd  2015-06-06 20:47:28 +0000
@@ -0,0 +1,16 @@
+#
+#=DESCRIPTION Ensure debug flag is no longer accepted
+#=EXRESULT FAIL
+# vim:syntax=subdomain
+# Last Modified: Sun Apr 17 19:44:44 2005
+#
+
+/does/not/exist4 flags=(audit,complain) {
+  /usr/X11R6/lib/lib*so* r,
+  /does/not/exist7 r,
+
+  ^debug flags=(debug) {
+    /var/log/debug rwl,
+  }
+}
+



Regards,

Christian Boltz

[1] cd parser/tst/simple_tests
    grep -r -l FAIL | xargs grep -c '}' |grep -v ':1$'
    is a good start, but still includes lots of false positives.
-- 
Ein Computer tut ja das, was man ihm "sagt", und nicht das, was
man will. Ergo muß man wissen, wie man ihm sagt, was man will.
[Stefan G. Weichinger in postfixbuch-users]




More information about the AppArmor mailing list