espressif / esptool

Espressif SoC serial bootloader utility
https://docs.espressif.com/projects/esptool
GNU General Public License v2.0
5.58k stars 1.38k forks source link

4.5: pytest is failing in few units (ESPTOOL-616) #838

Closed kloczek closed 1 year ago

kloczek commented 1 year ago

Operating System

Linux/x86_64

Esptool Version

4.5

Python Version

3.8.16

Full Esptool Command Line that Was Run

N/A

Esptool Output

N/A

What is the Expected Behaviour?

I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.

Looks like few unit wich are not using /dev/ttyUSB0 are failing.

More Information

Here is pytest output:

```console + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/esptool-4.5-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/esptool-4.5-2.fc35.x86_64/usr/lib/python3.8/site-packages + /usr/bin/pytest -ra -m 'not network' --deselect test/test_esptool.py::TestAutoDetect::test_auto_detect --deselect test/test_esptool.py::TestBootloaderHeaderRewriteCases::test_flash_header_no_magic_no_rewrite --deselect test/test_esptool.py::TestBootloaderHeaderRewriteCases::test_flash_header_rewrite --deselect test/test_esptool.py::TestErase::test_chip_erase --deselect test/test_esptool.py::TestErase::test_large_region_erase --deselect test/test_esptool.py::TestErase::test_region_erase --deselect test/test_esptool.py::TestFlashDetection::test_flash_id --deselect test/test_esptool.py::TestFlashDetection::test_flash_id_expand_args --deselect test/test_esptool.py::TestFlashDetection::test_flash_id_trace --deselect test/test_esptool.py::TestFlashEncryption::test_blank_efuse_encrypt_write_abort --deselect test/test_esptool.py::TestFlashEncryption::test_blank_efuse_encrypt_write_continue1 --deselect test/test_esptool.py::TestFlashEncryption::test_blank_efuse_encrypt_write_continue2 --deselect test/test_esptool.py::TestFlashSizes::test_flash_size_keep --deselect test/test_esptool.py::TestFlashSizes::test_high_offset --deselect test/test_esptool.py::TestFlashSizes::test_high_offset_no_compression --deselect test/test_esptool.py::TestFlashSizes::test_large_image --deselect test/test_esptool.py::TestFlashSizes::test_large_no_compression --deselect test/test_esptool.py::TestFlashSizes::test_write_no_compression_past_end_fails --deselect test/test_esptool.py::TestFlashSizes::test_write_past_end_fails --deselect test/test_esptool.py::TestFlashing::test_adjacent_flash --deselect test/test_esptool.py::TestFlashing::test_adjacent_independent_flash --deselect test/test_esptool.py::TestFlashing::test_compressed_nostub_flash --deselect test/test_esptool.py::TestFlashing::test_compressible_file --deselect test/test_esptool.py::TestFlashing::test_compressible_non_trivial_file --deselect test/test_esptool.py::TestFlashing::test_correct_offset --deselect test/test_esptool.py::TestFlashing::test_erase_before_write --deselect test/test_esptool.py::TestFlashing::test_erase_range_messages --deselect test/test_esptool.py::TestFlashing::test_highspeed_flash --deselect test/test_esptool.py::TestFlashing::test_length_not_aligned_4bytes --deselect test/test_esptool.py::TestFlashing::test_length_not_aligned_4bytes_no_compression --deselect test/test_esptool.py::TestFlashing::test_no_compression_flash --deselect test/test_esptool.py::TestFlashing::test_partition_table_then_bootloader --deselect test/test_esptool.py::TestFlashing::test_partition_table_then_bootloader_no_compression --deselect test/test_esptool.py::TestFlashing::test_partition_table_then_bootloader_nostub --deselect test/test_esptool.py::TestFlashing::test_short_flash --deselect test/test_esptool.py::TestFlashing::test_single_byte --deselect test/test_esptool.py::TestFlashing::test_write_image_for_another_target --deselect test/test_esptool.py::TestFlashing::test_write_no_overlap --deselect test/test_esptool.py::TestFlashing::test_zero_length --deselect test/test_esptool.py::TestKeepImageSettings::test_detect_size_changes_size --deselect test/test_esptool.py::TestKeepImageSettings::test_explicit_set_size_freq_mode --deselect test/test_esptool.py::TestKeepImageSettings::test_keep_does_not_change_settings --deselect test/test_esptool.py::TestLoadRAM::test_load_ram --deselect test/test_esptool.py::TestMemoryOperations::test_memory_dump --deselect test/test_esptool.py::TestMemoryOperations::test_memory_read --deselect test/test_esptool.py::TestMemoryOperations::test_memory_write --deselect test/test_esptool.py::TestReadIdentityValues::test_read_mac --deselect test/test_esptool.py::TestReadWriteMemory::test_read_chip_description --deselect test/test_esptool.py::TestReadWriteMemory::test_read_write_flash_status --deselect test/test_esptool.py::TestReadWriteMemory::test_read_write_memory_rom --deselect test/test_esptool.py::TestReadWriteMemory::test_read_write_memory_stub --deselect test/test_esptool.py::TestSectorBoundaries::test_end_sector --deselect test/test_esptool.py::TestSectorBoundaries::test_end_sector_uncompressed --deselect test/test_esptool.py::TestSectorBoundaries::test_overlap --deselect test/test_esptool.py::TestStubReuse::test_stub_reuse_with_synchronization --deselect test/test_esptool.py::TestVerifyCommand::test_verify_failure --deselect test/test_esptool.py::TestVerifyCommand::test_verify_success --deselect test/test_esptool.py::TestVerifyCommand::test_verify_unaligned_length --deselect test/test_esptool.py::TestVirtualPort::test_auto_detect --deselect test/test_esptool.py::TestVirtualPort::test_auto_detect_virtual_port --deselect test/test_esptool.py::TestVirtualPort::test_highspeed_flash_virtual_port ==================================================================================== test session starts ==================================================================================== platform linux -- Python 3.8.16, pytest-7.2.1, pluggy-1.0.0 rootdir: /home/tkloczko/rpmbuild/BUILD/esptool-4.5 collected 217 items / 61 deselected / 156 selected test/test_espefuse.py .......................ssssssssssss......sss.sss..ss..ss.....ssssss.ss........ss.. [ 52%] test/test_espsecure.py .......F...F.FF.F......... [ 69%] test/test_espsecure_hsm.py FF [ 70%] test/test_esptool.py ss...sss.ssss..F [ 80%] test/test_image_info.py ....... [ 85%] test/test_imagegen.py .............. [ 94%] test/test_merge_bin.py ........ [ 99%] test/test_modules.py . [100%] ========================================================================================= FAILURES ========================================================================================== _______________________________________________________________________________ TestSigning.test_sign_v2_data _______________________________________________________________________________ self = def test_sign_v2_data(self): signing_keys = [ "rsa_secure_boot_signing_key.pem", "ecdsa192_secure_boot_signing_key.pem", "ecdsa_secure_boot_signing_key.pem", ] for key in signing_keys: with tempfile.NamedTemporaryFile() as output_file: args = self.SignArgs( "2", [self._open(key)], output_file.name, False, False, None, None, None, self._open("bootloader_unsigned_v2.bin"), ) > espsecure.sign_data(args) test/test_espsecure.py:222: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/esptool-4.5-2.fc35.x86_64/usr/lib/python3.8/site-packages/espsecure/__init__.py:331: in sign_data return sign_secure_boot_v2(args) ../../BUILDROOT/esptool-4.5-2.fc35.x86_64/usr/lib/python3.8/site-packages/espsecure/__init__.py:490: in sign_secure_boot_v2 signature_block = generate_signature_block_using_private_key( ../../BUILDROOT/esptool-4.5-2.fc35.x86_64/usr/lib/python3.8/site-packages/espsecure/__init__.py:604: in generate_signature_block_using_private_key private_key = _load_sbv2_signing_key(keyfile.read()) ../../BUILDROOT/esptool-4.5-2.fc35.x86_64/usr/lib/python3.8/site-packages/espsecure/__init__.py:231: in _load_sbv2_signing_key sk = serialization.load_pem_private_key( /usr/lib64/python3.8/site-packages/cryptography/hazmat/primitives/serialization/base.py:22: in load_pem_private_key return ossl.load_pem_private_key(data, password) /usr/lib64/python3.8/site-packages/cryptography/hazmat/backends/openssl/backend.py:921: in load_pem_private_key return self._load_key( /usr/lib64/python3.8/site-packages/cryptography/hazmat/backends/openssl/backend.py:1189: in _load_key self._handle_key_loading_error() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _handle_key_loading_error(self) -> typing.NoReturn: errors = self._consume_errors() if not errors: raise ValueError( "Could not deserialize key data. The data may be in an " "incorrect format or it may be encrypted with an unsupported " "algorithm." ) elif ( errors[0]._lib_reason_match( self._lib.ERR_LIB_EVP, self._lib.EVP_R_BAD_DECRYPT ) or errors[0]._lib_reason_match( self._lib.ERR_LIB_PKCS12, self._lib.PKCS12_R_PKCS12_CIPHERFINAL_ERROR, ) or ( self._lib.Cryptography_HAS_PROVIDERS and errors[0]._lib_reason_match( self._lib.ERR_LIB_PROV, self._lib.PROV_R_BAD_DECRYPT, ) ) ): raise ValueError("Bad decrypt. Incorrect password?") elif any( error._lib_reason_match( self._lib.ERR_LIB_EVP, self._lib.EVP_R_UNSUPPORTED_PRIVATE_KEY_ALGORITHM, ) for error in errors ): raise ValueError("Unsupported public key algorithm.") else: errors_with_text = binding._errors_with_text(errors) > raise ValueError( "Could not deserialize key data. The data may be in an " "incorrect format, it may be encrypted with an unsupported " "algorithm, or it may be an unsupported key type (e.g. EC " "curves with explicit parameters).", errors_with_text, ) E ValueError: ('Could not deserialize key data. The data may be in an incorrect format, it may be encrypted with an unsupported algorithm, or it may be an unsupported key type (e.g. EC curves with explicit parameters).', [_OpenSSLErrorWithText(code=503841036, lib=60, reason=524556, reason_text=b'error:1E08010C:DECODER routines::unsupported'), _OpenSSLErrorWithText(code=134217857, lib=16, reason=129, reason_text=b'error:08000081:elliptic curve routines::unknown group'), _OpenSSLErrorWithText(code=134217847, lib=16, reason=119, reason_text=b'error:08000077:elliptic curve routines::ec group new by name failure'), _OpenSSLErrorWithText(code=134742032, lib=16, reason=524304, reason_text=b'error:08080010:elliptic curve routines::EC lib'), _OpenSSLErrorWithText(code=109052072, lib=13, reason=168, reason_text=b'error:068000A8:asn1 encoding routines::wrong tag'), _OpenSSLErrorWithText(code=109576458, lib=13, reason=524554, reason_text=b'error:0688010A:asn1 encoding routines::nested asn1 error'), _OpenSSLErrorWithText(code=109576458, lib=13, reason=524554, reason_text=b'error:0688010A:asn1 encoding routines::nested asn1 error')]) /usr/lib64/python3.8/site-packages/cryptography/hazmat/backends/openssl/backend.py:1248: ValueError ----------------------------------------------------------------------------------- Captured stdout call ------------------------------------------------------------------------------------ 1 signing key(s) found. Signed 32768 bytes of data from /home/tkloczko/rpmbuild/BUILD/esptool-4.5/test/secure_images/bootloader_unsigned_v2.bin. Signature sector now has 1 signature blocks. Signature block 0 is valid (RSA). Signature block 0 verification successful using the supplied key (RSA). Signature block 1 invalid. Skipping. Signature block 2 invalid. Skipping. 1 signing key(s) found. __________________________________________________________________ TestSigning.test_sign_v2_with_pre_calculated_signature ___________________________________________________________________ self = def test_sign_v2_with_pre_calculated_signature(self): # Sign using pre-calculated signature + Verify signing_keys = [ "rsa_secure_boot_signing_pubkey.pem", "ecdsa192_secure_boot_signing_pubkey.pem", "ecdsa_secure_boot_signing_pubkey.pem", ] pre_calculated_signatures = [ "pre_calculated_bootloader_signature_rsa.bin", "pre_calculated_bootloader_signature_ecdsa192.bin", "pre_calculated_bootloader_signature_ecdsa256.bin", ] for pub_key, signature in zip(signing_keys, pre_calculated_signatures): with tempfile.NamedTemporaryFile() as output_file: args = self.SignArgs( "2", None, output_file.name, False, False, None, [self._open(pub_key)], [self._open(signature)], self._open("bootloader_unsigned_v2.bin"), ) > espsecure.sign_data(args) test/test_espsecure.py:408: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/esptool-4.5-2.fc35.x86_64/usr/lib/python3.8/site-packages/espsecure/__init__.py:331: in sign_data return sign_secure_boot_v2(args) ../../BUILDROOT/esptool-4.5-2.fc35.x86_64/usr/lib/python3.8/site-packages/espsecure/__init__.py:485: in sign_secure_boot_v2 signature_block = generate_signature_block_using_pre_calculated_signature( ../../BUILDROOT/esptool-4.5-2.fc35.x86_64/usr/lib/python3.8/site-packages/espsecure/__init__.py:546: in generate_signature_block_using_pre_calculated_signature public_key = _get_sbv2_pub_key(pk) ../../BUILDROOT/esptool-4.5-2.fc35.x86_64/usr/lib/python3.8/site-packages/espsecure/__init__.py:288: in _get_sbv2_pub_key vk = _load_sbv2_pub_key(key_data) ../../BUILDROOT/esptool-4.5-2.fc35.x86_64/usr/lib/python3.8/site-packages/espsecure/__init__.py:258: in _load_sbv2_pub_key vk = serialization.load_pem_public_key(keydata, backend=default_backend()) /usr/lib64/python3.8/site-packages/cryptography/hazmat/primitives/serialization/base.py:30: in load_pem_public_key return ossl.load_pem_public_key(data) /usr/lib64/python3.8/site-packages/cryptography/hazmat/backends/openssl/backend.py:968: in load_pem_public_key self._handle_key_loading_error() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _handle_key_loading_error(self) -> typing.NoReturn: errors = self._consume_errors() if not errors: raise ValueError( "Could not deserialize key data. The data may be in an " "incorrect format or it may be encrypted with an unsupported " "algorithm." ) elif ( errors[0]._lib_reason_match( self._lib.ERR_LIB_EVP, self._lib.EVP_R_BAD_DECRYPT ) or errors[0]._lib_reason_match( self._lib.ERR_LIB_PKCS12, self._lib.PKCS12_R_PKCS12_CIPHERFINAL_ERROR, ) or ( self._lib.Cryptography_HAS_PROVIDERS and errors[0]._lib_reason_match( self._lib.ERR_LIB_PROV, self._lib.PROV_R_BAD_DECRYPT, ) ) ): raise ValueError("Bad decrypt. Incorrect password?") elif any( error._lib_reason_match( self._lib.ERR_LIB_EVP, self._lib.EVP_R_UNSUPPORTED_PRIVATE_KEY_ALGORITHM, ) for error in errors ): raise ValueError("Unsupported public key algorithm.") else: errors_with_text = binding._errors_with_text(errors) > raise ValueError( "Could not deserialize key data. The data may be in an " "incorrect format, it may be encrypted with an unsupported " "algorithm, or it may be an unsupported key type (e.g. EC " "curves with explicit parameters).", errors_with_text, ) E ValueError: ('Could not deserialize key data. The data may be in an incorrect format, it may be encrypted with an unsupported algorithm, or it may be an unsupported key type (e.g. EC curves with explicit parameters).', [_OpenSSLErrorWithText(code=75497580, lib=9, reason=108, reason_text=b'error:0480006C:PEM routines::no start line')]) /usr/lib64/python3.8/site-packages/cryptography/hazmat/backends/openssl/backend.py:1248: ValueError ----------------------------------------------------------------------------------- Captured stdout call ------------------------------------------------------------------------------------ Pre-calculated signatures found 1 signing key(s) found. Signed 32768 bytes of data from /home/tkloczko/rpmbuild/BUILD/esptool-4.5/test/secure_images/bootloader_unsigned_v2.bin. Signature sector now has 1 signature blocks. Signature block 0 is valid (RSA). Signature block 0 verification successful using the supplied key (RSA). Signature block 1 invalid. Skipping. Signature block 2 invalid. Skipping. Pre-calculated signatures found 1 signing key(s) found. _______________________________________________________________________ TestSigning.test_verify_signature_signing_key _______________________________________________________________________ self = def test_verify_signature_signing_key(self): # correct key v1 args = self.VerifyArgs( "1", False, None, self._open("ecdsa_secure_boot_signing_key.pem"), self._open("bootloader_signed.bin"), ) espsecure.verify_signature(args) # correct key v2 args = self.VerifyArgs( "2", False, None, self._open("rsa_secure_boot_signing_key.pem"), self._open("bootloader_signed_v2.bin"), ) espsecure.verify_signature(args) # correct key v2 (ecdsa256) args = self.VerifyArgs( "2", False, None, self._open("ecdsa_secure_boot_signing_key.pem"), self._open("bootloader_signed_v2_ecdsa256.bin"), ) espsecure.verify_signature(args) # correct key v2 (ecdsa192) args = self.VerifyArgs( "2", False, None, self._open("ecdsa192_secure_boot_signing_key.pem"), self._open("bootloader_signed_v2_ecdsa192.bin"), ) > espsecure.verify_signature(args) test/test_espsecure.py:485: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/esptool-4.5-2.fc35.x86_64/usr/lib/python3.8/site-packages/espsecure/__init__.py:701: in verify_signature return verify_signature_v2(args) ../../BUILDROOT/esptool-4.5-2.fc35.x86_64/usr/lib/python3.8/site-packages/espsecure/__init__.py:787: in verify_signature_v2 vk = _get_sbv2_pub_key(keyfile) ../../BUILDROOT/esptool-4.5-2.fc35.x86_64/usr/lib/python3.8/site-packages/espsecure/__init__.py:286: in _get_sbv2_pub_key return _load_sbv2_signing_key(key_data).public_key() ../../BUILDROOT/esptool-4.5-2.fc35.x86_64/usr/lib/python3.8/site-packages/espsecure/__init__.py:231: in _load_sbv2_signing_key sk = serialization.load_pem_private_key( /usr/lib64/python3.8/site-packages/cryptography/hazmat/primitives/serialization/base.py:22: in load_pem_private_key return ossl.load_pem_private_key(data, password) /usr/lib64/python3.8/site-packages/cryptography/hazmat/backends/openssl/backend.py:921: in load_pem_private_key return self._load_key( /usr/lib64/python3.8/site-packages/cryptography/hazmat/backends/openssl/backend.py:1189: in _load_key self._handle_key_loading_error() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _handle_key_loading_error(self) -> typing.NoReturn: errors = self._consume_errors() if not errors: raise ValueError( "Could not deserialize key data. The data may be in an " "incorrect format or it may be encrypted with an unsupported " "algorithm." ) elif ( errors[0]._lib_reason_match( self._lib.ERR_LIB_EVP, self._lib.EVP_R_BAD_DECRYPT ) or errors[0]._lib_reason_match( self._lib.ERR_LIB_PKCS12, self._lib.PKCS12_R_PKCS12_CIPHERFINAL_ERROR, ) or ( self._lib.Cryptography_HAS_PROVIDERS and errors[0]._lib_reason_match( self._lib.ERR_LIB_PROV, self._lib.PROV_R_BAD_DECRYPT, ) ) ): raise ValueError("Bad decrypt. Incorrect password?") elif any( error._lib_reason_match( self._lib.ERR_LIB_EVP, self._lib.EVP_R_UNSUPPORTED_PRIVATE_KEY_ALGORITHM, ) for error in errors ): raise ValueError("Unsupported public key algorithm.") else: errors_with_text = binding._errors_with_text(errors) > raise ValueError( "Could not deserialize key data. The data may be in an " "incorrect format, it may be encrypted with an unsupported " "algorithm, or it may be an unsupported key type (e.g. EC " "curves with explicit parameters).", errors_with_text, ) E ValueError: ('Could not deserialize key data. The data may be in an incorrect format, it may be encrypted with an unsupported algorithm, or it may be an unsupported key type (e.g. EC curves with explicit parameters).', [_OpenSSLErrorWithText(code=503841036, lib=60, reason=524556, reason_text=b'error:1E08010C:DECODER routines::unsupported'), _OpenSSLErrorWithText(code=134217857, lib=16, reason=129, reason_text=b'error:08000081:elliptic curve routines::unknown group'), _OpenSSLErrorWithText(code=134217847, lib=16, reason=119, reason_text=b'error:08000077:elliptic curve routines::ec group new by name failure'), _OpenSSLErrorWithText(code=134742032, lib=16, reason=524304, reason_text=b'error:08080010:elliptic curve routines::EC lib'), _OpenSSLErrorWithText(code=109052072, lib=13, reason=168, reason_text=b'error:068000A8:asn1 encoding routines::wrong tag'), _OpenSSLErrorWithText(code=109576458, lib=13, reason=524554, reason_text=b'error:0688010A:asn1 encoding routines::nested asn1 error'), _OpenSSLErrorWithText(code=109576458, lib=13, reason=524554, reason_text=b'error:0688010A:asn1 encoding routines::nested asn1 error')]) /usr/lib64/python3.8/site-packages/cryptography/hazmat/backends/openssl/backend.py:1248: ValueError ----------------------------------------------------------------------------------- Captured stdout call ------------------------------------------------------------------------------------ Verifying 21696 bytes of data Signature is valid Signature block 0 is valid (RSA). Signature block 0 verification successful using the supplied key (RSA). Signature block 1 invalid. Skipping. Signature block 2 invalid. Skipping. Signature block 0 is valid (ECDSA). Signature block 0 verification successful using the supplied key (ECDSA). _______________________________________________________________________ TestSigning.test_verify_signature_public_key ________________________________________________________________________ self = def test_verify_signature_public_key(self): # correct key v1 args = self.VerifyArgs( "1", False, None, self._open("ecdsa_secure_boot_signing_pubkey.pem"), self._open("bootloader_signed.bin"), ) espsecure.verify_signature(args) # correct key v2 args = self.VerifyArgs( "2", False, None, self._open("rsa_secure_boot_signing_pubkey.pem"), self._open("bootloader_signed_v2.bin"), ) espsecure.verify_signature(args) # correct key v2 (ecdsa256) args = self.VerifyArgs( "2", False, None, self._open("ecdsa_secure_boot_signing_pubkey.pem"), self._open("bootloader_signed_v2_ecdsa256.bin"), ) espsecure.verify_signature(args) # correct key v2 (ecdsa192) args = self.VerifyArgs( "2", False, None, self._open("ecdsa192_secure_boot_signing_pubkey.pem"), self._open("bootloader_signed_v2_ecdsa192.bin"), ) > espsecure.verify_signature(args) test/test_espsecure.py:598: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/esptool-4.5-2.fc35.x86_64/usr/lib/python3.8/site-packages/espsecure/__init__.py:701: in verify_signature return verify_signature_v2(args) ../../BUILDROOT/esptool-4.5-2.fc35.x86_64/usr/lib/python3.8/site-packages/espsecure/__init__.py:787: in verify_signature_v2 vk = _get_sbv2_pub_key(keyfile) ../../BUILDROOT/esptool-4.5-2.fc35.x86_64/usr/lib/python3.8/site-packages/espsecure/__init__.py:288: in _get_sbv2_pub_key vk = _load_sbv2_pub_key(key_data) ../../BUILDROOT/esptool-4.5-2.fc35.x86_64/usr/lib/python3.8/site-packages/espsecure/__init__.py:258: in _load_sbv2_pub_key vk = serialization.load_pem_public_key(keydata, backend=default_backend()) /usr/lib64/python3.8/site-packages/cryptography/hazmat/primitives/serialization/base.py:30: in load_pem_public_key return ossl.load_pem_public_key(data) /usr/lib64/python3.8/site-packages/cryptography/hazmat/backends/openssl/backend.py:968: in load_pem_public_key self._handle_key_loading_error() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _handle_key_loading_error(self) -> typing.NoReturn: errors = self._consume_errors() if not errors: raise ValueError( "Could not deserialize key data. The data may be in an " "incorrect format or it may be encrypted with an unsupported " "algorithm." ) elif ( errors[0]._lib_reason_match( self._lib.ERR_LIB_EVP, self._lib.EVP_R_BAD_DECRYPT ) or errors[0]._lib_reason_match( self._lib.ERR_LIB_PKCS12, self._lib.PKCS12_R_PKCS12_CIPHERFINAL_ERROR, ) or ( self._lib.Cryptography_HAS_PROVIDERS and errors[0]._lib_reason_match( self._lib.ERR_LIB_PROV, self._lib.PROV_R_BAD_DECRYPT, ) ) ): raise ValueError("Bad decrypt. Incorrect password?") elif any( error._lib_reason_match( self._lib.ERR_LIB_EVP, self._lib.EVP_R_UNSUPPORTED_PRIVATE_KEY_ALGORITHM, ) for error in errors ): raise ValueError("Unsupported public key algorithm.") else: errors_with_text = binding._errors_with_text(errors) > raise ValueError( "Could not deserialize key data. The data may be in an " "incorrect format, it may be encrypted with an unsupported " "algorithm, or it may be an unsupported key type (e.g. EC " "curves with explicit parameters).", errors_with_text, ) E ValueError: ('Could not deserialize key data. The data may be in an incorrect format, it may be encrypted with an unsupported algorithm, or it may be an unsupported key type (e.g. EC curves with explicit parameters).', [_OpenSSLErrorWithText(code=75497580, lib=9, reason=108, reason_text=b'error:0480006C:PEM routines::no start line')]) /usr/lib64/python3.8/site-packages/cryptography/hazmat/backends/openssl/backend.py:1248: ValueError ----------------------------------------------------------------------------------- Captured stdout call ------------------------------------------------------------------------------------ Verifying 21696 bytes of data Signature is valid Signature block 0 is valid (RSA). Signature block 0 verification successful using the supplied key (RSA). Signature block 1 invalid. Skipping. Signature block 2 invalid. Skipping. Signature block 0 is valid (ECDSA). Signature block 0 verification successful using the supplied key (ECDSA). _______________________________________________________________________ TestSigning.test_generate_and_extract_key_v2 ________________________________________________________________________ self = def test_generate_and_extract_key_v2(self): with tempfile.TemporaryDirectory() as keydir: # keyfile cannot exist before generation -> tempfile.NamedTemporaryFile() # cannot be used for keyfile keyfile_name = os.path.join(keydir, "key.pem") # We need to manually delete the keyfile as we are iterating over # different schemes with the same keyfile so instead of using addCleanup, # we remove it using os.remove at the end of each pass for scheme in ["rsa3072", "ecdsa192", "ecdsa256"]: args = self.GenerateKeyArgs("2", scheme, keyfile_name) espsecure.generate_signing_key(args) with tempfile.NamedTemporaryFile() as pub_keyfile, open( keyfile_name, "rb" ) as keyfile: args = self.ExtractKeyArgs("2", keyfile, pub_keyfile) > espsecure.extract_public_key(args) test/test_espsecure.py:706: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/esptool-4.5-2.fc35.x86_64/usr/lib/python3.8/site-packages/espsecure/__init__.py:884: in extract_public_key sk = _load_sbv2_signing_key(args.keyfile.read()) ../../BUILDROOT/esptool-4.5-2.fc35.x86_64/usr/lib/python3.8/site-packages/espsecure/__init__.py:231: in _load_sbv2_signing_key sk = serialization.load_pem_private_key( /usr/lib64/python3.8/site-packages/cryptography/hazmat/primitives/serialization/base.py:22: in load_pem_private_key return ossl.load_pem_private_key(data, password) /usr/lib64/python3.8/site-packages/cryptography/hazmat/backends/openssl/backend.py:921: in load_pem_private_key return self._load_key( /usr/lib64/python3.8/site-packages/cryptography/hazmat/backends/openssl/backend.py:1189: in _load_key self._handle_key_loading_error() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _handle_key_loading_error(self) -> typing.NoReturn: errors = self._consume_errors() if not errors: raise ValueError( "Could not deserialize key data. The data may be in an " "incorrect format or it may be encrypted with an unsupported " "algorithm." ) elif ( errors[0]._lib_reason_match( self._lib.ERR_LIB_EVP, self._lib.EVP_R_BAD_DECRYPT ) or errors[0]._lib_reason_match( self._lib.ERR_LIB_PKCS12, self._lib.PKCS12_R_PKCS12_CIPHERFINAL_ERROR, ) or ( self._lib.Cryptography_HAS_PROVIDERS and errors[0]._lib_reason_match( self._lib.ERR_LIB_PROV, self._lib.PROV_R_BAD_DECRYPT, ) ) ): raise ValueError("Bad decrypt. Incorrect password?") elif any( error._lib_reason_match( self._lib.ERR_LIB_EVP, self._lib.EVP_R_UNSUPPORTED_PRIVATE_KEY_ALGORITHM, ) for error in errors ): raise ValueError("Unsupported public key algorithm.") else: errors_with_text = binding._errors_with_text(errors) > raise ValueError( "Could not deserialize key data. The data may be in an " "incorrect format, it may be encrypted with an unsupported " "algorithm, or it may be an unsupported key type (e.g. EC " "curves with explicit parameters).", errors_with_text, ) E ValueError: ('Could not deserialize key data. The data may be in an incorrect format, it may be encrypted with an unsupported algorithm, or it may be an unsupported key type (e.g. EC curves with explicit parameters).', [_OpenSSLErrorWithText(code=503841036, lib=60, reason=524556, reason_text=b'error:1E08010C:DECODER routines::unsupported'), _OpenSSLErrorWithText(code=134217857, lib=16, reason=129, reason_text=b'error:08000081:elliptic curve routines::unknown group'), _OpenSSLErrorWithText(code=134217847, lib=16, reason=119, reason_text=b'error:08000077:elliptic curve routines::ec group new by name failure'), _OpenSSLErrorWithText(code=134742032, lib=16, reason=524304, reason_text=b'error:08080010:elliptic curve routines::EC lib'), _OpenSSLErrorWithText(code=109052072, lib=13, reason=168, reason_text=b'error:068000A8:asn1 encoding routines::wrong tag'), _OpenSSLErrorWithText(code=109576458, lib=13, reason=524554, reason_text=b'error:0688010A:asn1 encoding routines::nested asn1 error'), _OpenSSLErrorWithText(code=109576458, lib=13, reason=524554, reason_text=b'error:0688010A:asn1 encoding routines::nested asn1 error')]) /usr/lib64/python3.8/site-packages/cryptography/hazmat/backends/openssl/backend.py:1248: ValueError ----------------------------------------------------------------------------------- Captured stdout call ------------------------------------------------------------------------------------ RSA 3072 private key in PEM format written to /tmp/tmp67fvg1eu/key.pem /tmp/tmp67fvg1eu/key.pem public key extracted to /tmp/tmpxdwsqlxi ECDSA NIST192p private key in PEM format written to /tmp/tmp67fvg1eu/key.pem _______________________________________________________________________________ TestSigning.test_sign_v2_hsm ________________________________________________________________________________ self = def test_sign_v2_hsm(self): # Sign using SoftHSMv2 + Verify > self.softhsm_setup_token("softhsm_v2.ini", "softhsm-test-token") test/test_espsecure_hsm.py:151: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , filename = 'softhsm_v2.ini', token_label = 'softhsm-test-token' def softhsm_setup_token(self, filename, token_label): self.pkcs11_lib = self.get_pkcs11lib() if self.pkcs11_lib is None: print("PKCS11 lib does not exist") > sys.exit(-1) E SystemExit: -1 test/test_espsecure_hsm.py:68: SystemExit ----------------------------------------------------------------------------------- Captured stdout call ------------------------------------------------------------------------------------ PKCS11 lib does not exist _______________________________________________________________ TestSigning.test_sign_v2_hsm_append_signatures_multiple_steps _______________________________________________________________ self = def test_sign_v2_hsm_append_signatures_multiple_steps(self): # Append signatures using HSM + Verify with an appended key > self.softhsm_setup_token("softhsm_v2_1.ini", "softhsm-test-token-1") test/test_espsecure_hsm.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , filename = 'softhsm_v2_1.ini', token_label = 'softhsm-test-token-1' def softhsm_setup_token(self, filename, token_label): self.pkcs11_lib = self.get_pkcs11lib() if self.pkcs11_lib is None: print("PKCS11 lib does not exist") > sys.exit(-1) E SystemExit: -1 test/test_espsecure_hsm.py:68: SystemExit ----------------------------------------------------------------------------------- Captured stdout call ------------------------------------------------------------------------------------ PKCS11 lib does not exist _________________________________________________________________________ TestConfigFile.test_custom_reset_sequence _________________________________________________________________________ self = def test_custom_reset_sequence(self): # This reset sequence will fail to reset the chip to bootloader, # the flash_id operation should therefore fail. # Also tests the number of connection attempts. reset_seq_config = ( "[esptool]\n" "custom_reset_sequence = D0|W0.1|R1|R0|W0.1|R1|R0\n" "connect_attempts = 1\n" ) config_file_path = os.path.join(os.getcwd(), "esptool.cfg") with self.ConfigFile(config_file_path, reset_seq_config): output = self.run_esptool_error("flash_id") assert f"Loaded custom configuration from {config_file_path}" in output > assert "A fatal error occurred: Failed to connect to" in output E assert 'A fatal error occurred: Failed to connect to' in "esptool.py v4.5\nLoaded custom configuration from /home/tkloczko/rpmbuild/BUILD/esptool-4.5/test/esptool.cfg\nSerial port /dev/ttyUSB0\n\nA fatal error occurred: Could not open /dev/ttyUSB0, the port doesn't exist\n" /home/tkloczko/rpmbuild/BUILD/esptool-4.5/test/test_esptool.py:1204: AssertionError ----------------------------------------------------------------------------------- Captured stdout call ------------------------------------------------------------------------------------ Running the "flash_id" command... Executing /usr/bin/python3 -m esptool --chip esp32 --port /dev/ttyUSB0 --baud 115200 flash_id... esptool.py v4.5 Loaded custom configuration from /home/tkloczko/rpmbuild/BUILD/esptool-4.5/test/esptool.cfg Serial port /dev/ttyUSB0 A fatal error occurred: Could not open /dev/ttyUSB0, the port doesn't exist ===================================================================================== warnings summary ====================================================================================== test/test_esptool.py:123 /home/tkloczko/rpmbuild/BUILD/esptool-4.5/test/test_esptool.py:123: PytestUnknownMarkWarning: Unknown pytest.mark.flaky - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html @pytest.mark.flaky(reruns=1, condition=arg_preload_port is not False) test/test_esptool.py:982 /home/tkloczko/rpmbuild/BUILD/esptool-4.5/test/test_esptool.py:982: PytestUnknownMarkWarning: Unknown pytest.mark.flaky - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html @pytest.mark.flaky(reruns=5) -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html ================================================================================== short test summary info ================================================================================== SKIPPED [1] test/test_espefuse.py:506: Not necessary fo all chips SKIPPED [1] test/test_espefuse.py:509: Not necessary fo all chips SKIPPED [1] test/test_espefuse.py:518: Not necessary fo all chips SKIPPED [1] test/test_espefuse.py:527: Not necessary fo all chips SKIPPED [1] test/test_espefuse.py:532: Not necessary fo all chips SKIPPED [1] test/test_espefuse.py:541: Not necessary fo all chips SKIPPED [1] test/test_espefuse.py:549: Not necessary fo all chips SKIPPED [1] test/test_espefuse.py:552: Not necessary fo all chips SKIPPED [1] test/test_espefuse.py:561: Not necessary fo all chips SKIPPED [1] test/test_espefuse.py:569: Not necessary fo all chips SKIPPED [1] test/test_espefuse.py:578: Not necessary fo all chips SKIPPED [1] test/test_espefuse.py:587: Not necessary fo all chips SKIPPED [1] test/test_espefuse.py:797: ESP32-C2-only SKIPPED [1] test/test_espefuse.py:817: ESP32-C2-only SKIPPED [1] test/test_espefuse.py:845: Only chips with 6 keys SKIPPED [1] test/test_espefuse.py:930: 512 bit keys are only supported on ESP32-S2 and S3 SKIPPED [1] test/test_espefuse.py:948: 512 bit keys are only supported on ESP32-S2 and S3 SKIPPED [1] test/test_espefuse.py:988: 512 bit keys are only supported on ESP32-S2 and S3 SKIPPED [1] test/test_espefuse.py:1058: ESP32-C2-only SKIPPED [1] test/test_espefuse.py:1075: Only chip with 6 keys SKIPPED [1] test/test_espefuse.py:1186: ESP32-C2-only SKIPPED [1] test/test_espefuse.py:1209: Only chips with 6 keys SKIPPED [1] test/test_espefuse.py:1346: ESP32-C2-only, supports 1 key block SKIPPED [1] test/test_espefuse.py:1358: ESP32-C2-only, supports 1 key block SKIPPED [1] test/test_espefuse.py:1370: ESP32-C2-only, supports 1 key block SKIPPED [1] test/test_espefuse.py:1382: ESP32-C2-only, supports 1 key block SKIPPED [1] test/test_espefuse.py:1410: Supports 6 key blocks SKIPPED [1] test/test_espefuse.py:1442: Supports 6 key blocks SKIPPED [1] test/test_espefuse.py:1488: ESP32-C2-only SKIPPED [1] test/test_espefuse.py:1507: Only chip with 6 keys SKIPPED [1] test/test_espefuse.py:1728: For this chip, FE and SB keys go into one BLOCK SKIPPED [1] test/test_espefuse.py:1744: For this chip, FE and SB keys go into one BLOCK SKIPPED [1] test/test_esptool.py:394: needs 32MB flash SKIPPED [1] test/test_esptool.py:408: needs 32MB flash SKIPPED [1] test/test_esptool.py:551: This check happens only on a valid image SKIPPED [1] test/test_esptool.py:565: This check happens only on a valid image SKIPPED [1] test/test_esptool.py:590: get_security_info command is supported on ESP32S2 and later SKIPPED [1] test/test_esptool.py:702: ESP8266 only SKIPPED [1] test/test_esptool.py:787: ESP8266 only SKIPPED [1] test/test_esptool.py:910: ESP8266 only SKIPPED [1] test/test_esptool.py:1090: Make image option is supported only on ESP8266 FAILED test/test_espsecure.py::TestSigning::test_sign_v2_data - ValueError: ('Could not deserialize key data. The data may be in an incorrect format, it may be encrypted with an unsupported algorithm, or it may be an unsupported key type (e.g. EC c... FAILED test/test_espsecure.py::TestSigning::test_sign_v2_with_pre_calculated_signature - ValueError: ('Could not deserialize key data. The data may be in an incorrect format, it may be encrypted with an unsupported algorithm, or it may be an unsupported key type (e.g. EC c... FAILED test/test_espsecure.py::TestSigning::test_verify_signature_signing_key - ValueError: ('Could not deserialize key data. The data may be in an incorrect format, it may be encrypted with an unsupported algorithm, or it may be an unsupported key type (e.g. EC c... FAILED test/test_espsecure.py::TestSigning::test_verify_signature_public_key - ValueError: ('Could not deserialize key data. The data may be in an incorrect format, it may be encrypted with an unsupported algorithm, or it may be an unsupported key type (e.g. EC c... FAILED test/test_espsecure.py::TestSigning::test_generate_and_extract_key_v2 - ValueError: ('Could not deserialize key data. The data may be in an incorrect format, it may be encrypted with an unsupported algorithm, or it may be an unsupported key type (e.g. EC c... FAILED test/test_espsecure_hsm.py::TestSigning::test_sign_v2_hsm - SystemExit: -1 FAILED test/test_espsecure_hsm.py::TestSigning::test_sign_v2_hsm_append_signatures_multiple_steps - SystemExit: -1 FAILED test/test_esptool.py::TestConfigFile::test_custom_reset_sequence - assert 'A fatal error occurred: Failed to connect to' in "esptool.py v4.5\nLoaded custom configuration from /home/tkloczko/rpmbuild/BUILD/esptool-4.5/test/esptool.cfg\nSerial port /dev... ====================================================== 8 failed, 107 passed, 41 skipped, 61 deselected, 2 warnings in 95.33s (0:01:35) ======================================================```

