Skip to content

hal: add error handling to radio stats loop - #308

Open
rslater-cs wants to merge 2 commits into
devfrom
iw-error-handling
Open

hal: add error handling to radio stats loop#308
rslater-cs wants to merge 2 commits into
devfrom
iw-error-handling

Conversation

@rslater-cs

Copy link
Copy Markdown
Contributor

What type of PR is this? (check all applicable)

  • 🍕 Feature
  • 🐛 Bug Fix
  • 📝 Documentation Update
  • 🎨 Style
  • 🧑‍💻 Code Refactor
  • 🔥 Performance Improvements
  • ✅ Test
  • 🤖 Build
  • 🔁 CI
  • 📦 Chore (Release)
  • ⏩ Revert

Description

Previous VM memory testing found that a system without iw will cause the iw event stream to fail creation and, due to an unhandled error, the watch_clients_op op will hammer in the radio loop. To fix I have added a check for iw in the backend init file, added error checking for
start_client_monitor and watch_clients_op in the driver.

I have added a unit test to check

  • A failed monitor start causes the loop to close
  • A failed watch clients op causes the loop to close

I have also added a VM check to make sure the backend fails initialisation in an environment with no iw package

Related Issues, Tickets & Documents

#271

Manual test

  • 👍 yes
  • 🙅 no

Manual test description

Run the testing suite both unit and VM

Added tests?

  • 👍 yes
  • 🙅 no, because they aren't needed
  • 🙋 no, because I need help

Added to documentation?

  • 📜 README.md
  • 🙅 no documentation needed

- Check start_client_monitor return value and log errors on failure
- Detect and handle client monitor stream closure gracefully
- Add unit and integration tests for error scenarios
- Update test suite to include radio driver specification
…ailability check

Move backend instantiation to lazy initialization pattern and add explicit
path-based command validation. Simplify is_supported() check and update
integration test to validate early provider rejection when iw is unavailable.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant