On 2014-06-03 19:19:28, Christian Boltz wrote: > Hello, > > Am Montag, 2. Juni 2014 schrieb Tyler Hicks: > > Bug: https://bugs.launchpad.net/bugs/1325109 > > > > The parser will accept rules with either umount or unmount rule types. > > The utils should follow suite. > > > > Signed-off-by: Tyler Hicks <[email protected]> > > --- > > utils/apparmor/aa.py | 2 +- > > utils/test/test-mount_parse.py | 12 ++++++++++++ > > utils/test/test-regex_matches.py | 2 ++ > > 3 files changed, 15 insertions(+), 1 deletion(-) > [...] > > --- a/utils/test/test-mount_parse.py > > +++ b/utils/test/test-mount_parse.py > > > + def test_parse_plain_unmount_rule(self): > > + rule = 'unmount,' > > + mount = aa.parse_mount_rule(rule) > > + self.assertEqual(rule, mount.serialize(), > > + 'mount object returned "%s", expected "%s"' % > > (mount.serialize(), rule)) + > > + def test_parse_unmount_with_mount_point(self): > > + rule = 'unmount /mnt/external,' > > + mount = aa.parse_mount_rule(rule) > > + self.assertEqual(rule, mount.serialize(), > > + 'mount object returned "%s", expected "%s"' % > > Doing this with an array and a loop is still on your TODO list, right? > ;-)
Lets get aa.parse_*_rule() to actually do something other than saving off the rule string before we worry about optimizing the test cases. The tests are essentially comparing the rule string to itself right now. > > > That said, > Acked-by: Christian Boltz <[email protected]> Thanks! Tyler > > > Regards, > > Christian Boltz > -- > >Jetzt, wo du es sagst. Ich benutze aber immer cat. Auch wenn ich mit > >grep eine Datei durchsuchen will. Keine Ahnung warum. > >Ich glaube, dass ich das mal am Anfang irgendwo gelesen habe, und dann > >hat es sich ins Hirn eingebrannt. > *tsk* Ich glaub, wir muessen dich mal einer Gehirnwaesche unterziehen... > [> Marcus Habermehl und David Haller in suse-linux] > > > -- > AppArmor mailing list > [email protected] > Modify settings or unsubscribe at: > https://lists.ubuntu.com/mailman/listinfo/apparmor
signature.asc
Description: Digital signature
-- AppArmor mailing list [email protected] Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/apparmor
