Commit Graph

1198 Commits

Author SHA1 Message Date
Ashish Sharma
54915f72ed fix(http_request): shifts to HTTP/1.1 in example pytest 2026-05-11 17:41:45 +08:00
muhaidong
7fabf0c6c6 fix(wifi): add ESP_WIFI_MAX_CONN_NUM-aligned ranges for soft-AP max STA Kconfig 2026-05-06 20:50:06 +08:00
Mahavir Jain
6112320eae Merge branch 'fix/fix_https_server_linux_build' into 'master'
fix(https_server): fixes failing example build for linux target

See merge request espressif/esp-idf!47824
2026-04-29 12:57:17 +05:30
Ashish Sharma
ad713295a0 fix(https_request): enforce tls version for supported ciphersuite example 2026-04-27 16:07:20 +08:00
Mahavir Jain
465c0b8e22 Merge branch 'fix/chunk_encoded_post_request_failed' into 'master'
fix(esp_http_client): implement chunked transfer encoding in before tranport write

Closes IDFGH-16566

See merge request espressif/esp-idf!44362
2026-04-23 14:02:41 +05:30
Ashish Sharma
5fc46ba652 fix(https_server): fixes failing example build for linux target 2026-04-21 19:54:46 +08:00
Mahavir Jain
9da6905c59 Merge branch 'fix/http_server_async_handler_connection_retry' into 'master'
fix(http_server/async_handler): Fix http_server async handler tests

Closes IDFCI-3464, IDFCI-6440, IDFCI-6250, and IDFCI-3908

See merge request espressif/esp-idf!47365
2026-04-16 19:31:42 +05:30
Hrushikesh Bhosale
26367ae202 Merge branch 'fix/https_request_rom_impl_ci_failure' into 'master'
fix(examples): make https_request rom_impl CI test resilient to transient external server failures

Closes IDFCI-3792

See merge request espressif/esp-idf!47528
2026-04-16 15:12:35 +08:00
nilesh.kale
c3a413a8a5 fix(esp_http_client): implement chunked transfer encoding in before tranport write
Closes https://github.com/espressif/esp-idf/issues/17685
2026-04-15 16:10:16 +05:30
David Čermák
c4dd0c2cbd Merge branch 'fix/example_socket_len' into 'master'
fix(examples): Fix socket example incorrect len/error handling

Closes IDFGH-17113

See merge request espressif/esp-idf!47199
2026-04-15 17:13:36 +08:00
Mahavir Jain
dfa2365782 Merge branch 'fix/ws_echo_server_uri_registration_race' into 'master'
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
2026-04-13 15:59:46 +05:30
hrushikesh.bhosale
10eb1f4599 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-04-13 15:28:09 +05:30
hrushikesh.bhosale
2ec6f96f9f 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-04-13 15:20:30 +05:30
Aditya Patwardhan
123f040498 Merge branch 'fix_https_request_ci_failure' into 'master'
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
2026-04-13 12:01:21 +05:30
hrushikesh.bhosale
a665e7410c fix(http_server/async_handler): Fix http_server async handler tests
The async handler CI tests fail intermittently because the TCP
connection from the pytest host to the ESP32 HTTP server times out
or gets refused.

Add a _connect_with_retry() helper that retries the TCP connection
up to 3 times with a 2-second delay between attempts, catching
TimeoutError, ConnectionRefusedError, and OSError.

Extract common server startup waiting into _wait_for_server_ready()
which includes a 2-second stabilization delay after the server
registers its URI handlers before tests begin sending requests.
2026-04-09 11:57:40 +05:30
hrushikesh.bhosale
7a50e3ab04 fix(http_server/ws_echo_server): Fix ws_echo_server test URI registration race condition
The WebSocket echo server tests connect immediately after seeing
"Starting server on port:" in the device log, but URI handlers
(/ws, /ws_partial, /auth) are registered asynchronously after the
server starts, taking 40-660ms depending on config and CI load.

This causes two failures:
1. WebSocket handshake returns 404 Not Found because the URI
   handler is not registered yet when the client connects.
2. WebSocket echo returns wrong data because the server is in a
   partially initialized state.

