From a7cd59819e769e6741a0f628ec55020c69c1a312 Mon Sep 17 00:00:00 2001 From: Christian Boltz Date: Fri, 1 Mar 2024 20:34:11 +0100 Subject: [PATCH] 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". --- utils/test/test-mount.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/test/test-mount.py b/utils/test/test-mount.py index df3fa168f..8926b0caf 100644 --- a/utils/test/test-mount.py +++ b/utils/test/test-mount.py @@ -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):