From ecaa094f17102756f371a15e519e79ab37df4686 Mon Sep 17 00:00:00 2001 From: Alexander Popov Date: Sun, 2 Jun 2024 20:24:52 +0300 Subject: [PATCH] CI: Add the test for the code checking that the cmdline file is not empty --- .github/workflows/functional_test.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/functional_test.sh b/.github/workflows/functional_test.sh index 3f67061..ca50aaf 100644 --- a/.github/workflows/functional_test.sh +++ b/.github/workflows/functional_test.sh @@ -105,6 +105,10 @@ 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 @@ -156,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" -- 2.31.1