From f6a7fb13cd7302473a3c59baa3b3ac9f793af1ae Mon Sep 17 00:00:00 2001 From: "nilesh.kale" Date: Wed, 21 Feb 2024 15:43:25 +0530 Subject: [PATCH] feat: re enables tests on p4 This commit re-enables mbedtls and hal/crypto testapos on p4. --- components/esp_system/port/soc/esp32p4/clk.c | 4 ++++ components/hal/.build-test-rules.yml | 4 ---- components/hal/test_apps/crypto/pytest_crypto.py | 2 -- components/mbedtls/test_apps/.build-test-rules.yml | 4 ---- components/mbedtls/test_apps/pytest_mbedtls_ut.py | 2 -- 5 files changed, 4 insertions(+), 12 deletions(-) diff --git a/components/esp_system/port/soc/esp32p4/clk.c b/components/esp_system/port/soc/esp32p4/clk.c index 777d171648..c7ac1113cf 100644 --- a/components/esp_system/port/soc/esp32p4/clk.c +++ b/components/esp_system/port/soc/esp32p4/clk.c @@ -18,6 +18,7 @@ #include "soc/rtc.h" #include "soc/rtc_periph.h" #include "soc/i2s_reg.h" +#include "soc/hp_sys_clkrst_reg.h" #include "esp_cpu.h" #include "hal/wdt_hal.h" #include "esp_private/esp_modem_clock.h" @@ -100,6 +101,9 @@ __attribute__((weak)) void esp_clk_init(void) // Re calculate the ccount to make time calculation correct. esp_cpu_set_cycle_count((uint64_t)esp_cpu_get_cycle_count() * new_freq_mhz / old_freq_mhz); + + // Set crypto clock (`clk_sec`) to use 240M PLL clock + REG_SET_FIELD(HP_SYS_CLKRST_PERI_CLK_CTRL25_REG, HP_SYS_CLKRST_REG_CRYPTO_CLK_SRC_SEL, 0x2); } static void select_rtc_slow_clk(soc_rtc_slow_clk_src_t rtc_slow_clk_src) diff --git a/components/hal/.build-test-rules.yml b/components/hal/.build-test-rules.yml index 38b4d9e94b..2577a357be 100644 --- a/components/hal/.build-test-rules.yml +++ b/components/hal/.build-test-rules.yml @@ -1,8 +1,4 @@ components/hal/test_apps/crypto: - disable_test: - - if: IDF_TARGET == "esp32p4" - temporary: true - reason: test not pass, should be re-enable # TODO: IDF-8982 depends_components: - efuse diff --git a/components/hal/test_apps/crypto/pytest_crypto.py b/components/hal/test_apps/crypto/pytest_crypto.py index 447bff843f..d988e8eb6d 100644 --- a/components/hal/test_apps/crypto/pytest_crypto.py +++ b/components/hal/test_apps/crypto/pytest_crypto.py @@ -6,7 +6,6 @@ import pytest from pytest_embedded import Dut -@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='esp32p4 support TBD') # TODO: IDF-8982 @pytest.mark.supported_targets @pytest.mark.generic def test_crypto(dut: Dut) -> None: @@ -17,7 +16,6 @@ def test_crypto(dut: Dut) -> None: dut.expect('Tests finished', timeout=timeout) -@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='esp32p4 support TBD') # TODO: IDF-8982 @pytest.mark.supported_targets @pytest.mark.generic @pytest.mark.parametrize('config', ['long_aes_operations'], indirect=True) diff --git a/components/mbedtls/test_apps/.build-test-rules.yml b/components/mbedtls/test_apps/.build-test-rules.yml index 360df7c66b..f33fabc474 100644 --- a/components/mbedtls/test_apps/.build-test-rules.yml +++ b/components/mbedtls/test_apps/.build-test-rules.yml @@ -5,10 +5,6 @@ components/mbedtls/test_apps: - if: CONFIG_NAME == "psram" and SOC_SPIRAM_SUPPORTED != 1 - if: CONFIG_NAME == "psram_all_ext" and SOC_SPIRAM_SUPPORTED != 1 - if: CONFIG_NAME == "ecdsa_sign" and SOC_ECDSA_SUPPORTED != 1 - disable_test: - - if: IDF_TARGET == "esp32p4" - temporary: true - reason: test not pass, should be re-enable # TODO: IDF-8982 depends_components: - efuse depends_filepatterns: diff --git a/components/mbedtls/test_apps/pytest_mbedtls_ut.py b/components/mbedtls/test_apps/pytest_mbedtls_ut.py index a95752dd57..e51de7aa41 100644 --- a/components/mbedtls/test_apps/pytest_mbedtls_ut.py +++ b/components/mbedtls/test_apps/pytest_mbedtls_ut.py @@ -1,11 +1,9 @@ # SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: CC0-1.0 - import pytest from pytest_embedded import Dut -@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='esp32p4 support TBD') # TODO: IDF-8982 @pytest.mark.supported_targets @pytest.mark.generic def test_mbedtls(dut: Dut) -> None: