From d0f062c018bcdb5f7a63087328e5574a9111b349 Mon Sep 17 00:00:00 2001 From: Evgeny Torbin Date: Wed, 11 Feb 2026 13:44:21 +0100 Subject: [PATCH] ci: remove unused test cases --- .../memory_release/pytest_memory_release.py | 2 - .../esp-tls/test_apps/pytest_esp-tls.py | 11 ---- .../esp_eth/test_apps/pytest_esp_eth.py | 3 - .../test_apps/crypto/pytest_crypto.py | 56 +------------------ .../sleep_retention/pytest_retention.py | 15 ----- .../test_apps/newlib/pytest_newlib.py | 1 - .../esp_wifi/test_apps/.build-test-rules.yml | 2 + .../pytest_wifi_nvs_connect.py | 13 +---- .../flash_wl/pytest_fatfs_flash_wl.py | 15 +---- .../test_apps/sdcard/pytest_fatfs_sdcard.py | 27 --------- components/lwip/test_apps/pytest_lwip.py | 11 ---- .../spiffs/test_apps/.build-test-rules.yml | 2 +- components/spiffs/test_apps/pytest_spiffs.py | 15 +---- .../vfs/test_apps/.build-test-rules.yml | 2 +- components/vfs/test_apps/pytest_vfs.py | 28 +--------- .../efuse/pytest_system_efuse_example.py | 37 ++++-------- .../partitions_ota/pytest_partitions_ota.py | 16 ++++-- .../pytest_ld_non_contiguous_memory.py | 1 - .../test_apps/security/.build-test-rules.yml | 2 +- .../signed_app_no_secure_boot/README.md | 4 +- .../pytest_signed_app_no_secure_boot.py | 11 +--- tools/test_apps/system/panic/pytest_panic.py | 41 -------------- 22 files changed, 33 insertions(+), 282 deletions(-) delete mode 100644 components/esp-tls/test_apps/pytest_esp-tls.py delete mode 100644 components/esp_hw_support/test_apps/sleep_retention/pytest_retention.py delete mode 100644 components/lwip/test_apps/pytest_lwip.py diff --git a/components/bt/test_apps/memory_release/pytest_memory_release.py b/components/bt/test_apps/memory_release/pytest_memory_release.py index d5d70fcd2b..68b023f6f6 100644 --- a/components/bt/test_apps/memory_release/pytest_memory_release.py +++ b/components/bt/test_apps/memory_release/pytest_memory_release.py @@ -8,8 +8,6 @@ from pytest_embedded_idf.utils import idf_parametrize @idf_parametrize( 'config,target,markers', [ - ('default', 'esp32', (pytest.mark.generic,)), - ('default', 'esp32c2', (pytest.mark.generic,)), ('iram', 'esp32c2', (pytest.mark.generic,)), ('psram', 'esp32', (pytest.mark.psram,)), ], diff --git a/components/esp-tls/test_apps/pytest_esp-tls.py b/components/esp-tls/test_apps/pytest_esp-tls.py deleted file mode 100644 index 553912ef8b..0000000000 --- a/components/esp-tls/test_apps/pytest_esp-tls.py +++ /dev/null @@ -1,11 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD -# SPDX-License-Identifier: Apache-2.0 -import pytest -from pytest_embedded import Dut -from pytest_embedded_idf.utils import idf_parametrize - - -@pytest.mark.generic -@idf_parametrize('target', ['supported_targets'], indirect=['target']) -def test_esp_tls(dut: Dut) -> None: - dut.run_all_single_board_cases() diff --git a/components/esp_eth/test_apps/pytest_esp_eth.py b/components/esp_eth/test_apps/pytest_esp_eth.py index 0230dba6b5..8f67af099c 100644 --- a/components/esp_eth/test_apps/pytest_esp_eth.py +++ b/components/esp_eth/test_apps/pytest_esp_eth.py @@ -399,7 +399,6 @@ def test_esp_eth_dp83848(dut: IdfDut) -> None: 'config', [ 'default_w5500', - 'poll_w5500', ], indirect=True, ) @@ -418,7 +417,6 @@ def test_esp_eth_w5500(dut: IdfDut) -> None: 'config', [ 'default_ksz8851snl', - 'poll_ksz8851snl', ], indirect=True, ) @@ -437,7 +435,6 @@ def test_esp_eth_ksz8851snl(dut: IdfDut) -> None: 'config', [ 'default_dm9051', - 'poll_dm9051', ], indirect=True, ) diff --git a/components/esp_hal_security/test_apps/crypto/pytest_crypto.py b/components/esp_hal_security/test_apps/crypto/pytest_crypto.py index edcedc8339..82b9feb069 100644 --- a/components/esp_hal_security/test_apps/crypto/pytest_crypto.py +++ b/components/esp_hal_security/test_apps/crypto/pytest_crypto.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2024-2026 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: CC0-1.0 import binascii import os @@ -109,60 +109,6 @@ def test_ecdsa_key( raise -@pytest.mark.generic -@idf_parametrize('target', ['supported_targets'], indirect=['target']) -def test_crypto(dut: Dut) -> None: - # if the env variable IDF_FPGA_ENV is set, we would need a longer timeout - # as tests for efuses burning security peripherals would be run - timeout = 600 if os.environ.get('IDF_ENV_FPGA') else 60 - # only expect key manager result if it is supported for the SoC - if dut.app.sdkconfig.get('SOC_KEY_MANAGER_SUPPORTED'): - print('Key Manager is supported') - - # Test for ECDH0 deployment XTS-AES-128 key - dut.expect('Key Manager ECDH0 deployment: XTS_AES_128 key', timeout=timeout) - k2_G = dut.expect(r'K2_G: 0x([0-9a-fA-F]+)', timeout=timeout)[1].decode() - plaintext_data = dut.expect(r'Plaintext data: 0x([0-9a-fA-F]+)', timeout=timeout)[1] - plaintext_data = binascii.unhexlify(plaintext_data) - encrypted_data = dut.expect(r'Encrypted data: 0x([0-9a-fA-F]+)', timeout=timeout)[1].decode() - encrypted_data = binascii.unhexlify(encrypted_data) - negotiated_key = calculate_key_manager_ecdh0_negotiated_key(k2_G, 'main/key_manager/k1_ecdsa.pem') - test_xts_aes_encryption(negotiated_key, plaintext_data, encrypted_data) - - # Test for ECDH0 deployment XTS-AES-256 key - dut.expect('Key Manager ECDH0 deployment: XTS_AES_256 key', timeout=timeout) - k2_G_0 = dut.expect(r'K2_G_0: 0x([0-9a-fA-F]+)', timeout=timeout)[1].decode() - k2_G_1 = dut.expect(r'K2_G_1: 0x([0-9a-fA-F]+)', timeout=timeout)[1].decode() - encrypted_data = dut.expect(r'Encrypted data: 0x([0-9a-fA-F]+)', timeout=timeout)[1].decode() - encrypted_data = binascii.unhexlify(encrypted_data) - negotiated_key_0 = calculate_key_manager_ecdh0_negotiated_key(k2_G_0, 'main/key_manager/k1_ecdsa.pem') - negotiated_key_1 = calculate_key_manager_ecdh0_negotiated_key(k2_G_1, 'main/key_manager/k1_ecdsa.pem') - negotiated_key = negotiated_key_0 + negotiated_key_1 - test_xts_aes_encryption(negotiated_key, plaintext_data, encrypted_data) - # Test for ECDH0 deployment ECDSA-256 key - dut.expect('Key Manager ECDH0 deployment: ECDSA_256 key', timeout=timeout) - k2_G = dut.expect(r'K2_G: 0x([0-9a-fA-F]+)', timeout=timeout)[1].decode() - digest = dut.expect(r'ECDSA message sha256 digest: 0x([0-9a-fA-F]+)', timeout=timeout)[1].decode() - digest = binascii.unhexlify(digest) - signature_r_le = dut.expect(r'ECDSA signature r_le: 0x([0-9a-fA-F]+)', timeout=timeout)[1].decode() - signature_r_le = binascii.unhexlify(signature_r_le) - signature_s_le = dut.expect(r'ECDSA signature s_le: 0x([0-9a-fA-F]+)', timeout=timeout)[1].decode() - signature_s_le = binascii.unhexlify(signature_s_le) - pub_x = dut.expect(r'ECDSA key pubx: 0x([0-9a-fA-F]+)', timeout=timeout)[1].decode() - pub_x = binascii.unhexlify(pub_x) - pub_y = dut.expect(r'ECDSA key puby: 0x([0-9a-fA-F]+)', timeout=timeout)[1].decode() - pub_y = binascii.unhexlify(pub_y) - negotiated_key = calculate_key_manager_ecdh0_negotiated_key(k2_G, 'main/key_manager/k1_ecdsa.pem') - test_ecdsa_key(negotiated_key, digest, signature_r_le, signature_s_le, pub_x, pub_y) - - test_numbers = dut.expect(r'(\d+) Tests (\d+) Failures (\d+) Ignored', timeout=timeout) - failures = test_numbers.group(2).decode() - ignored = test_numbers.group(3).decode() - assert failures == '0', f'No of failures must be 0 (is {failures})' - assert ignored == '0', f'No of Ignored test must be 0 (is {ignored})' - dut.expect('Tests finished', timeout=timeout) - - @pytest.mark.generic @pytest.mark.parametrize('config', ['long_aes_operations'], indirect=True) @idf_parametrize('target', ['supported_targets'], indirect=['target']) diff --git a/components/esp_hw_support/test_apps/sleep_retention/pytest_retention.py b/components/esp_hw_support/test_apps/sleep_retention/pytest_retention.py deleted file mode 100644 index b515a68d39..0000000000 --- a/components/esp_hw_support/test_apps/sleep_retention/pytest_retention.py +++ /dev/null @@ -1,15 +0,0 @@ -# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD -# SPDX-License-Identifier: CC0-1.0 -import pytest -from pytest_embedded import Dut -from pytest_embedded_idf.utils import idf_parametrize - - -# SOC_PAU_SUPPORTED == 1 -retention_targets = ['esp32c6', 'esp32h2', 'esp32p4', 'esp32c5', 'esp32c61'] - - -@pytest.mark.generic -@idf_parametrize('target', ['esp32c61', 'esp32c5', 'esp32p4', 'esp32h2', 'esp32c6'], indirect=['target']) -def test_sleep_retention(dut: Dut) -> None: - dut.run_all_single_board_cases() diff --git a/components/esp_libc/test_apps/newlib/pytest_newlib.py b/components/esp_libc/test_apps/newlib/pytest_newlib.py index 96d5e4ac1c..d5822ae7f4 100644 --- a/components/esp_libc/test_apps/newlib/pytest_newlib.py +++ b/components/esp_libc/test_apps/newlib/pytest_newlib.py @@ -10,7 +10,6 @@ from pytest_embedded_idf.utils import idf_parametrize 'config,target', [ ('default', 'supported_targets'), - ('picolibc', 'supported_targets'), ('options', 'supported_targets'), ('single_core_esp32', 'esp32'), ('psram_esp32', 'esp32'), diff --git a/components/esp_wifi/test_apps/.build-test-rules.yml b/components/esp_wifi/test_apps/.build-test-rules.yml index a9972bba6c..771308393a 100644 --- a/components/esp_wifi/test_apps/.build-test-rules.yml +++ b/components/esp_wifi/test_apps/.build-test-rules.yml @@ -21,6 +21,8 @@ components/esp_wifi/test_apps/: components/esp_wifi/test_apps/wifi_nvs_config: disable: - if: SOC_WIFI_SUPPORTED != 1 + disable_test: + - if: IDF_TARGET != "esp32c2" depends_components: - esp_hw_support - esp_rom diff --git a/components/esp_wifi/test_apps/wifi_nvs_config/pytest_wifi_nvs_connect.py b/components/esp_wifi/test_apps/wifi_nvs_config/pytest_wifi_nvs_connect.py index 9756f9fa33..a9b7bf9b66 100644 --- a/components/esp_wifi/test_apps/wifi_nvs_config/pytest_wifi_nvs_connect.py +++ b/components/esp_wifi/test_apps/wifi_nvs_config/pytest_wifi_nvs_connect.py @@ -1,21 +1,10 @@ -# SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2025-2026 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: Unlicense OR CC0-1.0 import pytest from pytest_embedded_idf.unity_tester import CaseTester from pytest_embedded_idf.utils import idf_parametrize -@pytest.mark.two_duts -@pytest.mark.parametrize('count', [2], indirect=True) -@idf_parametrize( - 'target', - ['esp32', 'esp32c3', 'esp32c5', 'esp32c6', 'esp32c61', 'esp32s2', 'esp32s3'], - indirect=['target'], -) -def test_wifi_nvs_connect_cases(case_tester: CaseTester) -> None: # type: ignore - case_tester.run_all_cases() - - @pytest.mark.two_duts @pytest.mark.xtal_26mhz @pytest.mark.parametrize( diff --git a/components/fatfs/test_apps/flash_wl/pytest_fatfs_flash_wl.py b/components/fatfs/test_apps/flash_wl/pytest_fatfs_flash_wl.py index a9863635bf..0ffcc3a16c 100644 --- a/components/fatfs/test_apps/flash_wl/pytest_fatfs_flash_wl.py +++ b/components/fatfs/test_apps/flash_wl/pytest_fatfs_flash_wl.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2022-2026 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: CC0-1.0 import pytest from pytest_embedded import Dut @@ -19,16 +19,3 @@ from pytest_embedded_idf.utils import idf_parametrize @idf_parametrize('target', ['esp32', 'esp32c3'], indirect=['target']) def test_fatfs_flash_wl_generic(dut: Dut) -> None: dut.run_all_single_board_cases(timeout=240) - - -@pytest.mark.generic -@pytest.mark.psram -@pytest.mark.parametrize( - 'config', - [ - 'psram', - ], -) -@idf_parametrize('target', ['esp32'], indirect=['target']) -def test_fatfs_flash_wl_psram(dut: Dut) -> None: - dut.run_all_single_board_cases(timeout=180) diff --git a/components/fatfs/test_apps/sdcard/pytest_fatfs_sdcard.py b/components/fatfs/test_apps/sdcard/pytest_fatfs_sdcard.py index 7e042ef9e1..86291941f4 100644 --- a/components/fatfs/test_apps/sdcard/pytest_fatfs_sdcard.py +++ b/components/fatfs/test_apps/sdcard/pytest_fatfs_sdcard.py @@ -30,30 +30,3 @@ def test_fatfs_sdcard_generic_sdmmc(dut: Dut) -> None: @idf_parametrize('target', ['esp32', 'esp32c3'], indirect=['target']) def test_fatfs_sdcard_generic_sdspi(dut: Dut) -> None: dut.run_all_single_board_cases(group='sdspi', timeout=180) - - -@pytest.mark.sdcard_sdmode -@pytest.mark.psram -@pytest.mark.parametrize( - 'config', - [ - 'psram', - ], -) -@idf_parametrize('target', ['esp32'], indirect=['target']) -def test_fatfs_sdcard_psram_sdmmc(dut: Dut) -> None: - dut.run_all_single_board_cases(group='sdmmc', timeout=180) - - -@pytest.mark.temp_skip_ci(targets=['esp32'], reason='IDFCI-2058, temporary lack runner') -@pytest.mark.sdcard_spimode -@pytest.mark.psram -@pytest.mark.parametrize( - 'config', - [ - 'psram', - ], -) -@idf_parametrize('target', ['esp32'], indirect=['target']) -def test_fatfs_sdcard_psram_sdspi(dut: Dut) -> None: - dut.run_all_single_board_cases(group='sdspi', timeout=180) diff --git a/components/lwip/test_apps/pytest_lwip.py b/components/lwip/test_apps/pytest_lwip.py deleted file mode 100644 index 962dbd794b..0000000000 --- a/components/lwip/test_apps/pytest_lwip.py +++ /dev/null @@ -1,11 +0,0 @@ -# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD -# SPDX-License-Identifier: Apache-2.0 -import pytest -from pytest_embedded import Dut -from pytest_embedded_idf.utils import idf_parametrize - - -@pytest.mark.generic -@idf_parametrize('target', ['esp32'], indirect=['target']) -def test_lwip(dut: Dut) -> None: - dut.expect_unity_test_output() diff --git a/components/spiffs/test_apps/.build-test-rules.yml b/components/spiffs/test_apps/.build-test-rules.yml index 96d1327ff7..e02dd9e799 100644 --- a/components/spiffs/test_apps/.build-test-rules.yml +++ b/components/spiffs/test_apps/.build-test-rules.yml @@ -1,6 +1,6 @@ components/spiffs/test_apps: disable_test: - - if: IDF_TARGET not in ["esp32", "esp32c3", "esp32s3"] + - if: IDF_TARGET not in ["esp32", "esp32c3"] reason: These chips should be sufficient for test coverage (Xtensa and RISC-V, single and dual core) depends_components: diff --git a/components/spiffs/test_apps/pytest_spiffs.py b/components/spiffs/test_apps/pytest_spiffs.py index 318e0d9f83..f074378113 100644 --- a/components/spiffs/test_apps/pytest_spiffs.py +++ b/components/spiffs/test_apps/pytest_spiffs.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2022-2026 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: CC0-1.0 import pytest from pytest_embedded import Dut @@ -17,16 +17,3 @@ from pytest_embedded_idf.utils import idf_parametrize @idf_parametrize('target', ['esp32', 'esp32c3'], indirect=['target']) def test_spiffs_generic(dut: Dut) -> None: dut.run_all_single_board_cases(timeout=120) - - -@pytest.mark.quad_psram -@pytest.mark.parametrize( - 'config', - [ - 'psram', - ], - indirect=True, -) -@idf_parametrize('target', ['esp32s3'], indirect=['target']) -def test_spiffs_psram(dut: Dut) -> None: - dut.run_all_single_board_cases(timeout=120) diff --git a/components/vfs/test_apps/.build-test-rules.yml b/components/vfs/test_apps/.build-test-rules.yml index b1dbaa0ac6..14687091da 100644 --- a/components/vfs/test_apps/.build-test-rules.yml +++ b/components/vfs/test_apps/.build-test-rules.yml @@ -5,7 +5,7 @@ components/vfs/test_apps: reason: not support yet # TODO: [esp32h21] IDF-11593 [ESP32H4] IDF-12372 disable_test: - - if: IDF_TARGET not in ["esp32", "esp32c2", "esp32c3", "esp32c6", "esp32h2", "esp32s3"] + - if: IDF_TARGET not in ["esp32c2", "esp32c3", "esp32c6", "esp32h2"] temporary: true reason: lack of runners diff --git a/components/vfs/test_apps/pytest_vfs.py b/components/vfs/test_apps/pytest_vfs.py index 038e405e29..1220b7d676 100644 --- a/components/vfs/test_apps/pytest_vfs.py +++ b/components/vfs/test_apps/pytest_vfs.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2023-2026 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: CC0-1.0 import pytest from pytest_embedded import Dut @@ -17,29 +17,3 @@ from pytest_embedded_idf.utils import idf_parametrize @idf_parametrize('target', ['esp32c2', 'esp32c3', 'esp32c6', 'esp32h2'], indirect=['target']) def test_vfs_default(dut: Dut) -> None: dut.run_all_single_board_cases() - - -@pytest.mark.generic -@pytest.mark.parametrize( - 'config', - [ - 'ccomp', - ], - indirect=True, -) -@idf_parametrize('target', ['esp32'], indirect=['target']) -def test_vfs_ccomp(dut: Dut) -> None: - dut.run_all_single_board_cases() - - -@pytest.mark.quad_psram -@pytest.mark.parametrize( - 'config', - [ - 'psram', - ], - indirect=True, -) -@idf_parametrize('target', ['esp32s3'], indirect=['target']) -def test_vfs_psram(dut: Dut) -> None: - dut.run_all_single_board_cases() diff --git a/examples/system/efuse/pytest_system_efuse_example.py b/examples/system/efuse/pytest_system_efuse_example.py index 7e0df3cfd7..d3e99f6e27 100644 --- a/examples/system/efuse/pytest_system_efuse_example.py +++ b/examples/system/efuse/pytest_system_efuse_example.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2022-2026 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: Unlicense OR CC0-1.0 import logging import os @@ -6,7 +6,6 @@ import os import pytest from pytest_embedded import Dut from pytest_embedded_idf.utils import idf_parametrize -from pytest_embedded_idf.utils import soc_filtered_targets from pytest_embedded_qemu.dut import QemuDut @@ -68,7 +67,7 @@ def test_examples_efuse_with_virt_flash_enc(dut: Dut) -> None: # check and log bin size binary_file = os.path.join(dut.app.binary_path, 'bootloader', 'bootloader.bin') bin_size = os.path.getsize(binary_file) - logging.info('{}_bootloader_virt_flash_enc_bin_size: {}KB'.format(dut.app.target, bin_size // 1024)) + logging.info(f'{dut.app.target}_bootloader_virt_flash_enc_bin_size: {bin_size // 1024}KB') print(' - Erase flash') dut.serial.erase_flash() @@ -127,7 +126,7 @@ def test_examples_efuse_with_virt_flash_enc_aes_256(dut: Dut) -> None: # check and log bin size binary_file = os.path.join(dut.app.binary_path, 'bootloader', 'bootloader.bin') bin_size = os.path.getsize(binary_file) - logging.info('{}_bootloader_virt_flash_enc_aes_256_bin_size: {}KB'.format(dut.app.target, bin_size // 1024)) + logging.info(f'{dut.app.target}_bootloader_virt_flash_enc_aes_256_bin_size: {bin_size // 1024}KB') print(' - Erase flash') dut.serial.erase_flash() @@ -247,7 +246,7 @@ def test_examples_efuse_with_virt_flash_enc_release(dut: Dut) -> None: # check and log bin size binary_file = os.path.join(dut.app.binary_path, 'bootloader', 'bootloader.bin') bin_size = os.path.getsize(binary_file) - logging.info('{}_bootloader_virt_flash_enc_release_bin_size: {}KB'.format(dut.app.target, bin_size // 1024)) + logging.info(f'{dut.app.target}_bootloader_virt_flash_enc_release_bin_size: {bin_size // 1024}KB') dut.serial.erase_flash() @@ -303,7 +302,7 @@ def test_examples_efuse_with_virt_secure_boot_v1(dut: Dut) -> None: # check and log bin size binary_file = os.path.join(dut.app.binary_path, 'bootloader', 'bootloader.bin') bin_size = os.path.getsize(binary_file) - logging.info('{}_bootloader_virt_secure_boot_v1_bin_size: {}KB'.format(dut.app.target, bin_size // 1024)) + logging.info(f'{dut.app.target}_bootloader_virt_secure_boot_v1_bin_size: {bin_size // 1024}KB') print(' - Erase flash') dut.serial.erase_flash() @@ -415,7 +414,7 @@ def test_examples_efuse_with_virt_secure_boot_v2(dut: Dut) -> None: # only for ESP32 ECO3 binary_file = os.path.join(dut.app.binary_path, 'bootloader', 'bootloader.bin') bin_size = os.path.getsize(binary_file) - logging.info('{}_bootloader_secure_boot_v2_bin_size: {}KB'.format(dut.app.target, bin_size // 1024)) + logging.info(f'{dut.app.target}_bootloader_secure_boot_v2_bin_size: {bin_size // 1024}KB') print(' - Erase flash') dut.serial.erase_flash() @@ -593,7 +592,7 @@ def example_efuse_with_virt_secure_boot_v2_esp32xx(dut: Dut) -> None: # check and log bin size binary_file = os.path.join(dut.app.binary_path, 'bootloader', 'bootloader.bin') bin_size = os.path.getsize(binary_file) - logging.info('{}_bootloader_virt_secure_boot_v2_bin_size: {}KB'.format(dut.app.target, bin_size // 1024)) + logging.info(f'{dut.app.target}_bootloader_virt_secure_boot_v2_bin_size: {bin_size // 1024}KB') print(' - Erase flash') dut.serial.erase_flash() @@ -664,14 +663,6 @@ def test_examples_efuse_with_virt_secure_boot_v2_esp32xx(dut: Dut) -> None: example_efuse_with_virt_secure_boot_v2_esp32xx(dut) -@pytest.mark.generic -@pytest.mark.parametrize('config', ['virt_secure_boot_v2_ecdsa_p384'], indirect=True) -@pytest.mark.parametrize('skip_autoflash', ['y'], indirect=True) -@idf_parametrize('target', soc_filtered_targets('SOC_ECDSA_SUPPORT_CURVE_P384 == 1'), indirect=['target']) -def test_examples_efuse_with_virt_secure_boot_v2_ecdsa_p384_esp32xx(dut: Dut) -> None: - example_efuse_with_virt_secure_boot_v2_esp32xx(dut) - - @pytest.mark.generic @pytest.mark.parametrize('config', ['virt_secure_boot_v2'], indirect=True) @pytest.mark.parametrize('skip_autoflash', ['y'], indirect=True) @@ -764,7 +755,7 @@ def test_examples_efuse_with_virt_sb_v1_and_fe(dut: Dut) -> None: # check and log bin size binary_file = os.path.join(dut.app.binary_path, 'bootloader', 'bootloader.bin') bin_size = os.path.getsize(binary_file) - logging.info('{}_bootloader_virt_sb_v1_and_fe_bin_size: {}KB'.format(dut.app.target, bin_size // 1024)) + logging.info(f'{dut.app.target}_bootloader_virt_sb_v1_and_fe_bin_size: {bin_size // 1024}KB') print(' - Erase flash') dut.serial.erase_flash() @@ -835,7 +826,7 @@ def test_examples_efuse_with_virt_sb_v2_and_fe(dut: Dut) -> None: # check and log bin size binary_file = os.path.join(dut.app.binary_path, 'bootloader', 'bootloader.bin') bin_size = os.path.getsize(binary_file) - logging.info('{}_bootloader_virt_sb_v2_and_fe_bin_size: {}KB'.format(dut.app.target, bin_size // 1024)) + logging.info(f'{dut.app.target}_bootloader_virt_sb_v2_and_fe_bin_size: {bin_size // 1024}KB') print(' - Erase flash') dut.serial.erase_flash() @@ -1003,7 +994,7 @@ def example_efuse_with_virt_sb_v2_and_fe(dut: Dut) -> None: # check and log bin size binary_file = os.path.join(dut.app.binary_path, 'bootloader', 'bootloader.bin') bin_size = os.path.getsize(binary_file) - logging.info('{}_bootloader_virt_sb_v2_and_fe_bin_size: {}KB'.format(dut.app.target, bin_size // 1024)) + logging.info(f'{dut.app.target}_bootloader_virt_sb_v2_and_fe_bin_size: {bin_size // 1024}KB') dut.serial.erase_flash() @@ -1102,11 +1093,3 @@ def example_efuse_with_virt_sb_v2_and_fe(dut: Dut) -> None: ) def test_examples_efuse_with_virt_sb_v2_and_fe_esp32xx(dut: Dut) -> None: example_efuse_with_virt_sb_v2_and_fe(dut) - - -@pytest.mark.generic -@pytest.mark.parametrize('skip_autoflash', ['y'], indirect=True) -@pytest.mark.parametrize('config', ['virt_sb_v2_ecdsa_p384_and_fe'], indirect=True) -@idf_parametrize('target', soc_filtered_targets('SOC_ECDSA_SUPPORT_CURVE_P384 == 1'), indirect=['target']) -def test_examples_efuse_with_virt_sb_v2_ecdsa_p384_and_fe_esp32xx(dut: Dut) -> None: - example_efuse_with_virt_sb_v2_and_fe(dut) diff --git a/examples/system/ota/partitions_ota/pytest_partitions_ota.py b/examples/system/ota/partitions_ota/pytest_partitions_ota.py index 6c85e38cd6..4bb131df2f 100644 --- a/examples/system/ota/partitions_ota/pytest_partitions_ota.py +++ b/examples/system/ota/partitions_ota/pytest_partitions_ota.py @@ -1,6 +1,7 @@ # SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: Unlicense OR CC0-1.0 import http.server +import itertools import multiprocessing import os import ssl @@ -76,16 +77,19 @@ server_key = ( '-----END PRIVATE KEY-----\n' ) +CONFIG_PARTITIONS_OTA = [ + ('on_update_no_sb_ecdsa', 'esp32'), + *itertools.product( + ['on_update_no_sb_rsa', 'virt_sb_v2_and_fe', 'virt_sb_v2_and_fe_2'], + ['esp32', 'esp32c3', 'esp32s3'], + ), +] + @pytest.mark.wifi_high_traffic -@pytest.mark.parametrize( - 'config', - ['on_update_no_sb_ecdsa', 'on_update_no_sb_rsa', 'virt_sb_v2_and_fe', 'virt_sb_v2_and_fe_2'], - indirect=True, -) @pytest.mark.parametrize('skip_autoflash', ['y'], indirect=True) @pytest.mark.timeout(2400) -@idf_parametrize('target', ['esp32', 'esp32c3', 'esp32s3'], indirect=['target']) +@idf_parametrize('config, target', CONFIG_PARTITIONS_OTA, indirect=['config', 'target']) def test_examples_partitions_ota(dut: Dut) -> None: print(' - Erase flash') dut.serial.erase_flash() diff --git a/tools/test_apps/build_system/ld_non_contiguous_memory/pytest_ld_non_contiguous_memory.py b/tools/test_apps/build_system/ld_non_contiguous_memory/pytest_ld_non_contiguous_memory.py index d7ef0b932b..b34d43c39d 100644 --- a/tools/test_apps/build_system/ld_non_contiguous_memory/pytest_ld_non_contiguous_memory.py +++ b/tools/test_apps/build_system/ld_non_contiguous_memory/pytest_ld_non_contiguous_memory.py @@ -6,7 +6,6 @@ from pytest_embedded_idf.utils import idf_parametrize @pytest.mark.generic -@idf_parametrize('config', ['app_in_flash'], indirect=['config']) @idf_parametrize('target', ['esp32p4'], indirect=['target']) def test_ld_non_contiguous_memory(dut: Dut) -> None: dut.expect_exact('buf2 placed in low sram') diff --git a/tools/test_apps/security/.build-test-rules.yml b/tools/test_apps/security/.build-test-rules.yml index 38ad5740c7..38919fdc3a 100644 --- a/tools/test_apps/security/.build-test-rules.yml +++ b/tools/test_apps/security/.build-test-rules.yml @@ -10,6 +10,6 @@ tools/test_apps/security/secure_boot: tools/test_apps/security/signed_app_no_secure_boot: enable: - - if: IDF_TARGET in ["esp32c2", "esp32c3"] + - if: IDF_TARGET in ["esp32c3"] temporary: true reason: No need to test on all targets diff --git a/tools/test_apps/security/signed_app_no_secure_boot/README.md b/tools/test_apps/security/signed_app_no_secure_boot/README.md index 7a2105fef3..9e864b59bc 100644 --- a/tools/test_apps/security/signed_app_no_secure_boot/README.md +++ b/tools/test_apps/security/signed_app_no_secure_boot/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32-C2 | ESP32-C3 | -| ----------------- | -------- | -------- | +| Supported Targets | ESP32-C3 | +| ----------------- | -------- | # Secure Signed On Update No Secure Boot diff --git a/tools/test_apps/security/signed_app_no_secure_boot/pytest_signed_app_no_secure_boot.py b/tools/test_apps/security/signed_app_no_secure_boot/pytest_signed_app_no_secure_boot.py index dedbc9b8da..9dde2e391a 100644 --- a/tools/test_apps/security/signed_app_no_secure_boot/pytest_signed_app_no_secure_boot.py +++ b/tools/test_apps/security/signed_app_no_secure_boot/pytest_signed_app_no_secure_boot.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2023-2026 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: Unlicense OR CC0-1.0 import pytest @@ -6,15 +6,6 @@ from pytest_embedded import Dut from pytest_embedded_idf.utils import idf_parametrize -@pytest.mark.generic -@idf_parametrize('target', ['esp32c2', 'esp32c3'], indirect=['target']) -def test_examples_security_on_update_no_secure_boot(dut: Dut) -> None: - dut.expect( - "This app is not signed, but check signature on update is enabled in config. It won't be possible to verify any update.", # noqa : E501 - timeout=10, - ) - - @pytest.mark.host_test @pytest.mark.qemu @pytest.mark.parametrize('config', ['secure_update_with_fe'], indirect=True) diff --git a/tools/test_apps/system/panic/pytest_panic.py b/tools/test_apps/system/panic/pytest_panic.py index c97e796545..0a0df29994 100644 --- a/tools/test_apps/system/panic/pytest_panic.py +++ b/tools/test_apps/system/panic/pytest_panic.py @@ -59,13 +59,6 @@ CONFIG_PANIC = list(itertools.chain(itertools.product(['panic'], ['supported_tar CONFIG_PANIC_DUAL_CORE = list(itertools.chain(itertools.product(['panic'], TARGETS_DUAL_CORE))) CONFIG_PANIC_HALT = list(itertools.chain(itertools.product(['panic_halt'], TARGETS_ALL))) -CONFIGS_BACKTRACE = list( - itertools.chain( - # One single-core target and one dual-core target is enough - itertools.product(['framepointer'], ['esp32c3', 'esp32p4']) - ) -) - CONFIGS_DUAL_CORE = list( itertools.chain( itertools.product( @@ -284,25 +277,6 @@ def test_panic_extram_stack(dut: PanicTestDut, config: str) -> None: common_test(dut, config, expected_backtrace=None, expected_coredump=[coredump_pattern]) -@pytest.mark.psram -@idf_parametrize('config, target', [('coredump_flash_extram_attr_esp32', 'esp32')], indirect=['config', 'target']) -def test_panic_extram_attr(dut: PanicTestDut, config: str) -> None: - dut.run_test_func('test_panic_extram_attr') - regex_pattern = rb'assert failed:[\s\w()]*?\s[.\w/]*\.(?:c|cpp|h|hpp):\d.*$' - dut.expect(re.compile(regex_pattern, re.MULTILINE)) - dut.expect_backtrace() - dut.expect_elf_sha256() - dut.expect_none(['Guru Meditation', 'Re-entered core dump']) - - expect_coredump_flash_write_logs(dut, config) - core_elf_file = dut.process_coredump_flash() - - dut.start_gdb_for_coredump(core_elf_file) - - assert dut.gdb_data_eval_expr('g_extram_bss_var') == '123456' - assert dut.gdb_data_eval_expr('g_extram_noinit_var') == '789012' - - @pytest.mark.generic @idf_parametrize('config, target', CONFIGS, indirect=['config', 'target']) @pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration') @@ -1464,21 +1438,6 @@ def test_tcb_corrupted(dut: PanicTestDut, target: str, config: str, test_func_na common_test(dut, config, expected_backtrace=None, expected_coredump=coredump_pattern) -@pytest.mark.generic -@idf_parametrize('config, target', CONFIGS_BACKTRACE, indirect=['config', 'target']) -@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration') -def test_panic_print_backtrace(dut: PanicTestDut, config: str, test_func_name: str) -> None: - dut.run_test_func(test_func_name) - regex_pattern = rb'abort\(\) was called at PC [0-9xa-f]+ on core 0' - dut.expect(regex_pattern) - dut.expect_backtrace() - dut.expect_elf_sha256() - dut.expect_none(['Guru Meditation', 'Re-entered core dump']) - - coredump_pattern = re.compile(PANIC_ABORT_PREFIX + regex_pattern.decode('utf-8')) - common_test(dut, config, expected_backtrace=None, expected_coredump=[coredump_pattern]) - - @pytest.mark.generic @idf_parametrize('config, target', CONFIG_PANIC_HALT, indirect=['config', 'target']) @pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration')