Commit Graph

23 Commits

Author SHA1 Message Date
Aditya Patwardhan
b14621021e Merge branch 'fix_https_request_rom_impl_ci_failure_v5.5' into 'release/v5.5'
fix(examples): make https_request rom_impl CI test resilient to transient external server failures (backport v5.5)

See merge request espressif/esp-idf!48417
2026-05-29 18:14:57 +05:30
Hrushikesh Bhosale
a756e5d6f3 fix(https_request): use write_flash esptool subcommand for compatibility
The esptool version bundled with the release/v5.5 IDF environment only
accepts the underscore subcommand name 'write_flash'. The hyphenated
alias 'write-flash' is rejected by argparse on this esptool version.
Use the canonical 'write_flash' name accepted by all esptool versions.
2026-05-27 11:53:34 +05:30
hrushikesh.bhosale
c8684960af ci(pre-commit): apply ruff-format and ruff autofix on release/v5.5 2026-05-27 11:53:03 +05:30
hrushikesh.bhosale
3143a3a343 ci(pre-commit): add write_time_to_nvs helper to satisfy F821/mypy on release/v5.5
The write_time_to_nvs helper is introduced by parent MR !47528's sibling on master
(!47201). On release/v5.5 the parent hasn't merged yet, so this MR's rom_impl test
resilience patch references an undefined name. Include the helper inline here so
pre-commit (ruff F821 + mypy) passes; if the parent's backport (!48415/!48416)
lands first, the merge will need a trivial dedup of this helper.
2026-05-27 11:53:03 +05:30
hrushikesh.bhosale
d63f5d4a15 fix(https_request): Make https_request rom_impl test resilient
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.
2026-05-27 11:53:03 +05:30
hrushikesh.bhosale
69e3d5bd8a fix(examples): make https_request rom_impl test resilient to transient external server errors
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.
2026-05-27 11:53:03 +05:30
Hrushikesh Bhosale
aff90e29f8 fix(https_request): use write_flash esptool subcommand for compatibility
The esptool version bundled with the release/v5.5 IDF environment only
accepts the underscore subcommand name 'write_flash'. The hyphenated
alias 'write-flash' was added in later esptool releases, so the CI
target test failed with 'argparse.ArgumentError: invalid choice:
write-flash'. Use the canonical 'write_flash' name, which is accepted
by all esptool versions.
2026-05-27 11:51:29 +05:30
hrushikesh.bhosale
efa7ad42be ci(pre-commit): use typing.Callable for Python 3.8 compatibility on release/v5.5 2026-05-13 11:39:25 +05:30
hrushikesh.bhosale
59a43ed4f7 fix(https_request): write host time to NVS to eliminate SNTP dependency in CI
Replace erase_nvs + SNTP time sync with direct NVS timestamp injection
from the pytest host. This eliminates CI flakiness caused by NTP servers
being unreachable from the CI lab network.

Changes:
- Add write_time_to_nvs() helper that generates an NVS partition image
  with the current host timestamp and flashes it to the DUT before each
  test. The firmware reads this via the existing update_time_from_nvs()
  path and skips SNTP entirely.
- Remove @pytest.mark.parametrize('erase_nvs', ['y']) from all 4
  Ethernet-based tests since NVS is now written with valid data.
2026-05-12 10:45:08 +05:30
Ashish Sharma
08d78dcd7e fix(esp_tls): fix failing build with TLS1.3 only and dynamic buffer 2025-06-16 09:22:57 +08:00
Ashish Sharma
415e0f3c86 feat(mbedtls): add support for dynamic buffer for TLS1.3
Closes https://github.com/espressif/esp-idf/issues/15448
2025-04-24 12:05:36 +08:00
igor.udot
daf2d31008 test: format all test scripts 2025-03-05 12:08:48 +08:00
Jiang Guang Ming
642ffec9ed ci: Enabled https_request example pytest with config esp32c2_rom_mbedtls 2024-12-23 17:30:06 +08:00
nilesh.kale
553a117894 fix: Refactored script for initiating Python-based HTTPS server
This commit refactors the script responsible for starting a Python-based HTTPS server
to align with the latest Python version's requirements and best practices.

Closes https://github.com/espressif/esp-idf/issues/13575
2024-04-30 10:04:56 +05:30
yuanjianmin
3f58b33c7f example: Add example to test ciphersuites set function 2023-04-27 19:22:27 +08:00
Chen Yudong
c07d237ffe examples: enable build esp32c6 for wifi and network examples 2023-01-12 14:50:06 +08:00
Song Ruo Jing
7466ddfa8c ci: Make consistence between pytest_*.py and .build-test-rules.yml for esp32c6 (i.e. to pass check_test_scripts_build_test_rules.py) 2022-11-28 11:58:30 +08:00
Harshit Malpani
c351548ca5 Update pytest example for https_request to erase flash before start of test 2022-09-19 12:04:09 +05:30
Chen Yudong
d54e1e8379 CI: make sure that reading of the ipv4 address has finished 2022-07-15 14:21:39 +08:00
Chen Yudong
2f75733ad7 CI: Improve common test methods
also fix ota test cases
2022-07-15 14:21:34 +08:00
Chen Yudong
472ac26712 CI: update test cases to use different environment variables
change test environments
optimize asio udp server test
fix icmp echo test case
use ethernet_router env to run iperf test cases
2022-07-15 01:16:35 +08:00
Chen Yudong
9575f03b8d CI: fix ip address checker and trace log 2022-07-15 01:16:35 +08:00
Harshit Malpani
5a51af523c https examples pytest migration 2022-05-27 10:27:00 +05:30