This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nuttx-ntfc.git

commit 55b926d7ded9e3765e8dde8a39f247f92e7c53e3
Author: raiden00pl <[email protected]>
AuthorDate: Mon Aug 24 09:48:15 2026 +0200

    envconfig: remove unused reboot_timeout recovery option
    
    reboot_timeout was defined in the recovery default config and documented,
    but never read: _device_reboot() only uses max_retries and base_delay.
    Remove the dead option and its documentation.
    
    Signed-off-by: raiden00pl <[email protected]>
    Assisted-by: Claude Code
---
 Documentation/config.yaml    | 1 -
 Documentation/usage.rst      | 1 -
 src/ntfc/envconfig.py        | 4 +---
 src/ntfc/pytest/configure.py | 4 ++--
 tests/test_envconfig.py      | 2 --
 5 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/Documentation/config.yaml b/Documentation/config.yaml
index 208aa94..bbeb957 100644
--- a/Documentation/config.yaml
+++ b/Documentation/config.yaml
@@ -17,7 +17,6 @@ config:                           # common, global 
configuration options
   recovery:                       # device recovery configuration
     max_retries: 3                # maximum number of reboot attempts before 
giving up. Defaults to 3
     base_delay: 2.0               # initial delay in seconds between retries 
(doubles each attempt, capped at 60). Defaults to 2.0
-    reboot_timeout: 30            # timeout in seconds to wait for device to 
come back after reboot. Defaults to 30
 
 product:                          # many products can be supported in tests 
(product == product0)
 
diff --git a/Documentation/usage.rst b/Documentation/usage.rst
index d92ada1..531383d 100644
--- a/Documentation/usage.rst
+++ b/Documentation/usage.rst
@@ -228,7 +228,6 @@ Remaining tests are skipped if all retries fail.
      recovery:
        max_retries: 3      # reboot attempts before skipping remaining tests
        base_delay: 2.0     # seconds between retries (doubles each attempt)
-       reboot_timeout: 30  # seconds to wait for device after reboot
 
 Signal Handlers
 ===============
diff --git a/src/ntfc/envconfig.py b/src/ntfc/envconfig.py
index 9de0f78..e742da8 100644
--- a/src/ntfc/envconfig.py
+++ b/src/ntfc/envconfig.py
@@ -103,13 +103,11 @@ class EnvConfig:
         """Return device recovery configuration.
 
         :return: Dictionary with keys: 'max_retries' (int),
-            'base_delay' (float), 'reboot_timeout' (int).
-            Defaults to 3 retries, 2s base delay, 30s reboot timeout.
+            'base_delay' (float). Defaults to 3 retries, 2s base delay.
         """
         default_config = {
             "max_retries": 3,
             "base_delay": 2.0,
-            "reboot_timeout": 30,
         }
         config = self._cfg_values.get("config", {})
         recovery_cfg = config.get("recovery", {})
diff --git a/src/ntfc/pytest/configure.py b/src/ntfc/pytest/configure.py
index 0115919..2520fee 100644
--- a/src/ntfc/pytest/configure.py
+++ b/src/ntfc/pytest/configure.py
@@ -68,8 +68,8 @@ class PytestConfigPlugin:
         """Reboot the device with retry and exponential back-off.
 
         Uses recovery configuration from EnvConfig (max_retries,
-        base_delay, reboot_timeout).  Doubles the delay after each
-        failed attempt, capped at 60 seconds.
+        base_delay).  Doubles the delay after each failed attempt,
+        capped at 60 seconds.
         """
         recovery_cfg = self._config.recovery
         max_retries = recovery_cfg["max_retries"]
diff --git a/tests/test_envconfig.py b/tests/test_envconfig.py
index 9eecd44..2bd385d 100644
--- a/tests/test_envconfig.py
+++ b/tests/test_envconfig.py
@@ -183,7 +183,6 @@ def test_envconfig_recovery_defaults():
     recovery = env.recovery
     assert recovery["max_retries"] == 3
     assert recovery["base_delay"] == 2.0
-    assert recovery["reboot_timeout"] == 30
 
 
 def test_envconfig_recovery_custom():
@@ -200,4 +199,3 @@ def test_envconfig_recovery_custom():
     recovery = env.recovery
     assert recovery["max_retries"] == 5
     assert recovery["base_delay"] == 1.0
-    assert recovery["reboot_timeout"] == 30  # default preserved

Reply via email to