fix(http_server/ws_echo_server): Fix ws_echo_server test URI registration race condition
Closes IDFCI-8585, IDFCI-6703, and IDFCI-3484
See merge request espressif/esp-idf!47368
The test_examples_protocol_https_request_rom_impl test on ESP32-C2 with
the ROM mbedTLS implementation hits a public TLS endpoint
(tls13.browserleaks.com / www.howsmyssl.com) for five sequential
sub-tests. CI runs frequently fail mid-test with one of:
* mbedtls_ssl_handshake returned -0x7780
(MBEDTLS_ERR_SSL_FATAL_ALERT_MESSAGE - server-side fatal alert)
* esp-tls: [sock=NN] select() timeout
* esp-tls: Failed to open new connection in specified timeout
In a representative log the first three sub-tests succeed and only the
fourth/fifth fail, which is consistent with rate-limiting or transient
server unavailability rather than a device bug. Mark the test as
flaky with up to two reruns (10 s delay) so a single transient remote
failure does not fail the CI job.
Also align this test with the rest of the file by injecting the host
timestamp via NVS (write_time_to_nvs) so the device clock no longer
depends on a previous boot's persisted SNTP result, removing one more
source of CI flakiness on first-boot or after NVS erase.
The test_examples_protocol_https_request_rom_impl test on ESP32-C2 with
the ROM mbedTLS implementation hits a public TLS endpoint
(tls13.browserleaks.com / www.howsmyssl.com) for five sequential
sub-tests. CI runs frequently fail mid-test with one of:
* mbedtls_ssl_handshake returned -0x7780
(MBEDTLS_ERR_SSL_FATAL_ALERT_MESSAGE - server-side fatal alert)
* esp-tls: [sock=NN] select() timeout
* esp-tls: Failed to open new connection in specified timeout
In a representative log the first three sub-tests succeed and only the
fourth/fifth fail, which is consistent with rate-limiting or transient
server unavailability rather than a device bug. Mark the test as
flaky with up to two reruns (10 s delay) so a single transient remote
failure does not fail the CI job.
Also align this test with the rest of the file by injecting the host
timestamp via NVS (write_time_to_nvs) so the device clock no longer
depends on a previous boot's persisted SNTP result, removing one more
source of CI flakiness on first-boot or after NVS erase.
- Using PMA, the TEE IRAM is marked as R/X while TEE DRAM is marked as R/W.
Moving the internal memory secure service call table from DRAM to IRAM
makes it immutable.
fix(https_request): write host time to NVS to eliminate SNTP dependency in CI
Closes IDFCI-3371, IDFCI-3294, IDFCI-3480, IDFCI-5982, IDFCI-6184, and IDFCI-3651
See merge request espressif/esp-idf!47201
PMP entry 3 (SOC_DROM_MASK_HIGH, TOR mode) in the memprot path
was incorrectly granted RW permission on esp32h21 and esp32c61.
The mask ROM data region is inherently read-only; remove the W bit.
Also added necessary tests to check voilations and re-enabled
tests for ESP32P4
Commit 64704886b7 (refactor(driver_spi): remove some SPI_LL_xxx SOC_xxx macros)
removed #include "soc/spi_periph.h" from hal/spi_hal.h. Out-of-tree code that
included hal/spi_hal.h and used spi_periph_signal then failed with the symbol
undeclared, because that header had been the transitive source of the declaration.
Partially reverts it.
Add a new CMake function esp_partition_flash_binary() that provides a
unified API for registering partition data binaries to be flashed. It
replaces the direct esptool_py_flash_target calls scattered across
components (spiffs, fatfs, nvs_flash) with a single function that:
- Resolves partition offset from the partition table automatically
- Determines encryption requirements (auto-detect or ALWAYS_PLAINTEXT)
- Creates per-partition flash targets (e.g. idf.py <partition>-flash)
- Optionally includes the binary in `idf.py flash` via FLASH_IN_PROJECT
On the linux target, the function registers binaries for pre-loading
into the emulated flash. A build-time manifest (linux_flash_data.txt)
is generated via file(GENERATE), and partition_linux.c reads it at
runtime to copy each binary into the memory-mapped flash buffer at
the correct offset.
The partition_ops example is updated to use the new function and
includes a custom_partition with pre-built data to demonstrate the
full workflow, including on the linux target.
Add pytest test coverage for cmakev2 build system examples that had
none.
CMakeLists.txt fixes required to enable testing:
conditional_component and plugins: added idf_build_generate_flasher_args()
since these use the low-level build API (idf_build_executable /
idf_flash_binary) which unlike idf_project_default() does not call it
automatically. Without it, flasher_args.json was missing from the build
output and pytest-embedded could not initialize the DUT.
multi_binary: both app1 and app2 were registered in the global flash
target via idf_flash_binary(...FLASH), creating a duplicate key at offset
0x10000 in the flasher_args.json generator expression and preventing the
file from being generated. Fixed by removing FLASH from app2's call so
only app1 is registered in the global flash target. idf_build_generate_flasher_args()
now produces a valid flasher_args.json with app1 as the default app binary.
The test patches the binary path to app2.bin when testing the second app.