diff mbox series

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

Message ID 861f1457-91e3-4bb7-bcca-94f9f166b341n@googlegroups.com
State Changes Requested
Delegated to: Stefano Babic
Headers show
Series [swugenerator] Fix test: exception message and parameters for PKCS11 | expand

Commit Message

ing...@gmail.com Oct. 9, 2025, 8:31 a.m. UTC
Fix test: exception message and parameters for PKCS11 has changed

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

+    ("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"),

Comments

Stefano Babic Oct. 9, 2025, 8:46 a.m. UTC | #1
On 10/9/25 10:31, ing...@gmail.com wrote:
> Fix test: exception message and parameters for PKCS11 has changed
> 
> Signed-off-by: INgo Rah <ingo.rah@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"),
> 

Reviewed-by: Stefano Babic <stefano.babic@swupdate.org>

Best regards,
Stefano
ing...@gmail.com Oct. 9, 2025, 11 a.m. UTC | #2
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

On Thursday, October 9, 2025 at 10:46:35 AM UTC+2 Stefano Babic wrote:

> On 10/9/25 10:31, ing...@gmail.com wrote:
> > 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"),
> > 
>
> Reviewed-by: Stefano Babic <stefan...@swupdate.org>
>
> Best regards,
> Stefano
>
diff mbox series

Patch

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"),