Here is list of installed modules in build env

```console Package Version ------------------ -------------- appdirs 1.4.4 asn1crypto 1.5.1 attrs 22.2.0 bitstring 4.0.1 build 0.9.0 cached-property 1.5.2 cffi 1.15.1 cryptography 38.0.4 cssselect 1.1.0 distro 1.8.0 ecdsa 0.18.0 exceptiongroup 1.0.0 extras 1.0.0 fixtures 4.0.0 gpg 1.18.0-unknown importlib-metadata 6.0.0 iniconfig 2.0.0 Jinja2 3.1.2 libcomps 0.1.19 lxml 4.9.2 Markdown 3.4.1 MarkupSafe 2.1.2 numpy 1.24.2 olefile 0.46 packaging 23.0 pbr 5.9.0 pep517 0.13.0 Pillow 9.4.0 pip 22.3.1 pluggy 1.0.0 ply 3.11 pycparser 2.21 pyelftools 0.28 Pygments 2.14.0 PyGObject 3.43.1.dev0 pyserial 3.5 pytest 7.2.1 python-dateutil 2.8.2 python-pkcs11 0.7.0 reedsolo 1.6.1 rpm 4.17.0 scour 0.38.2 setuptools 65.6.3 six 1.16.0 smartypants 2.0.1 testtools 2.5.0 toml 0.10.2 tomli 2.0.1 typogrify 2.0.7 wheel 0.38.4 zipp 3.13.0 ```

Other Steps to Reproduce

N/A

radimkarnis commented 1 year ago

Hello @kloczek, with every release of esptool you open the same issue ticket and I tell you the same thing - test_esptool.py is meant to run on real hardware. You need to add it to the ignore list. Possibly you can just deselect the TestConfigFile::test_custom_reset_sequence test.

The new test_espsecure_hsm.py needs some additional initialization steps to run. See here. Either you can do these or also add it to the ignore list.

test_espsecure.py should work. Please make sure you have the right dependencies installed (e.g. cryptography) according to these instructions.

kloczek commented 1 year ago

Please have look one more time on what I'm reporing. As I wtote I've --deselected all units which requires actual hardware to test and not all test/test_espsecure.py units are failing.The same is with test/test_esptool.py

Other thing that in case all units which requires hardware it would be good to add pytest mark like @pytest.mark.ttyUSB0 mark to allow easily ommit those units which requires actual hardware by executing `pytest -m "not ttyUSB0"' https://docs.pytest.org/en/7.1.x/how-to/mark.html

The new test_espsecure_hsm.py needs some additional initialization steps to run. See here. Either you can do these or also add it to the ignore list.

OK. Thx 👍 Will try to adapt that to my build&testing procedure 😄

radimkarnis commented 1 year ago

As I said:

it would be good to add pytest mark like @pytest.mark.ttyUSB0 mark to allow easily ommit those units which requires actual hardware

This is a good idea. Thanks for the suggestion!

radimkarnis commented 1 year ago

Hi @kloczek, you should now be able to run the whole test suite simply as pytest -m host_test, as described here. This runs all of the tests without the need for real hardware or installation of additional prerequisites.

This will be included in the next release.

kloczek commented 1 year ago

Just tested 4.5.1 and on first lok looks like it is something wrong around use flaky Here is pytest output:

```console + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/esptool-4.5.1-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/esptool-4.5.1-2.fc35.x86_64/usr/lib/python3.8/site-packages + /usr/bin/pytest -ra -m 'not network' -m 'not host_test' ============================= test session starts ============================== platform linux -- Python 3.8.16, pytest-7.2.1, pluggy-1.0.0 rootdir: /home/tkloczko/rpmbuild/BUILD/esptool-4.5.1 plugins: flaky-3.7.0 collected 217 items / 144 deselected / 73 selected test/test_espsecure_hsm.py FF [ 2%] test/test_esptool.py EEEEEEEssEEEEEEEEEEEEEEEssEsEEEEEEEEEEEsEEEEEEEEEEs [ 72%] EEEEEEEsEEEEEEEEEEsE [100%] ==================================== ERRORS ==================================== __ ERROR at setup of TestFlashEncryption.test_blank_efuse_encrypt_write_abort __ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError _ ERROR at setup of TestFlashEncryption.test_blank_efuse_encrypt_write_continue1 _ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError _ ERROR at setup of TestFlashEncryption.test_blank_efuse_encrypt_write_continue2 _ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError _______________ ERROR at setup of TestFlashing.test_short_flash ________________ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError _____________ ERROR at setup of TestFlashing.test_highspeed_flash ______________ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError ______________ ERROR at setup of TestFlashing.test_adjacent_flash ______________ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError ________ ERROR at setup of TestFlashing.test_adjacent_independent_flash ________ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError ______________ ERROR at setup of TestFlashing.test_correct_offset ______________ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError ___________ ERROR at setup of TestFlashing.test_no_compression_flash ___________ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError _________ ERROR at setup of TestFlashing.test_compressed_nostub_flash __________ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError _____ ERROR at setup of TestFlashing.test_partition_table_then_bootloader ______ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError _ ERROR at setup of TestFlashing.test_partition_table_then_bootloader_no_compression _ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError __ ERROR at setup of TestFlashing.test_partition_table_then_bootloader_nostub __ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError ________ ERROR at setup of TestFlashing.test_length_not_aligned_4bytes _________ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError _ ERROR at setup of TestFlashing.test_length_not_aligned_4bytes_no_compression _ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError _____________ ERROR at setup of TestFlashing.test_write_no_overlap _____________ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError ____________ ERROR at setup of TestFlashing.test_compressible_file _____________ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError ______ ERROR at setup of TestFlashing.test_compressible_non_trivial_file _______ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError _______________ ERROR at setup of TestFlashing.test_zero_length ________________ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError _______________ ERROR at setup of TestFlashing.test_single_byte ________________ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError ___________ ERROR at setup of TestFlashing.test_erase_range_messages ___________ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError ______ ERROR at setup of TestFlashing.test_write_image_for_another_target ______ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError ____________ ERROR at setup of TestFlashing.test_erase_before_write ____________ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError ______________ ERROR at setup of TestFlashSizes.test_high_offset _______________ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError _______ ERROR at setup of TestFlashSizes.test_high_offset_no_compression _______ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError ______________ ERROR at setup of TestFlashSizes.test_large_image _______________ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError __________ ERROR at setup of TestFlashSizes.test_large_no_compression __________ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError __________ ERROR at setup of TestFlashSizes.test_write_past_end_fails __________ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError __ ERROR at setup of TestFlashSizes.test_write_no_compression_past_end_fails ___ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError ____________ ERROR at setup of TestFlashSizes.test_flash_size_keep _____________ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError ______________ ERROR at setup of TestFlashDetection.test_flash_id ______________ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError ________ ERROR at setup of TestFlashDetection.test_flash_id_expand_args ________ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError ___________ ERROR at setup of TestFlashDetection.test_flash_id_trace ___________ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError _____ ERROR at setup of TestStubReuse.test_stub_reuse_with_synchronization _____ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError _________________ ERROR at setup of TestErase.test_chip_erase __________________ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError ________________ ERROR at setup of TestErase.test_region_erase _________________ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError _____________ ERROR at setup of TestErase.test_large_region_erase ______________ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError ____________ ERROR at setup of TestSectorBoundaries.test_end_sector ____________ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError _____ ERROR at setup of TestSectorBoundaries.test_end_sector_uncompressed ______ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError _____________ ERROR at setup of TestSectorBoundaries.test_overlap ______________ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError ___________ ERROR at setup of TestVerifyCommand.test_verify_success ____________ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError ___________ ERROR at setup of TestVerifyCommand.test_verify_failure ____________ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError _______ ERROR at setup of TestVerifyCommand.test_verify_unaligned_length _______ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError ____________ ERROR at setup of TestReadIdentityValues.test_read_mac ____________ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError ___________ ERROR at setup of TestMemoryOperations.test_memory_dump ____________ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError ___________ ERROR at setup of TestMemoryOperations.test_memory_write ___________ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError ___________ ERROR at setup of TestMemoryOperations.test_memory_read ____________ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError __ ERROR at setup of TestKeepImageSettings.test_keep_does_not_change_settings __ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError ____ ERROR at setup of TestKeepImageSettings.test_detect_size_changes_size _____ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError ___ ERROR at setup of TestKeepImageSettings.test_explicit_set_size_freq_mode ___ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError _________________ ERROR at setup of TestLoadRAM.test_load_ram __________________ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError _ ERROR at setup of TestBootloaderHeaderRewriteCases.test_flash_header_rewrite _ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError _ ERROR at setup of TestBootloaderHeaderRewriteCases.test_flash_header_no_magic_no_rewrite _ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError ______________ ERROR at setup of TestAutoDetect.test_auto_detect _______________ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError ______________ ERROR at setup of TestVirtualPort.test_auto_detect ______________ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError _______ ERROR at setup of TestVirtualPort.test_auto_detect_virtual_port ________ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError _____ ERROR at setup of TestVirtualPort.test_highspeed_flash_virtual_port ______ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError _______ ERROR at setup of TestReadWriteMemory.test_read_write_memory_rom _______ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError ______ ERROR at setup of TestReadWriteMemory.test_read_write_memory_stub _______ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError ______ ERROR at setup of TestReadWriteMemory.test_read_write_flash_status ______ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError _______ ERROR at setup of TestReadWriteMemory.test_read_chip_description _______ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError _________ ERROR at setup of TestConfigFile.test_custom_reset_sequence __________ self = item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.8/site-packages/flaky/flaky_pytest_plugin.py:239: TypeError =================================== FAILURES =================================== _________________________ TestSigning.test_sign_v2_hsm _________________________ self = def test_sign_v2_hsm(self): # Sign using SoftHSMv2 + Verify > self.softhsm_setup_token("softhsm_v2.ini", "softhsm-test-token") test/test_espsecure_hsm.py:151: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = filename = 'softhsm_v2.ini', token_label = 'softhsm-test-token' def softhsm_setup_token(self, filename, token_label): self.pkcs11_lib = self.get_pkcs11lib() if self.pkcs11_lib is None: print("PKCS11 lib does not exist") > sys.exit(-1) E SystemExit: -1 test/test_espsecure_hsm.py:68: SystemExit ----------------------------- Captured stdout call ----------------------------- PKCS11 lib does not exist ________ TestSigning.test_sign_v2_hsm_append_signatures_multiple_steps _________ self = def test_sign_v2_hsm_append_signatures_multiple_steps(self): # Append signatures using HSM + Verify with an appended key > self.softhsm_setup_token("softhsm_v2_1.ini", "softhsm-test-token-1") test/test_espsecure_hsm.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = filename = 'softhsm_v2_1.ini', token_label = 'softhsm-test-token-1' def softhsm_setup_token(self, filename, token_label): self.pkcs11_lib = self.get_pkcs11lib() if self.pkcs11_lib is None: print("PKCS11 lib does not exist") > sys.exit(-1) E SystemExit: -1 test/test_espsecure_hsm.py:68: SystemExit ----------------------------- Captured stdout call ----------------------------- PKCS11 lib does not exist =========================== short test summary info ============================ SKIPPED [1] test/test_esptool.py:390: needs 32MB flash SKIPPED [1] test/test_esptool.py:404: needs 32MB flash SKIPPED [1] test/test_esptool.py:550: This check happens only on a valid image SKIPPED [1] test/test_esptool.py:564: This check happens only on a valid image SKIPPED [1] test/test_esptool.py:589: get_security_info command is supported on ESP32S2 and later SKIPPED [1] test/test_esptool.py:706: ESP8266 only SKIPPED [1] test/test_esptool.py:791: ESP8266 only SKIPPED [1] test/test_esptool.py:922: ESP8266 only SKIPPED [1] test/test_esptool.py:1097: Make image option is supported only on ESP8266 ERROR test/test_esptool.py::TestFlashEncryption::test_blank_efuse_encrypt_write_abort ERROR test/test_esptool.py::TestFlashEncryption::test_blank_efuse_encrypt_write_continue1 ERROR test/test_esptool.py::TestFlashEncryption::test_blank_efuse_encrypt_write_continue2 ERROR test/test_esptool.py::TestFlashing::test_short_flash - TypeError: _make... ERROR test/test_esptool.py::TestFlashing::test_highspeed_flash - TypeError: _... ERROR test/test_esptool.py::TestFlashing::test_adjacent_flash - TypeError: _m... ERROR test/test_esptool.py::TestFlashing::test_adjacent_independent_flash - T... ERROR test/test_esptool.py::TestFlashing::test_correct_offset - TypeError: _m... ERROR test/test_esptool.py::TestFlashing::test_no_compression_flash - TypeErr... ERROR test/test_esptool.py::TestFlashing::test_compressed_nostub_flash - Type... ERROR test/test_esptool.py::TestFlashing::test_partition_table_then_bootloader ERROR test/test_esptool.py::TestFlashing::test_partition_table_then_bootloader_no_compression ERROR test/test_esptool.py::TestFlashing::test_partition_table_then_bootloader_nostub ERROR test/test_esptool.py::TestFlashing::test_length_not_aligned_4bytes - Ty... ERROR test/test_esptool.py::TestFlashing::test_length_not_aligned_4bytes_no_compression ERROR test/test_esptool.py::TestFlashing::test_write_no_overlap - TypeError: ... ERROR test/test_esptool.py::TestFlashing::test_compressible_file - TypeError:... ERROR test/test_esptool.py::TestFlashing::test_compressible_non_trivial_file ERROR test/test_esptool.py::TestFlashing::test_zero_length - TypeError: _make... ERROR test/test_esptool.py::TestFlashing::test_single_byte - TypeError: _make... ERROR test/test_esptool.py::TestFlashing::test_erase_range_messages - TypeErr... ERROR test/test_esptool.py::TestFlashing::test_write_image_for_another_target ERROR test/test_esptool.py::TestFlashing::test_erase_before_write - TypeError... ERROR test/test_esptool.py::TestFlashSizes::test_high_offset - TypeError: _ma... ERROR test/test_esptool.py::TestFlashSizes::test_high_offset_no_compression ERROR test/test_esptool.py::TestFlashSizes::test_large_image - TypeError: _ma... ERROR test/test_esptool.py::TestFlashSizes::test_large_no_compression - TypeE... ERROR test/test_esptool.py::TestFlashSizes::test_write_past_end_fails - TypeE... ERROR test/test_esptool.py::TestFlashSizes::test_write_no_compression_past_end_fails ERROR test/test_esptool.py::TestFlashSizes::test_flash_size_keep - TypeError:... ERROR test/test_esptool.py::TestFlashDetection::test_flash_id - TypeError: _m... ERROR test/test_esptool.py::TestFlashDetection::test_flash_id_expand_args - T... ERROR test/test_esptool.py::TestFlashDetection::test_flash_id_trace - TypeErr... ERROR test/test_esptool.py::TestStubReuse::test_stub_reuse_with_synchronization ERROR test/test_esptool.py::TestErase::test_chip_erase - TypeError: _make_tes... ERROR test/test_esptool.py::TestErase::test_region_erase - TypeError: _make_t... ERROR test/test_esptool.py::TestErase::test_large_region_erase - TypeError: _... ERROR test/test_esptool.py::TestSectorBoundaries::test_end_sector - TypeError... ERROR test/test_esptool.py::TestSectorBoundaries::test_end_sector_uncompressed ERROR test/test_esptool.py::TestSectorBoundaries::test_overlap - TypeError: _... ERROR test/test_esptool.py::TestVerifyCommand::test_verify_success - TypeErro... ERROR test/test_esptool.py::TestVerifyCommand::test_verify_failure - TypeErro... ERROR test/test_esptool.py::TestVerifyCommand::test_verify_unaligned_length ERROR test/test_esptool.py::TestReadIdentityValues::test_read_mac - TypeError... ERROR test/test_esptool.py::TestMemoryOperations::test_memory_dump - TypeErro... ERROR test/test_esptool.py::TestMemoryOperations::test_memory_write - TypeErr... ERROR test/test_esptool.py::TestMemoryOperations::test_memory_read - TypeErro... ERROR test/test_esptool.py::TestKeepImageSettings::test_keep_does_not_change_settings ERROR test/test_esptool.py::TestKeepImageSettings::test_detect_size_changes_size ERROR test/test_esptool.py::TestKeepImageSettings::test_explicit_set_size_freq_mode ERROR test/test_esptool.py::TestLoadRAM::test_load_ram - TypeError: _make_tes... ERROR test/test_esptool.py::TestBootloaderHeaderRewriteCases::test_flash_header_rewrite ERROR test/test_esptool.py::TestBootloaderHeaderRewriteCases::test_flash_header_no_magic_no_rewrite ERROR test/test_esptool.py::TestAutoDetect::test_auto_detect - TypeError: _ma... ERROR test/test_esptool.py::TestVirtualPort::test_auto_detect - TypeError: _m... ERROR test/test_esptool.py::TestVirtualPort::test_auto_detect_virtual_port - ... ERROR test/test_esptool.py::TestVirtualPort::test_highspeed_flash_virtual_port ERROR test/test_esptool.py::TestReadWriteMemory::test_read_write_memory_rom ERROR test/test_esptool.py::TestReadWriteMemory::test_read_write_memory_stub ERROR test/test_esptool.py::TestReadWriteMemory::test_read_write_flash_status ERROR test/test_esptool.py::TestReadWriteMemory::test_read_chip_description ERROR test/test_esptool.py::TestConfigFile::test_custom_reset_sequence - Type... FAILED test/test_espsecure_hsm.py::TestSigning::test_sign_v2_hsm - SystemExit... FAILED test/test_espsecure_hsm.py::TestSigning::test_sign_v2_hsm_append_signatures_multiple_steps =========== 2 failed, 9 skipped, 144 deselected, 62 errors in 0.95s ============ ```