Wait for "Returned from app_main()" before connecting, which
guarantees all URI handlers are registered. Add connection retry
with WebSocketBadStatusException handling to WsClient and to the
partial frame test's raw websocket connection.

Extract _wait_for_server_ready() helper to deduplicate the WiFi
credential input and server readiness logic across all 3 tests.
2026-04-09 11:56:03 +05:30
hrushikesh.bhosale
4868ebc64c 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-04-09 11:31:32 +05:30
hrushikesh.bhosale
995c0f129e feat(pytest_https_x509_bundle): Removed the flaky marker from the tests 2026-04-08 12:38:46 +05:30
hrushikesh.bhosale
d6596eff3a fix(https_x509_bundle): Replace unreliable external URL in https_x509_bundle example
Replace howsmyssl.com with letsencrypt.org in the https_x509_bundle
example. howsmyssl.com is a third-party server that is frequently
unreachable from CI, causing flaky test failures. letsencrypt.org
chains to the same ISRG Root X1 CA, so the custom certificate bundle
validation coverage is identical.

Since letsencrypt.org was already present in the full bundle URL list,
remove the duplicate entry and reduce MAX_URLS from 9 to 8. All 6
unique root CAs in the stress test are still covered.

For the QEMU stress test, increase per-connection timeout from 30s to
60s and final completion timeout from 60s to 180s. QEMU emulated
network is 3-5x slower than real hardware for TLS handshakes.

Add flaky markers to hardware tests to handle intermittent CI lab DHCP
failures that affect all Ethernet-based tests.
2026-04-07 15:14:28 +05:30
Euripedes Rocha Filho
985af4a130 fix: Component depends rules for networking and protocols
Reduces the scope of testing to the direct dependencies.
2026-04-01 12:43:03 +02:00
David Cermak
0790241446 fix(examples): Fix socket example incorrect len/error handling
Closes https://github.com/espressif/esp-idf/issues/18134
2026-04-01 10:33:23 +02:00
Fu Hanxi
12cc3a92af Merge branch 'feat/parametrize-pytest-cli-args' into 'master'
ci: move test cli args alongside test scripts

Closes IDFCI-1951 and IDFCI-2940

See merge request espressif/esp-idf!46966
2026-03-28 08:04:25 +01:00
Fu Hanxi
ddc7e0cdf7 ci: move qemu test cli args alongside test scripts
remove redundant host_test marker
2026-03-26 10:56:15 +01:00
Ondrej Kosta
0f8dd0cf5b fix(eth/examples): fixed ethernet_init dependency to v1.3.0 2026-03-23 12:30:11 +01:00
Ashish Sharma
4971424986 feat(http_server): adds example to test server pong response 2026-03-13 17:42:10 +08:00
Mahavir Jain
0e6c903abb Merge branch 'fix/remove_unused_psa_migration_code_http_server' into 'master'
Fix/remove unused psa migration code http server

See merge request espressif/esp-idf!46112
2026-03-05 18:37:32 +05:30
Ashish Sharma
f0f8183281 fix: removes deprecated http_crypto sources 2026-03-03 11:16:49 +08:00
Ashish Sharma
b5c3e27a38 fix: fixes failing dynamic buffer tests 2026-03-03 11:16:49 +08:00
Ashish Sharma
56d2fd6757 fix(esp_http_server): remove http server unused psa migration 2026-03-02 14:48:41 +08:00
Ashish Sharma
5028b6230f feat(http_server): improve websocket server handling
1. Adds post handshake callback
2. Removes requirement to handle HTTP_GET message in websocket handler

Closes https://github.com/espressif/esp-idf/issues/18215
2026-02-27 09:59:05 +08:00
nilesh.kale
33eb81d2b2 fix: Remove CI test esp32.test_examples_protocol_esp_http_client 2026-02-25 12:06:44 +08:00
hrushikesh.bhosale
91d1574ba2 fix(https_request): Fixed CI failure for https_request example
- Enabled chachapoly ciphersuite from menuconfig, required for
howmyssl URL
2026-02-19 16:19:14 +05:30
Hrushikesh Bhosale
96dda2a6d8 Merge branch 'refactor/remove_common_component_dependency_ota_test_apps' into 'master'
Removed the common_component dependency from app_update and protocols

