This patch verifies basic alternation usage.

Patch history:
  v1: initial revision
  v2: mark nested alternation tests as passing, as it was deemed a bug
      that the parser didn't support them.

Signed-off-by: Steve Beattie <[email protected]>
---
 parser/tst/simple_tests/file/file/ok_alternations_1.sd  |    7 +++++++
 parser/tst/simple_tests/file/file/ok_alternations_2.sd  |    7 +++++++
 parser/tst/simple_tests/file/ok_alternations_1.sd       |    7 +++++++
 parser/tst/simple_tests/file/ok_alternations_2.sd       |    7 +++++++
 parser/tst/simple_tests/file/owner/ok_alternations_1.sd |    7 +++++++
 parser/tst/simple_tests/file/owner/ok_alternations_2.sd |    7 +++++++
 6 files changed, 42 insertions(+)

Index: b/parser/tst/simple_tests/file/ok_alternations_2.sd
===================================================================
--- /dev/null
+++ b/parser/tst/simple_tests/file/ok_alternations_2.sd
@@ -0,0 +1,7 @@
+#
+#=Description basic file rule w/nested alternations
+#=EXRESULT PASS
+#
+/usr/bin/foo {
+  
/a/b/c/**{cache,data,download,/ext,file{admin,s},images,joomla,moodledata/sessions}/**
 rw,
+}
Index: b/parser/tst/simple_tests/file/file/ok_alternations_1.sd
===================================================================
--- /dev/null
+++ b/parser/tst/simple_tests/file/file/ok_alternations_1.sd
@@ -0,0 +1,7 @@
+#
+#=Description basic file rule w/alternations
+#=EXRESULT PASS
+#
+/usr/bin/foo {
+  file 
/a/b/c/**{cache,data,download,/ext,fileadmin,files,images,joomla,moodledata/sessions}/**
 rw,
+}
Index: b/parser/tst/simple_tests/file/ok_alternations_1.sd
===================================================================
--- /dev/null
+++ b/parser/tst/simple_tests/file/ok_alternations_1.sd
@@ -0,0 +1,7 @@
+#
+#=Description basic file rule w/alternations
+#=EXRESULT PASS
+#
+/usr/bin/foo {
+  
/a/b/c/**{cache,data,download,/ext,fileadmin,files,images,joomla,moodledata/sessions}/**
 rw,
+}
Index: b/parser/tst/simple_tests/file/file/ok_alternations_2.sd
===================================================================
--- /dev/null
+++ b/parser/tst/simple_tests/file/file/ok_alternations_2.sd
@@ -0,0 +1,7 @@
+#
+#=Description basic file rule w/nested alternations
+#=EXRESULT PASS
+#
+/usr/bin/foo {
+  file 
/a/b/c/**{cache,data,download,/ext,file{admin,s},images,joomla,moodledata/sessions}/**
 rw,
+}
Index: b/parser/tst/simple_tests/file/owner/ok_alternations_2.sd
===================================================================
--- /dev/null
+++ b/parser/tst/simple_tests/file/owner/ok_alternations_2.sd
@@ -0,0 +1,7 @@
+#
+#=Description basic file rule w/nested alternations
+#=EXRESULT PASS
+#
+/usr/bin/foo {
+  owner 
/a/b/c/**{cache,data,download,/ext,file{admin,s},images,joomla,moodledata/sessions}/**
 rw,
+}
Index: b/parser/tst/simple_tests/file/owner/ok_alternations_1.sd
===================================================================
--- /dev/null
+++ b/parser/tst/simple_tests/file/owner/ok_alternations_1.sd
@@ -0,0 +1,7 @@
+#
+#=Description basic file rule w/alternations
+#=EXRESULT PASS
+#
+/usr/bin/foo {
+  owner 
/a/b/c/**{cache,data,download,/ext,fileadmin,files,images,joomla,moodledata/sessions}/**
 rw,
+}


-- 
AppArmor mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/apparmor

Reply via email to