Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend USB/OTA max application update testing #2762

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

scott-brust
Copy link
Member

Problem

Various users have encountered issues updating large applications. We should extend our testing to cover more realistic use cases.

Solution

The USB and OTA update tests should cover the following scenarios

  • OTA small -> large uncompressed
  • OTA small -> large compressed
  • USB small -> large uncompressed
  • USB small -> large compressed
  • OTA small -> large uncompressed, with "busy" system
  • USB small -> large uncompressed, with "busy" system

The "busy" test do the following

  • Start a high priority thread (OS_THREAD_PRIORITY_CRITICAL)
    • This thread does a busy loop and then delay(1) to emulate frequent schedule switches
  • Start a normal priority thread
    • This thread does BLE scanning every 500ms
    • Wifi scanning every 15 seconds
  • The application loop will delay a random period up to 500ms each time it runs
  • USB serial logging will print the firmware update progress. (this only has an impact if USB serial is connected)

Steps to Test

Which unit/integration/application tests are applicable to this code change? (At minimum a test of some kind should be provided)

Example App

Update device-os-test to latest
Build + flash deviceOS@develop
Build test app

device-os-test --test-dir ~/develop/device-os/user/tests/integration/ --device-os-dir ~/develop/device-os/ build msom ota/min_max_app_size -v -- -fixture

Flash + run test app

device-os-test --test-dir ~/develop/device-os/user/tests/integration/ --device-os-dir ~/develop/device-os/ run msom ota/min_max_app_size -v -- -fixture

@scott-brust scott-brust added this to the 5.8.1 milestone Apr 9, 2024
@scott-brust scott-brust marked this pull request as ready for review April 9, 2024 19:43
Copy link
Member

@avtolstoy avtolstoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a TODO for future: for cellular + wifi devices on HIL we are not using WiFi for connectivity. Ideally we should do something about that at some point, but for now P2 should cover the case of OTA + WiFi + BLE probably.

@scott-brust scott-brust modified the milestones: 5.8.1, 5.8.2 May 6, 2024
@scott-brust
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants