Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
kernel-hardening-checker
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fact-depend
kernel-hardening-checker
Commits
f08db00f
Commit
f08db00f
authored
Mar 10, 2023
by
Alexander Popov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a template for unit-tests
parent
c2e24100
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
0 deletions
+27
-0
main.yml
.github/workflows/main.yml
+5
-0
test_engine.py
kconfig_hardened_check/test_engine.py
+22
-0
No files found.
.github/workflows/main.yml
View file @
f08db00f
...
...
@@ -170,3 +170,8 @@ jobs:
run
:
|
coverage erase
rm ./coverage.xml
-
name
:
Run unit-tests and collect coverage
run
:
|
coverage run --include=kconfig_hardened_check/engine.py,kconfig_hardened_check/test_engine.py -m unittest -v
coverage xml -i -o coverage_unittest.xml
kconfig_hardened_check/test_engine.py
0 → 100644
View file @
f08db00f
#!/usr/bin/python3
"""
This tool helps me to check Linux kernel options against
my security hardening preferences for X86_64, ARM64, X86_32, and ARM.
Let the computers do their job!
Author: Alexander Popov <alex.popov@linux.com>
This module performs unit-testing of the kconfig-hardened-check engine.
"""
import
unittest
# from .engine import populate_with_data, perform_checks
class
TestEngine
(
unittest
.
TestCase
):
def
test_upper
(
self
):
self
.
assertEqual
(
'foo'
.
upper
(),
'FOO'
)
def
test_isupper
(
self
):
self
.
assertTrue
(
'FOO'
.
isupper
())
self
.
assertTrue
(
'Foo'
.
isupper
())
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment