From 9b6d179b93691a65959ebb10a07310b5cd186134 Mon Sep 17 00:00:00 2001 From: ltx Date: Thu, 9 Jul 2020 11:18:53 +0800 Subject: [PATCH] ignore some file while checking kernel --- tests/system/system.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/system/system.py b/tests/system/system.py index 7967735..36eeac5 100755 --- a/tests/system/system.py +++ b/tests/system/system.py @@ -152,7 +152,8 @@ class SystemTest(Test): print("Error: could not determine if kernel is tainted.") return_code = False - if not os.system("rpm -V --nomtime --nomode --nocontexts %s" % kernel_rpm) is 0: + except_list = ["/modules.dep$", "/modules.symbols$", "/modules.dep.bin$", "/modules.symbols.bin$"] + if os.system("rpm -V --nomtime --nomode --nocontexts %s | grep -Ev '%s'" % (kernel_rpm, "|".join(except_list))) is 0: print("Error: files from %s were modified." % kernel_rpm) print("") return_code = False -- GitLab