From 047d84b9595b38df0523c816efc0233853fe4b46 Mon Sep 17 00:00:00 2001 From: Alexander Popov Date: Sun, 2 Jun 2024 20:13:10 +0300 Subject: [PATCH] CI: Add the tests for the code checking that the config files exist --- .github/workflows/functional_test.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/functional_test.sh b/.github/workflows/functional_test.sh index 106320c..3f67061 100644 --- a/.github/workflows/functional_test.sh +++ b/.github/workflows/functional_test.sh @@ -99,6 +99,15 @@ coverage run -a --branch bin/kernel-hardening-checker -g X86_64 -m show_ok && ex cp kernel_hardening_checker/config_files/distros/fedora_34.config ./test.config +echo ">>>>> no kconfig file <<<<<" +coverage run -a --branch bin/kernel-hardening-checker -c ./nosuchfile && exit 1 + +echo ">>>>> no cmdline file <<<<<" +coverage run -a --branch bin/kernel-hardening-checker -c ./test.config -l ./nosuchfile && exit 1 + +echo ">>>>> no sysctl file <<<<<" +coverage run -a --branch bin/kernel-hardening-checker -s ./nosuchfile && exit 1 + echo ">>>>> no kernel version <<<<<" sed '3d' test.config > error.config coverage run -a --branch bin/kernel-hardening-checker -c error.config && exit 1 -- 2.31.1