mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 00:14:44 +01:00
Merge 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". MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1166 Approved-by: Georgia Garcia <georgia.garcia@canonical.com> Merged-by: Christian Boltz <apparmor@cboltz.de>
This commit is contained in:
commit
a367c07437
1 changed files with 2 additions and 1 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Reference in a new issue