2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-31 06:16:03 +00:00

Add useful error message in test-mount.py

If /proc/filesystems contains a filesystem that is not listed in
MountRule valid_fs, print a useful error message that says what exactly
is going on, instead of only saying "False is not True".
This commit is contained in:
Christian Boltz
2024-03-01 20:34:11 +01:00
parent b264bb62c9
commit a7cd59819e

View File

@@ -123,7 +123,8 @@ class MountTestFilesystems(AATest):
def test_fs(self):
with open("/proc/filesystems") as f:
for line in f:
self.assertTrue(line.split()[-1] in valid_fs)
fs_name = line.split()[-1]
self.assertTrue(fs_name in valid_fs, "/proc/filesystems contains %s which is not listed in MountRule valid_fs" % fs_name)
class MountTestGlob(AATest):