Skip to content

Commit d50851e

Browse files
committed
Add functional tests for --generate
Refers to #67.
1 parent eec1747 commit d50851e

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

.github/workflows/functional_test.sh

+13-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ coverage run -a --branch bin/kconfig-hardened-check -h
1212
echo ">>>>> get version <<<<<"
1313
coverage run -a --branch bin/kconfig-hardened-check --version
1414

15-
echo ">>>>> print the security hardening preferences <<<<<"
15+
echo ">>>>> print the security hardening recommendations <<<<<"
1616
coverage run -a --branch bin/kconfig-hardened-check -p X86_64
1717
coverage run -a --branch bin/kconfig-hardened-check -p X86_64 -m verbose
1818
coverage run -a --branch bin/kconfig-hardened-check -p X86_64 -m json
@@ -29,6 +29,12 @@ coverage run -a --branch bin/kconfig-hardened-check -p ARM
2929
coverage run -a --branch bin/kconfig-hardened-check -p ARM -m verbose
3030
coverage run -a --branch bin/kconfig-hardened-check -p ARM -m json
3131

32+
echo ">>>>> generate the Kconfig fragment <<<<<"
33+
coverage run -a --branch bin/kconfig-hardened-check -g X86_64
34+
coverage run -a --branch bin/kconfig-hardened-check -g X86_32
35+
coverage run -a --branch bin/kconfig-hardened-check -g ARM64
36+
coverage run -a --branch bin/kconfig-hardened-check -g ARM
37+
3238
echo ">>>>> check the example kconfig files and cmdline <<<<<"
3339
cat /proc/cmdline
3440
echo "l1tf=off mds=full randomize_kstack_offset=on iommu.passthrough=0" > ./cmdline_example
@@ -62,6 +68,12 @@ echo ">>>>> wrong modes for -p <<<<<"
6268
echo ">>>>> -p and -c together <<<<<"
6369
! coverage run -a --branch bin/kconfig-hardened-check -p X86_64 -c kconfig_hardened_check/config_files/distros/fedora_34.config
6470

71+
echo ">>>>> wrong mode for -g <<<<<"
72+
! coverage run -a --branch bin/kconfig-hardened-check -g X86_64 -m show_ok
73+
74+
echo ">>>>> -g and -c together <<<<<"
75+
! coverage run -a --branch bin/kconfig-hardened-check -g X86_64 -c kconfig_hardened_check/config_files/distros/fedora_34.config
76+
6577
cp kconfig_hardened_check/config_files/distros/fedora_34.config ./test.config
6678

6779
echo ">>>>> no kernel version <<<<<"

0 commit comments

Comments
 (0)