From 637bb4be38032e95fcc98fce7cdc2cc504e7cc7e Mon Sep 17 00:00:00 2001 From: Aditya Patwardhan Date: Mon, 27 Jun 2022 15:19:19 +0530 Subject: [PATCH 1/3] http_request_simple_example_test: Catch broken pipe exception --- tools/ci/python_packages/idf_http_server_test/client.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/ci/python_packages/idf_http_server_test/client.py b/tools/ci/python_packages/idf_http_server_test/client.py index 9e2f4787f2..9215fe017e 100644 --- a/tools/ci/python_packages/idf_http_server_test/client.py +++ b/tools/ci/python_packages/idf_http_server_test/client.py @@ -6,6 +6,7 @@ from __future__ import print_function, unicode_literals import argparse +import errno import http.client import logging from builtins import str @@ -146,6 +147,11 @@ def test_put_handler(ip, port, verbosity=False): except http.client.HTTPException: # Catch socket error as we tried to communicate with an already closed socket pass + except IOError as err: + if err.errno == errno.EPIPE: + # Sometimes Broken Pipe error is returned + # when sending data to a closed socket + pass except http.client.HTTPException: verbose_print(verbosity, 'Socket closed by server') From a191ca21d9241d0c1e17d96670ab92289f77f0ae Mon Sep 17 00:00:00 2001 From: Aditya Patwardhan Date: Mon, 27 Jun 2022 15:30:59 +0530 Subject: [PATCH 2/3] esp_local_ctrl: Increase timeout of first read to minimize test failures --- examples/protocols/esp_local_ctrl/pytest_esp_local_ctrl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/protocols/esp_local_ctrl/pytest_esp_local_ctrl.py b/examples/protocols/esp_local_ctrl/pytest_esp_local_ctrl.py index f94b01297e..33d050a536 100644 --- a/examples/protocols/esp_local_ctrl/pytest_esp_local_ctrl.py +++ b/examples/protocols/esp_local_ctrl/pytest_esp_local_ctrl.py @@ -51,7 +51,7 @@ def test_examples_esp_local_ctrl(dut: Dut) -> None: dut.expect('control: esp_local_ctrl service started with name : my_esp_ctrl_device') def dut_expect_read() -> None: - dut.expect_exact('control: Reading property : timestamp (us)') + dut.expect_exact('control: Reading property : timestamp (us)', timeout=20) dut.expect_exact('control: Reading property : property1') dut.expect_exact('control: Reading property : property2') dut.expect_exact('control: Reading property : property3') From 4a54c8b9bf37fcd042d48aa9ff1907d7096b63b9 Mon Sep 17 00:00:00 2001 From: Aditya Patwardhan Date: Mon, 27 Jun 2022 18:57:58 +0530 Subject: [PATCH 3/3] flash_encryption_example: Increase timeout --- examples/security/flash_encryption/pytest_flash_encryption.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/security/flash_encryption/pytest_flash_encryption.py b/examples/security/flash_encryption/pytest_flash_encryption.py index dd5fd1c782..88cedac921 100644 --- a/examples/security/flash_encryption/pytest_flash_encryption.py +++ b/examples/security/flash_encryption/pytest_flash_encryption.py @@ -65,4 +65,4 @@ def test_examples_security_flash_encryption(dut: Dut) -> None: 'NVS partition "custom_nvs" is encrypted.' ] for line in lines: - dut.expect(line, timeout=2) + dut.expect(line, timeout=20)