X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=.github%2Fworkflows%2Ffunctional_test.sh;h=ca50aafaa733e14ddd333478d84a7e86e516c1f5;hb=480c6df60ad7256eb28c49af06a1afeee4207d24;hp=106320c8447516e22c9fb5b1b551b7711ebbe4db;hpb=35f90af9096a0dad868107ea6dc005468badd5c3;p=kconfig-hardened-check.git diff --git a/.github/workflows/functional_test.sh b/.github/workflows/functional_test.sh index 106320c..ca50aaf 100644 --- a/.github/workflows/functional_test.sh +++ b/.github/workflows/functional_test.sh @@ -99,6 +99,19 @@ 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 ">>>>> empty cmdline file <<<<<" +touch ./empty_file +coverage run -a --branch bin/kernel-hardening-checker -c ./test.config -l ./empty_file && 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 @@ -147,7 +160,6 @@ echo 'some strange line' >> error_sysctls coverage run -a --branch bin/kernel-hardening-checker -c test.config -s error_sysctls && exit 1 echo ">>>>> invalid sysctl file <<<<<" -touch empty_file coverage run -a --branch bin/kernel-hardening-checker -c test.config -s empty_file && exit 1 echo "The end of the functional tests"