[apparmor] [patch] move tests for convert_regexp() to (new) test-aare.py

Christian Boltz apparmor at cboltz.de
Sat Oct 3 21:14:14 UTC 2015


Hello,

Am Samstag, 12. September 2015 schrieb Christian Boltz:
> the tests for convert_regexp() were hidden in common_test.py, where
> they were never executed.
> 
> This patch moves them to the new file test-aare.py and also converts
> the regex_tests.ini to a tests[] array to have the test data inside
> the test file. (All tests from regex_tests.ini are in test-aare.py,
> and two tests with prepended and appended path segments were added.)
> 
> Also add some tests that check the raw behaviour of convert_regexp() -
> the tests "by example" are probably more useful and for sure more
> readable ;-) but I want to have some examples of the converted
> regexes available.
> 
> 
> One thing I noticed is that
>     /\{foo,bar}
> gets converted to the regex
>     ^/\(foo|bar)$
> however I'd expect that \{ shouldn't be handled as alternation.
> Do I expect something wrong, or is this a bug in convert_regexp()?
> 
> 
> [ 86-move-test-convert-regexp.diff ]

Any comments or reviews on this patch?

If nobody objects, I'll commit it on Wednesday as Acked-by <timeout>.


Regards,

Christian Boltz
-- 
> Laut pin ist es in perl-$version.rpm enthalten, müsste also
> unproblematisch sein.
Das ist nicht ausschlaggebend, wenn SuSE will, können sie auch
OpenOffice in ihr perl.rpm mit reinstopfen.
[> Christian Boltz und Ratti in fontlinge-devel]




More information about the AppArmor mailing list