[apparmor] [patch] Add more AARE tests
Seth Arnold
seth.arnold at canonical.com
Tue Oct 13 18:47:02 UTC 2015
On Sun, Oct 11, 2015 at 09:01:59PM +0200, Christian Boltz wrote:
> Hello,
>
> this patch adds tests for [chars] and [^chars] style globbing to test-aare.py.
>
> With this addition, all globbing styles (as documented in apparmor.d(5))
> are covered in the convert_regexp() tests.
>
>
> [ 91-test-aare-add-more-tests.diff ]
>
Acked-by: Seth Arnold <seth.arnold at canonical.com>
Acked for both trunk and 2.9
Thanks
> --- utils/test/test-aare.py 2015-10-11 20:21:03.597090000 +0200
> +++ utils/test/test-aare.py 2015-10-11 20:52:42.235540135 +0200
> @@ -88,6 +89,19 @@
> (['/foo/{,**}', '/foo/bar/baz/' ], True),
> (['/foo/{,**}', '/bar/' ], False),
>
> + (['/foo/a[bcd]e', '/foo/abe' ], True),
> + (['/foo/a[bcd]e', '/foo/abend' ], False),
> + (['/foo/a[bcd]e', '/foo/axe' ], False),
> +
> + (['/foo/a[b-d]e', '/foo/abe' ], True),
> + (['/foo/a[b-d]e', '/foo/ace' ], True),
> + (['/foo/a[b-d]e', '/foo/abend' ], False),
> + (['/foo/a[b-d]e', '/foo/axe' ], False),
> +
> + (['/foo/a[^bcd]e', '/foo/abe' ], False),
> + (['/foo/a[^bcd]e', '/foo/abend' ], False),
> + (['/foo/a[^bcd]e', '/foo/axe' ], True),
> +
> (['/foo/{foo,bar,user,other}/bar/', '/foo/user/bar/' ], True),
> (['/foo/{foo,bar,user,other}/bar/', '/foo/bar/bar/' ], True),
> (['/foo/{foo,bar,user,other}/bar/', '/foo/wrong/bar/' ], False),
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20151013/6d30393b/attachment.pgp>
More information about the AppArmor
mailing list