Reviewed-by: Zhuoying Cai <[email protected]>

On 8/12/26 11:21 AM, Joshua Daley wrote:
> Currently, if secure IPL is not supported by the hypervisor, the test
> will fail because "Verified component" never appears. One must inspect
> the console log to observe the cause of the failure.
> 
> Add a check that skips the test if the host CPU model is missing the
> secure IPL facilities.
> 
> Signed-off-by: Joshua Daley <[email protected]>
> ---
>  tests/functional/s390x/test_secure_ipl.py | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 
> diff --git a/tests/functional/s390x/test_secure_ipl.py 
> b/tests/functional/s390x/test_secure_ipl.py
> index 06fc93e404..5af36b91d8 100755
> --- a/tests/functional/s390x/test_secure_ipl.py
> +++ b/tests/functional/s390x/test_secure_ipl.py
> @@ -29,6 +29,22 @@ def __init__(self, *args, **kwargs):
>          self.cert_path = None
>          self.prompt = None
>  
> +    def _require_host_secure_ipl_support(self, vm):
> +        """
> +        Skip the test if the host CPU model does not expose the Secure IPL
> +        facilities (sipl, sclaf, cstore).
> +        """
> +        props = vm.cmd('query-cpu-model-expansion',
> +                       model={'name': 'host'},
> +                       type='full')['model']['props']
> +        missing = [f for f in ('sipl', 'sclaf', 'cstore')
> +                   if not props.get(f)]
> +        if missing:
> +            self.skipTest(
> +                f"Host CPU does not support Secure IPL: "
> +                f"missing feature(s): {', '.join(missing)}. "
> +                f"Secure IPL requires a z16+ host.")
> +
>      def _create_certificate(self, vm):
>          """Generate x509 certificate"""
>          exec_command_and_wait_for_pattern(self,
> @@ -107,6 +123,8 @@ def setup_s390x_secure_ipl(self):
>                           '-device', 
> 'virtio-blk-ccw,drive=drive0,bootindex=1')
>          temp_vm.launch()
>  
> +        self._require_host_secure_ipl_support(temp_vm)
> +
>          # Initial root account setup (Fedora first boot screen)
>          self.root_password = 'fedora40password'
>          wait_for_console_pattern(self, 'Please make a selection from the 
> above',


Reply via email to