diff --git a/setup.cfg b/setup.cfg index 47647b18231ace636713b567625062a0ca2220c9..49387d0f025cf09ce8530bbf9e4ec246515d0a9a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = swet -version = 0.0.6 +version = 0.0.7 description = SWET (Schon wieder ein Testsystem) is a minimal Testsystem for SWEB (Schon wieder ein Betriebssystem) long_description = file: README.md long_description_content_type = text/markdown diff --git a/swet/_testutils.py b/swet/_testutils.py index b338fb1404dd111175a6c834cf4da45cf90309fc..0c14864779a8da7a04d6e2efc804ab20c1d05847 100644 --- a/swet/_testutils.py +++ b/swet/_testutils.py @@ -18,6 +18,7 @@ class Result(Enum): failed = 'FAILED' skipped = 'SKIPPED' vfs_error = 'VFS-ERROR' + userspace_ssp = 'Userspace Stack Smashing Protector' class Colors(Enum): @@ -32,6 +33,7 @@ TEST_RESULT_COLORS = { Result.failed: Colors.red, Result.skipped: Colors.yellow, Result.vfs_error: Colors.yellow, + Result.userspace_ssp: Colors.yellow, } QEMU_EXECUTE_COMMAND = [ @@ -167,6 +169,9 @@ def execute_test( elif 'KERNEL PANIC' in logline: test_result = Result.failed + elif 'Bufferoverflow detected!' in logline: + test_result = Result.userspace_ssp + qemu_prozess.terminate() _print_testresult( @@ -182,6 +187,8 @@ def execute_test( for line in test_log: print(line) return -1 + elif test_result == Result.userspace_ssp: + return -1 else: return 0