Skip to content

Add control-host WiFi AP test support (New) - #2853

Open
bnbhat wants to merge 1 commit into
mainfrom
bnbhat/control-host
Open

bnbhat wants to merge 1 commit into
mainfrom
bnbhat/control-host

Conversation

@bnbhat

@bnbhat bnbhat commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Description

Add a control-host peer mode to wifi_test.py for validating a DUT-hosted WiFi AP against a control host reachable over its REST API, alongside the existing SSH-host based flow. The existing "wifi"/"wifi-p2p" CLI schema is unchanged, so current SSH-host jobs keep working; "control-host" is a new sibling subcommand.

Add the ce_oem_wifi_ap_control_host manifest entry and add the the corresponding job units in wifi-ap.pxu.

Resolved issues

https://warthogs.atlassian.net/browse/PECA-1881

Documentation

Readme in the unit is updated

Tests

  • make sure you have a compatible control-host
  • set CONTROL_HOST env var with the IP address of the control host
  • set the manifest
  • run the test

@bnbhat

bnbhat commented Sep 10, 2026

Copy link
Copy Markdown
Contributor Author

Still need to do some cleanup, move it from draft once done

@bnbhat
bnbhat force-pushed the bnbhat/control-host branch 2 times, most recently from 494be18 to 5acf2b7 Compare September 10, 2026 19:53
@bnbhat

bnbhat commented Sep 10, 2026

Copy link
Copy Markdown
Contributor Author

Test results

image

submission_2026-09-10T20.22.33.720160.html

@bnbhat bnbhat changed the title [WIP] Add control-host WiFi AP test support (New) Add control-host WiFi AP test support (New) Sep 10, 2026
@bnbhat
bnbhat marked this pull request as ready for review September 10, 2026 20:36
Copilot AI lite review requested due to automatic review settings September 10, 2026 20:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The new control-host REST flow introduces significant new behavior without corresponding unit tests, and a few correctness/quality issues (e.g., JSON decode handling, typos, unused import) should be addressed before merging.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds a new “control-host” peer mode to the CE-OEM WiFi AP validation flow, enabling validation of a DUT-hosted AP using a REST-controlled peer device (in addition to the existing SSH-host flow), and wires this into provider units via new manifest gating.

Changes:

  • Extend wifi_test.py with a new control-host subcommand that drives a peer via REST API and validates connectivity.
  • Update existing AP jobs to explicitly use the new ssh-host peer mode and add new control-host automated AP job templates gated by a new manifest entry.
  • Document the new control-host job templates and add a corresponding manifest flag.
File summaries
File Description
contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/wifi/wifi-ap.pxu Adds control-host AP job templates and updates existing jobs to use the new ssh-host peer mode.
contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/wifi/README.md Documents the new control-host AP automated job templates.
contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/wifi/manifest.pxu Adds has_wifi_ap_control_host manifest entry to gate the new jobs.
contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/wifi_test.py Implements the new control-host REST-driven peer mode and refactors CLI parsing to introduce peer modes.
Review details

Suppressed comments (2)

contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/wifi/README.md:63

  • Typo: "automaticlly" should be "automatically".
and perform connecting AP and ping the control host automaticlly by using its REST API.

contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/wifi/wifi-ap.pxu:114

  • Minor formatting typo in the job description: add a space so it reads "channel {channel}" (currently "channel{channel}").
   Create wpa 802.11{band} Wi-Fi AP on {interface} in channel{channel} group {group}
  • Files reviewed: 3/4 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

## id: ce-oem-wireless/ap_open_{band}_ch{channel}_{group}_{interface}_control_host_automated
A template job for open AP mode automated test using a control host. It will depend on resource job `ce_oem_wifi_ap_mode` to generate the related jobs.\
This job requires the checkbox environment variable `CONTROL_HOST` to allow the control host to join the AP
and perform connecting AP and ping the control host automaticlly by using its REST API.
category_id: com.canonical.certification::wifi_ap
_summary: Create open 802.11{band} Wi-Fi AP on {interface} and check connection with a control host
_description:
Create open 802.11{band} Wi-Fi AP on {interface} in channel{channel} group {group}
Add a control-host peer mode to wifi_test.py for validating a
DUT-hosted WiFi AP against a control host reachable over its
REST API, alongside the existing SSH-host based flow.

Add the ce_oem_wifi_ap_control_host manifest entry and add the the
corresponding job units in wifi-ap.pxu.
@bnbhat
bnbhat force-pushed the bnbhat/control-host branch from 5acf2b7 to c76c080 Compare September 10, 2026 20:45
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.

2 participants