Add wpa_supplicant mount for CNET tests in SDKContainer - #368
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe SDK container configuration now defines host and container paths for the WPA supplicant socket. It mounts the host socket into the container with read-write access for CNET Wi-Fi tests. Suggested reviewers: Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to SDK test containers now receive the host WPA supplicant control socket needed for CNET Wi-Fi commissioning tests. No concrete current-head merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
greens
left a comment
There was a problem hiding this comment.
Not exactly my area of expertise, but would this still work on a host that's not running supplicant or has no wifi interfaces?
|
Are there pi's that don't have wifi interfaces? |
cecille
left a comment
There was a problem hiding this comment.
We've discussed this change already offline. I'm not a docker expert, but this looks correct to me.
|
@cecille unsure, but would this break, for example, any developer attempting to run locally on a desktop machine, server, or mini-pc without one? I understand the Pi is the target platform, but I think broad compatibility is still a good goal. |
|
@khodya In case this is expected for 1.7 TE2, please, change the target branch to |
|
Tick the box to add this pull request to the merge queue (same as
|
|
This mount is added unconditionally to the class-level
Suggest gating the mount on the host path actually existing, checked at container-start time rather than baked into the static class attribute, e.g.: def _optional_volumes() -> dict:
volumes = {}
if LOCAL_WPA_SUPPLICANT_PATH.is_dir():
volumes[LOCAL_WPA_SUPPLICANT_PATH] = {
"bind": DOCKER_WPA_SUPPLICANT_PATH,
"mode": "rw",
}
return volumesand merge it into |
|
@khodya Could you please address the comment above ASAP? We are about to kick off 1.7 TE2 and the related documentation was already integrated. |
The mount was previously baked into the class-level run_parameters, so it applied to every SDK container start and could break container creation on hosts without wpa_supplicant/Wi-Fi hardware (Docker Desktop for Mac, rootless Docker, wired-only mini-PCs/servers). Now the mount is added conditionally at start() time, only when /var/run/wpa_supplicant exists on the host, so unaffected hosts keep their previous behavior.
|
@oxesoft fixed, thanks! |
Summary
Adds a
/var/run/wpa_supplicantvolume mount to thechip-cert-bins(SDK)container that the Test Harness starts automatically, so CNET (Network
Commissioning cluster) test cases can manage Wi-Fi networks on the host
without requiring testers to start the container manually with an extra
-vflag.
Background
CNET Wi-Fi network commissioning tests talk to the host's
wpa_supplicantover its control socket.
SDKContainer.run_parameters["volumes"](used bycontainer_manager.create_container(...)when the TH engine/UI boots thecontainer) already mounts
/var/run/dbus/system_bus_socket, PAA certs,credentials, and the python_testing tree — but not
/var/run/wpa_supplicant.Without it, CNET tests run through the automated TH engine can't reach
wpa_supplicant, forcing manualdocker run ... -v /var/run/wpa_supplicant:/var/run/wpa_supplicant ...workarounds outside theTH.
Changes
test_collections/matter/sdk_tests/support/sdk_container.py:LOCAL_WPA_SUPPLICANT_PATH/DOCKER_WPA_SUPPLICANT_PATHconstants(
/var/run/wpa_supplicant), following the existing mount-constant pattern.SDKContainer.run_parameters["volumes"](
mode: rw, matching the D-Bus socket mount).Test plan
/var/run/wpa_supplicantis bind-mounted (docker inspect <container> | grep wpa_supplicant).Wi-Fi networks without the manual volume workaround.