Closes IDF-15300

See merge request espressif/esp-idf!45822
2026-02-17 13:16:03 +08:00
hrushikesh.bhosale
8124c2e2cf refactor(protocols): Removed the common_component dependency
- Removed the common_component build dependency from protocols test_apps
and examples
2026-02-16 15:07:37 +05:30
Mahavir Jain
4631b4a5d9 docs(protocomm): recommend using security2 scheme for production purpose 2026-02-11 13:55:44 +05:30
hrushikesh.bhosale
e1dd3b07bb fix(esp_http_client): Fixed the example pytest
Pytest was expect the positive content length for async req
2026-02-05 15:02:11 +08:00
Mahavir Jain
2f68594185 Merge branch 'contrib/github_pr_15622' into 'master'
Add support for partial websocket frame payload reads (GitHub PR)

Closes IDFGH-14913

See merge request espressif/esp-idf!44044
2026-01-30 18:22:06 +05:30
Aditya Patwardhan
b8664ef1ce Merge branch 'feat/adds_option_to_save_response_headers' into 'master'
feat(esp_http_client): adds support to save response headers

Closes IDFGH-16577

See merge request espressif/esp-idf!45051
2026-01-29 08:28:58 +05:30
Ashish Sharma
1db7fac8da feat(esp_http_client): adds support to save response headers
Closes https://github.com/espressif/esp-idf/issues/17695
2026-01-28 10:20:47 +08:00
Mahavir Jain
9f8fda8ca8 Merge branch 'feat/add_server_handshake_failure_user_cb' into 'master'
feat(esp_https_server): adds support for user callback on handshake failure

Closes IDFGH-17004

See merge request espressif/esp-idf!44856
2026-01-27 17:47:18 +05:30
igor.udot
4c26ab876b ci: update build-test-rules to use common_components 2026-01-23 10:14:09 +08:00
nilesh.kale
93fcdda9f4 feat: add demo to receive websocket frame in chunks
This commit added demo to receive websocket single frame in chunks
using newly added API httpd_ws_recv_frame_part() with optimized memory.

closes https://github.com/espressif/esp-idf/pull/15622
2026-01-07 15:25:19 +05:30
Ashish Sharma
22d7c20b31 feat(esp_https_server): adds support for user callback on handshake failure
Closes https://github.com/espressif/esp-idf/issues/18053
2026-01-07 17:26:00 +08:00
hrushikesh.bhosale
7b7ddeba58 fix(file_server): File servering example pytest failure
There is timeout failure, due to network issue.
2026-01-06 19:37:28 +08:00
harshal.patil
e91d50ed1e fix(mbedtls): Support partial hardware AES-GCM and s/w fallback for non-AES ciphers
- Support software-fallback for unsupported hardware AES lengths
2026-01-03 12:17:50 +05:30
Ashish Sharma
cc0d469048 feat: migrates protocol examples to PSA APIs 2025-12-30 09:31:49 +05:30
Ondrej Kosta
2659271994 fix(ci): re-enabled ESP32P4 tests on different HW vers 2025-12-15 09:44:39 +01:00
Bogdan Kolendovskyy
d6052853f4 Merge branch 'ci/fix_mqtt_sll_test' into 'master'
ci(mqtt): Update and fix MQTT SSL test

Closes IDFCI-2030

See merge request espressif/esp-idf!43919
2025-12-12 16:30:11 +08:00
C.S.M
e3eaee53e2 Merge branch 'ci/esp32s31_build_ena' into 'master'
ci(esp32s31): Add ci build test for esp32s31

See merge request espressif/esp-idf!44045
2025-12-12 14:59:42 +08:00
Mahavir Jain
92c76fc280 Merge branch 'contrib/github_pr_17799' into 'master'
feat(esp_http_server): Make HTTP(S)_SERVER_EVENT events optional (GitHub PR)

Closes IDFGH-16707

See merge request espressif/esp-idf!43637
2025-12-11 18:10:52 +05:30