Skip to contentSkip to conversation

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

PATCH In review Cornelia Huck 2 participants 2 messages Apr 14, 2025

lore
Share & tools
lore
#0 lore raw

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

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.

---
 tests/functional/test_vnc.py | 2 ++
 1 file changed, 2 insertions(+)
tests/functional/test_vnc.py +2 -0
index 8c9953bdb001..d4e9dd0279ea 100755
@@ -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
Signature · 1 line
2.49.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 15 lines · Cornelia Huck

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.

---
  tests/functional/test_vnc.py | 2 ++
  1 file changed, 2 insertions(+)
tests/functional/test_vnc.py +0 -0
index 8c9953bdb001..d4e9dd0279ea 100755

tests/functional/test_vnc.py def launch_guarded(self): · line 62

Quoted 8 lines
tests/functional/test_vnc.py +2 -0
@@ -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