diff --git a/tests/0_lib/functions.sh b/tests/0_lib/functions.sh index fa59813..2b92aa9 100755 --- a/tests/0_lib/functions.sh +++ b/tests/0_lib/functions.sh @@ -190,7 +190,7 @@ function t_GetPkgVer # Description: get the arch function t_GetArch { - rpm -q kernel --queryformat '%{arch}\n' + rpm -q kernel --queryformat '%{arch}\n' | head -n 1 } # Set the arch diff --git a/tests/p_kernel/02_kernel_secureboot_signed.sh b/tests/p_kernel/02_kernel_secureboot_signed.sh index 404d06d..b4a8bbe 100755 --- a/tests/p_kernel/02_kernel_secureboot_signed.sh +++ b/tests/p_kernel/02_kernel_secureboot_signed.sh @@ -8,7 +8,11 @@ if [[ "$centos_ver" -ge 7 && "$arch" = "x86_64" ]] ; then for kernel in $(rpm -q kernel --queryformat '%{version}-%{release}.%{arch}\n') do t_Log "Validating kernel $kernel ..." - pesign --show-signature --in /boot/vmlinuz-${kernel}|egrep -q 'Red Hat Inc.|CentOS Secure Boot \(key 1\)' + if [[ "$centos_ver" -ge 8 && "$kernel" > "4.18.0-480.el8" ]] ; then + pesign --show-signature --in /boot/vmlinuz-${kernel}|egrep -q 'Red Hat Inc.|CentOS Secure Boot Signing 201' + else + pesign --show-signature --in /boot/vmlinuz-${kernel}|egrep -q 'Red Hat Inc.|CentOS Secure Boot \(key 1\)' + fi t_CheckExitStatus $? done else