[PATCH] [swugenerator] Fix test: exception message and parameters for PKCS11

13 views
Skip to first unread message

ing...@gmail.com

unread,
Oct 9, 2025, 4:31:19 AM (13 days ago) Oct 9
to swupdate
Fix test: exception message and parameters for PKCS11 has changed

Signed-off-by: INgo Rah <ingo...@linutronix.de>

diff --git a/tests/test_main.py b/tests/test_main.py
index 6e95308..7846a7d 100644
--- a/tests/test_main.py
+++ b/tests/test_main.py
@@ -135,10 +135,9 @@ INVALID_SIGNING_TEST_PARAMETERS = [
         "CMS requires private key, certificate, an optional password file and an optional file with additional certificates",
     ),
     ("RSA,foo,bar,baz", "RSA requires private key and an optional password file"),
-    ("PKCS11", "PKCS11 requires URI"),
-    ("PKCS11,", "PKCS11 requires URI"),
-    ("PKCS11,,", "PKCS11 requires URI"),
-    ("PKCS11,foo,", "PKCS11 requires URI"),
+    ("PKCS11", "PKCS11 requires pin and optional parameters such as module path, slot or id"),
+    ("PKCS11,", "PKCS11 requires pin and optional parameters such as module path, slot or id"),
+    ("PKCS11,,", "PKCS11 requires pin and optional parameters such as module path, slot or id"),
     ("CUSTOM", "CUSTOM requires custom command"),
     ("CUSTOM,", "CUSTOM requires custom command"),
     ("CUSTOM,,", "CUSTOM requires custom command"),

Stefano Babic

unread,
Oct 9, 2025, 4:46:35 AM (13 days ago) Oct 9
to ing...@gmail.com, swupdate
Reviewed-by: Stefano Babic <stefan...@swupdate.org>

Best regards,
Stefano

ing...@gmail.com

unread,
Oct 9, 2025, 7:00:19 AM (13 days ago) Oct 9
to swupdate
There is another issue: seems that the files tests/test_data/integration_output/output.swu.enc and tests/test_data/integration_output/signed_output.swu.enc
do have a size mismatch from the start when the tests were added (f41db7d) leading to fails in two from four tests in the test_integration.py
Am I correct here or should they pass?

Thanx in advance,
INgo

Reply all
Reply to author
Forward
0 new messages