2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-22 18:17:09 +00:00

9 Commits

Author SHA1 Message Date
Maxime Bélair
380dbb84b8 utils: Fix priority checking for is_covered
MR !1735 mistakenly assumed that x.is_covered(y) means "x is covered by
y" when the opposite is true

Fix the logic of is_covered and associated tests.

Signed-off-by: Maxime Bélair <maxime.belair@canonical.com>
2025-07-17 11:00:24 +02:00
Maxime Bélair
f78aa36547 Add tests for priority is_covered/is_equal fix
Signed-off-by: Maxime Bélair <maxime.belair@canonical.com>
2025-07-16 12:13:41 +00:00
Christian Boltz
a833528f36
Split test classes
Create separate classes for tests not fitting under *TestParseInvalid
2025-07-15 20:34:33 +02:00
Christian Boltz
66cb0af47c
*TestParseInvalid: move tests not matching regex into tests array 2025-06-29 18:26:10 +02:00
Christian Boltz
2a37040415
Introduce AATest.parseInvalidRule()
... and change all *TestParseInvalid classes to use it, instead of
having (nearly) the same function in every test-*.py.

While at it, enable the tests for abi and include rules.
2025-06-29 17:35:48 +02:00
Christian Boltz
a13d8cfffb
utils: move tests for invalid priority to test-*
... instead of having them in test-modifiers.py for all rule types

Also add a few additional tests while on it.
2025-06-24 18:11:14 +02:00
John Johansen
c0fcd1698b utils: add support for priority rule prefix
Add basic support for the priority rules prefix. This patch does not
allow the utils to set or suggest priorities. It allows parsing and
retaining of the priority prefix if it already exists on rules and
checking if it's in the supported range.

Signed-off-by: Georgia Garcia <georgia.garcia@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
2025-05-05 14:54:22 -03:00
Georgia Garcia
cec9ae6dff utils: fix coding style to match PEP8
Annotate exceptions with '  # noqa: ERROR'

Signed-off-by: Georgia Garcia <georgia.garcia@canonical.com>
2024-05-20 13:56:37 -03:00
Georgia Garcia
cb2292922d utils: add io_uring python tool support
Signed-off-by: Georgia Garcia <georgia.garcia@canonical.com>
2023-05-03 16:04:32 +02:00