diff mbox series

tests/functional/test_vnc: skip test if no crypto backend available

Message ID 20250414093732.220498-1-cohuck@redhat.com (mailing list archive)
State New
Headers show
Series tests/functional/test_vnc: skip test if no crypto backend available | expand

Commit Message

Cornelia Huck April 14, 2025, 9:37 a.m. UTC
The test_change_password test will fail if no cryptographic backend is
available (e.g. if QEMU was built on a system with no cryptographic
library development packages installed); just skip the test in that
case.

Signed-off-by: Cornelia Huck <cohuck@redhat.com>
---
 tests/functional/test_vnc.py | 2 ++
 1 file changed, 2 insertions(+)

Comments

Thomas Huth April 14, 2025, 11:45 a.m. UTC | #1
On 14/04/2025 11.37, Cornelia Huck wrote:
> The test_change_password test will fail if no cryptographic backend is
> available (e.g. if QEMU was built on a system with no cryptographic
> library development packages installed); just skip the test in that
> case.
> 
> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
> ---
>   tests/functional/test_vnc.py | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/tests/functional/test_vnc.py b/tests/functional/test_vnc.py
> index 8c9953bdb001..d4e9dd0279ea 100755
> --- a/tests/functional/test_vnc.py
> +++ b/tests/functional/test_vnc.py
> @@ -55,6 +55,8 @@ def launch_guarded(self):
>           except VMLaunchFailure as excp:
>               if "-vnc: invalid option" in excp.output:
>                   self.skipTest("VNC support not available")
> +            elif "Cipher backend does not support DES algorithm" in excp.output:
> +                self.skipTest("No cryptographic backend available")
>               else:
>                   self.log.info("unhandled launch failure: %s", excp.output)
>                   raise excp

Reviewed-by: Thomas Huth <thuth@redhat.com>
diff mbox series

Patch

diff --git a/tests/functional/test_vnc.py b/tests/functional/test_vnc.py
index 8c9953bdb001..d4e9dd0279ea 100755
--- a/tests/functional/test_vnc.py
+++ b/tests/functional/test_vnc.py
@@ -55,6 +55,8 @@  def launch_guarded(self):
         except VMLaunchFailure as excp:
             if "-vnc: invalid option" in excp.output:
                 self.skipTest("VNC support not available")
+            elif "Cipher backend does not support DES algorithm" in excp.output:
+                self.skipTest("No cryptographic backend available")
             else:
                 self.log.info("unhandled launch failure: %s", excp.output)
                 raise excp