I'm using flaky 3.7.0.

radimkarnis commented 1 year ago

Hello, 1) we don't use flaky in the esptool repo at all, but pytest-rerunfailures 2) I see you run the tests as-m 'not host_test' - while the host_test marker is supposed to be used as -m host_test.

kloczek commented 1 year ago

OK I've added pytest-rerunfailures to build and and pytest is executed with -m host_test and still something is wrong ..

```console + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/esptool-4.5.1-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/esptool-4.5.1-2.fc35.x86_64/usr/lib/python3.8/site-packages + /usr/bin/pytest -ra -m 'not network' -m host_test ============================= test session starts ============================== platform linux -- Python 3.8.16, pytest-7.2.1, pluggy-1.0.0 rootdir: /home/tkloczko/rpmbuild/BUILD/esptool-4.5.1 plugins: rerunfailures-11.0 collected 217 items / 73 deselected / 144 selected test/test_espefuse.py .......................ssssssssssss......sss.sss.. [ 34%] ss..ss.....ssssss.ss........ss.. [ 56%] test/test_espsecure.py .......F...F.FF.F......... [ 75%] test/test_esptool.py ...... [ 79%] test/test_image_info.py ....... [ 84%] test/test_imagegen.py .............. [ 93%] test/test_merge_bin.py ........ [ 99%] test/test_modules.py . [100%] =================================== FAILURES =================================== ________________________ TestSigning.test_sign_v2_data _________________________ self = def test_sign_v2_data(self): signing_keys = [ "rsa_secure_boot_signing_key.pem", "ecdsa192_secure_boot_signing_key.pem", "ecdsa_secure_boot_signing_key.pem", ] for key in signing_keys: with tempfile.NamedTemporaryFile() as output_file: args = self.SignArgs( "2", [self._open(key)], output_file.name, False, False, None, None, None, self._open("bootloader_unsigned_v2.bin"), ) > espsecure.sign_data(args) test/test_espsecure.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/esptool-4.5.1-2.fc35.x86_64/usr/lib/python3.8/site-packages/espsecure/__init__.py:331: in sign_data return sign_secure_boot_v2(args) ../../BUILDROOT/esptool-4.5.1-2.fc35.x86_64/usr/lib/python3.8/site-packages/espsecure/__init__.py:490: in sign_secure_boot_v2 signature_block = generate_signature_block_using_private_key( ../../BUILDROOT/esptool-4.5.1-2.fc35.x86_64/usr/lib/python3.8/site-packages/espsecure/__init__.py:604: in generate_signature_block_using_private_key private_key = _load_sbv2_signing_key(keyfile.read()) ../../BUILDROOT/esptool-4.5.1-2.fc35.x86_64/usr/lib/python3.8/site-packages/espsecure/__init__.py:231: in _load_sbv2_signing_key sk = serialization.load_pem_private_key( /usr/lib64/python3.8/site-packages/cryptography/hazmat/primitives/serialization/base.py:22: in load_pem_private_key return ossl.load_pem_private_key(data, password) /usr/lib64/python3.8/site-packages/cryptography/hazmat/backends/openssl/backend.py:921: in load_pem_private_key return self._load_key( /usr/lib64/python3.8/site-packages/cryptography/hazmat/backends/openssl/backend.py:1189: in _load_key self._handle_key_loading_error() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _handle_key_loading_error(self) -> typing.NoReturn: errors = self._consume_errors() if not errors: raise ValueError( "Could not deserialize key data. The data may be in an " "incorrect format or it may be encrypted with an unsupported " "algorithm." ) elif ( errors[0]._lib_reason_match( self._lib.ERR_LIB_EVP, self._lib.EVP_R_BAD_DECRYPT ) or errors[0]._lib_reason_match( self._lib.ERR_LIB_PKCS12, self._lib.PKCS12_R_PKCS12_CIPHERFINAL_ERROR, ) or ( self._lib.Cryptography_HAS_PROVIDERS and errors[0]._lib_reason_match( self._lib.ERR_LIB_PROV, self._lib.PROV_R_BAD_DECRYPT, ) ) ): raise ValueError("Bad decrypt. Incorrect password?") elif any( error._lib_reason_match( self._lib.ERR_LIB_EVP, self._lib.EVP_R_UNSUPPORTED_PRIVATE_KEY_ALGORITHM, ) for error in errors ): raise ValueError("Unsupported public key algorithm.") else: errors_with_text = binding._errors_with_text(errors) > raise ValueError( "Could not deserialize key data. The data may be in an " "incorrect format, it may be encrypted with an unsupported " "algorithm, or it may be an unsupported key type (e.g. EC " "curves with explicit parameters).", errors_with_text, ) E ValueError: ('Could not deserialize key data. The data may be in an incorrect format, it may be encrypted with an unsupported algorithm, or it may be an unsupported key type (e.g. EC curves with explicit parameters).', [_OpenSSLErrorWithText(code=503841036, lib=60, reason=524556, reason_text=b'error:1E08010C:DECODER routines::unsupported'), _OpenSSLErrorWithText(code=134217857, lib=16, reason=129, reason_text=b'error:08000081:elliptic curve routines::unknown group'), _OpenSSLErrorWithText(code=134217847, lib=16, reason=119, reason_text=b'error:08000077:elliptic curve routines::ec group new by name failure'), _OpenSSLErrorWithText(code=134742032, lib=16, reason=524304, reason_text=b'error:08080010:elliptic curve routines::EC lib'), _OpenSSLErrorWithText(code=109052072, lib=13, reason=168, reason_text=b'error:068000A8:asn1 encoding routines::wrong tag'), _OpenSSLErrorWithText(code=109576458, lib=13, reason=524554, reason_text=b'error:0688010A:asn1 encoding routines::nested asn1 error'), _OpenSSLErrorWithText(code=109576458, lib=13, reason=524554, reason_text=b'error:0688010A:asn1 encoding routines::nested asn1 error')]) /usr/lib64/python3.8/site-packages/cryptography/hazmat/backends/openssl/backend.py:1248: ValueError ----------------------------- Captured stdout call ----------------------------- 1 signing key(s) found. Signed 32768 bytes of data from /home/tkloczko/rpmbuild/BUILD/esptool-4.5.1/test/secure_images/bootloader_unsigned_v2.bin. Signature sector now has 1 signature blocks. Signature block 0 is valid (RSA). Signature block 0 verification successful using the supplied key (RSA). Signature block 1 invalid. Skipping. Signature block 2 invalid. Skipping. 1 signing key(s) found. ____________ TestSigning.test_sign_v2_with_pre_calculated_signature ____________ self = def test_sign_v2_with_pre_calculated_signature(self): # Sign using pre-calculated signature + Verify signing_keys = [ "rsa_secure_boot_signing_pubkey.pem", "ecdsa192_secure_boot_signing_pubkey.pem", "ecdsa_secure_boot_signing_pubkey.pem", ] pre_calculated_signatures = [ "pre_calculated_bootloader_signature_rsa.bin", "pre_calculated_bootloader_signature_ecdsa192.bin", "pre_calculated_bootloader_signature_ecdsa256.bin", ] for pub_key, signature in zip(signing_keys, pre_calculated_signatures): with tempfile.NamedTemporaryFile() as output_file: args = self.SignArgs( "2", None, output_file.name, False, False, None, [self._open(pub_key)], [self._open(signature)], self._open("bootloader_unsigned_v2.bin"), ) > espsecure.sign_data(args) test/test_espsecure.py:409: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/esptool-4.5.1-2.fc35.x86_64/usr/lib/python3.8/site-packages/espsecure/__init__.py:331: in sign_data return sign_secure_boot_v2(args) ../../BUILDROOT/esptool-4.5.1-2.fc35.x86_64/usr/lib/python3.8/site-packages/espsecure/__init__.py:485: in sign_secure_boot_v2 signature_block = generate_signature_block_using_pre_calculated_signature( ../../BUILDROOT/esptool-4.5.1-2.fc35.x86_64/usr/lib/python3.8/site-packages/espsecure/__init__.py:546: in generate_signature_block_using_pre_calculated_signature public_key = _get_sbv2_pub_key(pk) ../../BUILDROOT/esptool-4.5.1-2.fc35.x86_64/usr/lib/python3.8/site-packages/espsecure/__init__.py:288: in _get_sbv2_pub_key vk = _load_sbv2_pub_key(key_data) ../../BUILDROOT/esptool-4.5.1-2.fc35.x86_64/usr/lib/python3.8/site-packages/espsecure/__init__.py:258: in _load_sbv2_pub_key vk = serialization.load_pem_public_key(keydata, backend=default_backend()) /usr/lib64/python3.8/site-packages/cryptography/hazmat/primitives/serialization/base.py:30: in load_pem_public_key return ossl.load_pem_public_key(data) /usr/lib64/python3.8/site-packages/cryptography/hazmat/backends/openssl/backend.py:968: in load_pem_public_key self._handle_key_loading_error() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _handle_key_loading_error(self) -> typing.NoReturn: errors = self._consume_errors() if not errors: raise ValueError( "Could not deserialize key data. The data may be in an " "incorrect format or it may be encrypted with an unsupported " "algorithm." ) elif ( errors[0]._lib_reason_match( self._lib.ERR_LIB_EVP, self._lib.EVP_R_BAD_DECRYPT ) or errors[0]._lib_reason_match( self._lib.ERR_LIB_PKCS12, self._lib.PKCS12_R_PKCS12_CIPHERFINAL_ERROR, ) or ( self._lib.Cryptography_HAS_PROVIDERS and errors[0]._lib_reason_match( self._lib.ERR_LIB_PROV, self._lib.PROV_R_BAD_DECRYPT, ) ) ): raise ValueError("Bad decrypt. Incorrect password?") elif any( error._lib_reason_match( self._lib.ERR_LIB_EVP, self._lib.EVP_R_UNSUPPORTED_PRIVATE_KEY_ALGORITHM, ) for error in errors ): raise ValueError("Unsupported public key algorithm.") else: errors_with_text = binding._errors_with_text(errors) > raise ValueError( "Could not deserialize key data. The data may be in an " "incorrect format, it may be encrypted with an unsupported " "algorithm, or it may be an unsupported key type (e.g. EC " "curves with explicit parameters).", errors_with_text, ) E ValueError: ('Could not deserialize key data. The data may be in an incorrect format, it may be encrypted with an unsupported algorithm, or it may be an unsupported key type (e.g. EC curves with explicit parameters).', [_OpenSSLErrorWithText(code=75497580, lib=9, reason=108, reason_text=b'error:0480006C:PEM routines::no start line')]) /usr/lib64/python3.8/site-packages/cryptography/hazmat/backends/openssl/backend.py:1248: ValueError ----------------------------- Captured stdout call ----------------------------- Pre-calculated signatures found 1 signing key(s) found. Signed 32768 bytes of data from /home/tkloczko/rpmbuild/BUILD/esptool-4.5.1/test/secure_images/bootloader_unsigned_v2.bin. Signature sector now has 1 signature blocks. Signature block 0 is valid (RSA). Signature block 0 verification successful using the supplied key (RSA). Signature block 1 invalid. Skipping. Signature block 2 invalid. Skipping. Pre-calculated signatures found 1 signing key(s) found. ________________ TestSigning.test_verify_signature_signing_key _________________ self = def test_verify_signature_signing_key(self): # correct key v1 args = self.VerifyArgs( "1", False, None, self._open("ecdsa_secure_boot_signing_key.pem"), self._open("bootloader_signed.bin"), ) espsecure.verify_signature(args) # correct key v2 args = self.VerifyArgs( "2", False, None, self._open("rsa_secure_boot_signing_key.pem"), self._open("bootloader_signed_v2.bin"), ) espsecure.verify_signature(args) # correct key v2 (ecdsa256) args = self.VerifyArgs( "2", False, None, self._open("ecdsa_secure_boot_signing_key.pem"), self._open("bootloader_signed_v2_ecdsa256.bin"), ) espsecure.verify_signature(args) # correct key v2 (ecdsa192) args = self.VerifyArgs( "2", False, None, self._open("ecdsa192_secure_boot_signing_key.pem"), self._open("bootloader_signed_v2_ecdsa192.bin"), ) > espsecure.verify_signature(args) test/test_espsecure.py:486: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/esptool-4.5.1-2.fc35.x86_64/usr/lib/python3.8/site-packages/espsecure/__init__.py:701: in verify_signature return verify_signature_v2(args) ../../BUILDROOT/esptool-4.5.1-2.fc35.x86_64/usr/lib/python3.8/site-packages/espsecure/__init__.py:787: in verify_signature_v2 vk = _get_sbv2_pub_key(keyfile) ../../BUILDROOT/esptool-4.5.1-2.fc35.x86_64/usr/lib/python3.8/site-packages/espsecure/__init__.py:286: in _get_sbv2_pub_key return _load_sbv2_signing_key(key_data).public_key() ../../BUILDROOT/esptool-4.5.1-2.fc35.x86_64/usr/lib/python3.8/site-packages/espsecure/__init__.py:231: in _load_sbv2_signing_key sk = serialization.load_pem_private_key( /usr/lib64/python3.8/site-packages/cryptography/hazmat/primitives/serialization/base.py:22: in load_pem_private_key return ossl.load_pem_private_key(data, password) /usr/lib64/python3.8/site-packages/cryptography/hazmat/backends/openssl/backend.py:921: in load_pem_private_key return self._load_key( /usr/lib64/python3.8/site-packages/cryptography/hazmat/backends/openssl/backend.py:1189: in _load_key self._handle_key_loading_error() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _handle_key_loading_error(self) -> typing.NoReturn: errors = self._consume_errors() if not errors: raise ValueError( "Could not deserialize key data. The data may be in an " "incorrect format or it may be encrypted with an unsupported " "algorithm." ) elif ( errors[0]._lib_reason_match( self._lib.ERR_LIB_EVP, self._lib.EVP_R_BAD_DECRYPT ) or errors[0]._lib_reason_match( self._lib.ERR_LIB_PKCS12, self._lib.PKCS12_R_PKCS12_CIPHERFINAL_ERROR, ) or ( self._lib.Cryptography_HAS_PROVIDERS and errors[0]._lib_reason_match( self._lib.ERR_LIB_PROV, self._lib.PROV_R_BAD_DECRYPT, ) ) ): raise ValueError("Bad decrypt. Incorrect password?") elif any( error._lib_reason_match( self._lib.ERR_LIB_EVP, self._lib.EVP_R_UNSUPPORTED_PRIVATE_KEY_ALGORITHM, ) for error in errors ): raise ValueError("Unsupported public key algorithm.") else: errors_with_text = binding._errors_with_text(errors) > raise ValueError( "Could not deserialize key data. The data may be in an " "incorrect format, it may be encrypted with an unsupported " "algorithm, or it may be an unsupported key type (e.g. EC " "curves with explicit parameters).", errors_with_text, ) E ValueError: ('Could not deserialize key data. The data may be in an incorrect format, it may be encrypted with an unsupported algorithm, or it may be an unsupported key type (e.g. EC curves with explicit parameters).', [_OpenSSLErrorWithText(code=503841036, lib=60, reason=524556, reason_text=b'error:1E08010C:DECODER routines::unsupported'), _OpenSSLErrorWithText(code=134217857, lib=16, reason=129, reason_text=b'error:08000081:elliptic curve routines::unknown group'), _OpenSSLErrorWithText(code=134217847, lib=16, reason=119, reason_text=b'error:08000077:elliptic curve routines::ec group new by name failure'), _OpenSSLErrorWithText(code=134742032, lib=16, reason=524304, reason_text=b'error:08080010:elliptic curve routines::EC lib'), _OpenSSLErrorWithText(code=109052072, lib=13, reason=168, reason_text=b'error:068000A8:asn1 encoding routines::wrong tag'), _OpenSSLErrorWithText(code=109576458, lib=13, reason=524554, reason_text=b'error:0688010A:asn1 encoding routines::nested asn1 error'), _OpenSSLErrorWithText(code=109576458, lib=13, reason=524554, reason_text=b'error:0688010A:asn1 encoding routines::nested asn1 error')]) /usr/lib64/python3.8/site-packages/cryptography/hazmat/backends/openssl/backend.py:1248: ValueError ----------------------------- Captured stdout call ----------------------------- Verifying 21696 bytes of data Signature is valid Signature block 0 is valid (RSA). Signature block 0 verification successful using the supplied key (RSA). Signature block 1 invalid. Skipping. Signature block 2 invalid. Skipping. Signature block 0 is valid (ECDSA). Signature block 0 verification successful using the supplied key (ECDSA). _________________ TestSigning.test_verify_signature_public_key _________________ self = def test_verify_signature_public_key(self): # correct key v1 args = self.VerifyArgs( "1", False, None, self._open("ecdsa_secure_boot_signing_pubkey.pem"), self._open("bootloader_signed.bin"), ) espsecure.verify_signature(args) # correct key v2 args = self.VerifyArgs( "2", False, None, self._open("rsa_secure_boot_signing_pubkey.pem"), self._open("bootloader_signed_v2.bin"), ) espsecure.verify_signature(args) # correct key v2 (ecdsa256) args = self.VerifyArgs( "2", False, None, self._open("ecdsa_secure_boot_signing_pubkey.pem"), self._open("bootloader_signed_v2_ecdsa256.bin"), ) espsecure.verify_signature(args) # correct key v2 (ecdsa192) args = self.VerifyArgs( "2", False, None, self._open("ecdsa192_secure_boot_signing_pubkey.pem"), self._open("bootloader_signed_v2_ecdsa192.bin"), ) > espsecure.verify_signature(args) test/test_espsecure.py:599: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/esptool-4.5.1-2.fc35.x86_64/usr/lib/python3.8/site-packages/espsecure/__init__.py:701: in verify_signature return verify_signature_v2(args) ../../BUILDROOT/esptool-4.5.1-2.fc35.x86_64/usr/lib/python3.8/site-packages/espsecure/__init__.py:787: in verify_signature_v2 vk = _get_sbv2_pub_key(keyfile) ../../BUILDROOT/esptool-4.5.1-2.fc35.x86_64/usr/lib/python3.8/site-packages/espsecure/__init__.py:288: in _get_sbv2_pub_key vk = _load_sbv2_pub_key(key_data) ../../BUILDROOT/esptool-4.5.1-2.fc35.x86_64/usr/lib/python3.8/site-packages/espsecure/__init__.py:258: in _load_sbv2_pub_key vk = serialization.load_pem_public_key(keydata, backend=default_backend()) /usr/lib64/python3.8/site-packages/cryptography/hazmat/primitives/serialization/base.py:30: in load_pem_public_key return ossl.load_pem_public_key(data) /usr/lib64/python3.8/site-packages/cryptography/hazmat/backends/openssl/backend.py:968: in load_pem_public_key self._handle_key_loading_error() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _handle_key_loading_error(self) -> typing.NoReturn: errors = self._consume_errors() if not errors: raise ValueError( "Could not deserialize key data. The data may be in an " "incorrect format or it may be encrypted with an unsupported " "algorithm." ) elif ( errors[0]._lib_reason_match( self._lib.ERR_LIB_EVP, self._lib.EVP_R_BAD_DECRYPT ) or errors[0]._lib_reason_match( self._lib.ERR_LIB_PKCS12, self._lib.PKCS12_R_PKCS12_CIPHERFINAL_ERROR, ) or ( self._lib.Cryptography_HAS_PROVIDERS and errors[0]._lib_reason_match( self._lib.ERR_LIB_PROV, self._lib.PROV_R_BAD_DECRYPT, ) ) ): raise ValueError("Bad decrypt. Incorrect password?") elif any( error._lib_reason_match( self._lib.ERR_LIB_EVP, self._lib.EVP_R_UNSUPPORTED_PRIVATE_KEY_ALGORITHM, ) for error in errors ): raise ValueError("Unsupported public key algorithm.") else: errors_with_text = binding._errors_with_text(errors) > raise ValueError( "Could not deserialize key data. The data may be in an " "incorrect format, it may be encrypted with an unsupported " "algorithm, or it may be an unsupported key type (e.g. EC " "curves with explicit parameters).", errors_with_text, ) E ValueError: ('Could not deserialize key data. The data may be in an incorrect format, it may be encrypted with an unsupported algorithm, or it may be an unsupported key type (e.g. EC curves with explicit parameters).', [_OpenSSLErrorWithText(code=75497580, lib=9, reason=108, reason_text=b'error:0480006C:PEM routines::no start line')]) /usr/lib64/python3.8/site-packages/cryptography/hazmat/backends/openssl/backend.py:1248: ValueError ----------------------------- Captured stdout call ----------------------------- Verifying 21696 bytes of data Signature is valid Signature block 0 is valid (RSA). Signature block 0 verification successful using the supplied key (RSA). Signature block 1 invalid. Skipping. Signature block 2 invalid. Skipping. Signature block 0 is valid (ECDSA). Signature block 0 verification successful using the supplied key (ECDSA). _________________ TestSigning.test_generate_and_extract_key_v2 _________________ self = def test_generate_and_extract_key_v2(self): with tempfile.TemporaryDirectory() as keydir: # keyfile cannot exist before generation -> tempfile.NamedTemporaryFile() # cannot be used for keyfile keyfile_name = os.path.join(keydir, "key.pem") # We need to manually delete the keyfile as we are iterating over # different schemes with the same keyfile so instead of using addCleanup, # we remove it using os.remove at the end of each pass for scheme in ["rsa3072", "ecdsa192", "ecdsa256"]: args = self.GenerateKeyArgs("2", scheme, keyfile_name) espsecure.generate_signing_key(args) with tempfile.NamedTemporaryFile() as pub_keyfile, open( keyfile_name, "rb" ) as keyfile: args = self.ExtractKeyArgs("2", keyfile, pub_keyfile) > espsecure.extract_public_key(args) test/test_espsecure.py:707: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/esptool-4.5.1-2.fc35.x86_64/usr/lib/python3.8/site-packages/espsecure/__init__.py:884: in extract_public_key sk = _load_sbv2_signing_key(args.keyfile.read()) ../../BUILDROOT/esptool-4.5.1-2.fc35.x86_64/usr/lib/python3.8/site-packages/espsecure/__init__.py:231: in _load_sbv2_signing_key sk = serialization.load_pem_private_key( /usr/lib64/python3.8/site-packages/cryptography/hazmat/primitives/serialization/base.py:22: in load_pem_private_key return ossl.load_pem_private_key(data, password) /usr/lib64/python3.8/site-packages/cryptography/hazmat/backends/openssl/backend.py:921: in load_pem_private_key return self._load_key( /usr/lib64/python3.8/site-packages/cryptography/hazmat/backends/openssl/backend.py:1189: in _load_key self._handle_key_loading_error() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _handle_key_loading_error(self) -> typing.NoReturn: errors = self._consume_errors() if not errors: raise ValueError( "Could not deserialize key data. The data may be in an " "incorrect format or it may be encrypted with an unsupported " "algorithm." ) elif ( errors[0]._lib_reason_match( self._lib.ERR_LIB_EVP, self._lib.EVP_R_BAD_DECRYPT ) or errors[0]._lib_reason_match( self._lib.ERR_LIB_PKCS12, self._lib.PKCS12_R_PKCS12_CIPHERFINAL_ERROR, ) or ( self._lib.Cryptography_HAS_PROVIDERS and errors[0]._lib_reason_match( self._lib.ERR_LIB_PROV, self._lib.PROV_R_BAD_DECRYPT, ) ) ): raise ValueError("Bad decrypt. Incorrect password?") elif any( error._lib_reason_match( self._lib.ERR_LIB_EVP, self._lib.EVP_R_UNSUPPORTED_PRIVATE_KEY_ALGORITHM, ) for error in errors ): raise ValueError("Unsupported public key algorithm.") else: errors_with_text = binding._errors_with_text(errors) > raise ValueError( "Could not deserialize key data. The data may be in an " "incorrect format, it may be encrypted with an unsupported " "algorithm, or it may be an unsupported key type (e.g. EC " "curves with explicit parameters).", errors_with_text, ) E ValueError: ('Could not deserialize key data. The data may be in an incorrect format, it may be encrypted with an unsupported algorithm, or it may be an unsupported key type (e.g. EC curves with explicit parameters).', [_OpenSSLErrorWithText(code=503841036, lib=60, reason=524556, reason_text=b'error:1E08010C:DECODER routines::unsupported'), _OpenSSLErrorWithText(code=134217857, lib=16, reason=129, reason_text=b'error:08000081:elliptic curve routines::unknown group'), _OpenSSLErrorWithText(code=134217847, lib=16, reason=119, reason_text=b'error:08000077:elliptic curve routines::ec group new by name failure'), _OpenSSLErrorWithText(code=134742032, lib=16, reason=524304, reason_text=b'error:08080010:elliptic curve routines::EC lib'), _OpenSSLErrorWithText(code=109052072, lib=13, reason=168, reason_text=b'error:068000A8:asn1 encoding routines::wrong tag'), _OpenSSLErrorWithText(code=109576458, lib=13, reason=524554, reason_text=b'error:0688010A:asn1 encoding routines::nested asn1 error'), _OpenSSLErrorWithText(code=109576458, lib=13, reason=524554, reason_text=b'error:0688010A:asn1 encoding routines::nested asn1 error')]) /usr/lib64/python3.8/site-packages/cryptography/hazmat/backends/openssl/backend.py:1248: ValueError ----------------------------- Captured stdout call ----------------------------- RSA 3072 private key in PEM format written to /tmp/tmp3b8a44aq/key.pem /tmp/tmp3b8a44aq/key.pem public key extracted to /tmp/tmpc7t0n_lw ECDSA NIST192p private key in PEM format written to /tmp/tmp3b8a44aq/key.pem =========================== short test summary info ============================ SKIPPED [1] test/test_espefuse.py:507: Not necessary fo all chips SKIPPED [1] test/test_espefuse.py:510: Not necessary fo all chips SKIPPED [1] test/test_espefuse.py:519: Not necessary fo all chips SKIPPED [1] test/test_espefuse.py:528: Not necessary fo all chips SKIPPED [1] test/test_espefuse.py:533: Not necessary fo all chips SKIPPED [1] test/test_espefuse.py:542: Not necessary fo all chips SKIPPED [1] test/test_espefuse.py:550: Not necessary fo all chips SKIPPED [1] test/test_espefuse.py:553: Not necessary fo all chips SKIPPED [1] test/test_espefuse.py:562: Not necessary fo all chips SKIPPED [1] test/test_espefuse.py:570: Not necessary fo all chips SKIPPED [1] test/test_espefuse.py:579: Not necessary fo all chips SKIPPED [1] test/test_espefuse.py:588: Not necessary fo all chips SKIPPED [1] test/test_espefuse.py:798: ESP32-C2-only SKIPPED [1] test/test_espefuse.py:818: ESP32-C2-only SKIPPED [1] test/test_espefuse.py:846: Only chips with 6 keys SKIPPED [1] test/test_espefuse.py:931: 512 bit keys are only supported on ESP32-S2 and S3 SKIPPED [1] test/test_espefuse.py:949: 512 bit keys are only supported on ESP32-S2 and S3 SKIPPED [1] test/test_espefuse.py:989: 512 bit keys are only supported on ESP32-S2 and S3 SKIPPED [1] test/test_espefuse.py:1059: ESP32-C2-only SKIPPED [1] test/test_espefuse.py:1076: Only chip with 6 keys SKIPPED [1] test/test_espefuse.py:1187: ESP32-C2-only SKIPPED [1] test/test_espefuse.py:1210: Only chips with 6 keys SKIPPED [1] test/test_espefuse.py:1347: ESP32-C2-only, supports 1 key block SKIPPED [1] test/test_espefuse.py:1359: ESP32-C2-only, supports 1 key block SKIPPED [1] test/test_espefuse.py:1371: ESP32-C2-only, supports 1 key block SKIPPED [1] test/test_espefuse.py:1383: ESP32-C2-only, supports 1 key block SKIPPED [1] test/test_espefuse.py:1411: Supports 6 key blocks SKIPPED [1] test/test_espefuse.py:1443: Supports 6 key blocks SKIPPED [1] test/test_espefuse.py:1489: ESP32-C2-only SKIPPED [1] test/test_espefuse.py:1508: Only chip with 6 keys SKIPPED [1] test/test_espefuse.py:1729: For this chip, FE and SB keys go into one BLOCK SKIPPED [1] test/test_espefuse.py:1745: For this chip, FE and SB keys go into one BLOCK FAILED test/test_espsecure.py::TestSigning::test_sign_v2_data - ValueError: (... FAILED test/test_espsecure.py::TestSigning::test_sign_v2_with_pre_calculated_signature FAILED test/test_espsecure.py::TestSigning::test_verify_signature_signing_key FAILED test/test_espsecure.py::TestSigning::test_verify_signature_public_key FAILED test/test_espsecure.py::TestSigning::test_generate_and_extract_key_v2 ===== 5 failed, 107 passed, 32 skipped, 73 deselected in 94.89s (0:01:34) ====== ```