projects
/
kconfig-hardened-check.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
480c6df
)
Code refactoring to improve test coverage (I)
author
Alexander Popov
<alex.popov@linux.com>
Mon, 10 Jun 2024 13:12:15 +0000
(16:12 +0300)
committer
Alexander Popov
<alex.popov@linux.com>
Mon, 10 Jun 2024 13:12:15 +0000
(16:12 +0300)
kernel_hardening_checker/__init__.py
patch
|
blob
|
history
diff --git
a/kernel_hardening_checker/__init__.py
b/kernel_hardening_checker/__init__.py
index 5893fab542ddd3e16e1b22a55f86e5e21e1ab258..043dae8c8362b446e9a25e9291d4e095c7e85d9d 100644
(file)
--- a/
kernel_hardening_checker/__init__.py
+++ b/
kernel_hardening_checker/__init__.py
@@
-116,12
+116,12
@@
def print_checklist(mode: StrOrNone, checklist: List[ChecklistObjType], with_res
ok_count += 1
if mode == 'show_fail':
continue
- elif opt.result.startswith('FAIL'):
+ else:
+ assert(opt.result.startswith('FAIL')), \
+ f'unexpected result "{opt.result}" of {opt.name} check'
fail_count += 1
if mode == 'show_ok':
continue
- else:
- assert(False), f'unexpected result "{opt.result}" of {opt.name} check'
opt.table_print(mode, with_results)
print()
if mode == 'verbose':