diff --git a/utils/test/test-mount.py b/utils/test/test-mount.py index f6fd324da..c2e8f4609 100644 --- a/utils/test/test-mount.py +++ b/utils/test/test-mount.py @@ -1,6 +1,7 @@ #!/usr/bin/python3 # ---------------------------------------------------------------------- # Copyright (C) 2024 Canonical, Ltd. +# Copyright (C) 2025 Christian Boltz # # This program is free software; you can redistribute it and/or # modify it under the terms of version 2 of the GNU General Public @@ -123,6 +124,8 @@ class MountTestParseInvalid(AATest): ('mount options=(),', AppArmorException), ('mount option=(invalid),', AppArmorException), ('mount option=(ext3ext4),', AppArmorException), + ('mount fstype=({unclosed_regex),', AppArmorException), # invalid AARE + ('mount fstype=({closed}twice}),', AppArmorException), # invalid AARE ) def _run_test(self, rawrule, expected): @@ -144,16 +147,6 @@ class MountTestParseInvalid(AATest): with self.assertRaises(AppArmorBug): MountRule('mount', ('ext3', 'ext4'), MountRule.ALL, MountRule.ALL, MountRule.ALL) # fstype[0] should be '=' or 'in' - def test_diff_invalid_fstype_aare(self): - tests = [ - 'mount fstype=({unclosed_regex),', - 'mount fstype=({closed}twice}),', - ] - - for t in tests: - with self.assertRaises(AppArmorException): - MountRule.create_instance(t) - def test_diff_invalid_fstype_aare_2(self): fslists = [ ['invalid_{_regex'],