[CI/validation] Run hotplug tests against all four backend implementations (do not merge) #830

Open
Youw wants to merge 88 commits from hotplug-tests-integration into connection-callback
Youw commented 2026-07-15 11:50:33 -05:00 (Migrated from github.com)

Integration / CI-validation branch — not a merge unit. This aggregates the four backend
hotplug implementations (#822 linux, #823 windows, #824 mac, #825 libusb) and the test
suite (#826) on top of connection-callback, so the hotplug tests run against the real
asynchronous implementations together. Those five PRs are the actual merge units into
connection-callback; this branch exists only to exercise the tests end-to-end (the tests on
#826 alone sit on connection-callback, whose backends are still the old synchronous ones).

What runs, and where

Ordinary per-push CI (no label) — runs against the real async backends:

  • HotplugAPI_{hidraw,libusb,winapi,darwin} — the device-less contract suite (argument
    validation, handle semantics, hid_exit teardown races, thread churn), exercising each
    real backend's event machinery on every platform.
  • Hotplug_hidraw — the full behavioral suite (T6–T15) driven by real uhid plug/unplug
    on Linux. This is the one platform with working device-backed hotplug testing.

Label-gated extended CI (ci-virtual-device):

  • win-vhid-test — installs the vhidmini2 driver and runs the _winapi virtual-device tests
    (DeviceIO_winapi + HotplugAPI_winapi run for real; Hotplug_winapi self-skips — see below).
  • libusb-vhid-test — runs the suite inside a raw_gadget + dummy_hcd VM
    (DeviceIO_libusb + HotplugAPI_libusb run for real; Hotplug_libusb self-skips).

Local-only: the macOS device-backed provider needs the
com.apple.developer.hid.virtual.device entitlement, so Hotplug_darwin self-skips on hosted CI.

Known coverage gap

Real device-backed hotplug plug/unplug currently works only via uhid (Linux). The
Hotplug_winapi and Hotplug_libusb providers' plug/unplug halves are stubs (they return
TEST_VDEV_UNAVAILABLE, so those tests self-skip). Wiring them up is the deferred tier-3/tier-4
provider work: raw_gadget re-bind for libusb, and CM_Disable_DevNode / CM_Enable_DevNode
on the root devnode for the Windows driver. Until then, the label validates the virtual-device
harness + the device-less hotplug contract in those environments, not device-backed hotplug events.

Assisted-by: claude-code:claude-opus-4-8

**Integration / CI-validation branch — not a merge unit.** This aggregates the four backend hotplug implementations (#822 linux, #823 windows, #824 mac, #825 libusb) **and** the test suite (#826) on top of `connection-callback`, so the hotplug tests run against the real asynchronous implementations *together*. Those five PRs are the actual merge units into `connection-callback`; this branch exists only to exercise the tests end-to-end (the tests on `#826` alone sit on `connection-callback`, whose backends are still the old synchronous ones). ### What runs, and where **Ordinary per-push CI (no label) — runs against the real async backends:** - `HotplugAPI_{hidraw,libusb,winapi,darwin}` — the device-less contract suite (argument validation, handle semantics, `hid_exit` teardown races, thread churn), exercising each real backend's event machinery on every platform. - `Hotplug_hidraw` — the full behavioral suite (T6–T15) driven by **real `uhid` plug/unplug** on Linux. This is the one platform with working device-backed hotplug testing. **Label-gated extended CI (`ci-virtual-device`):** - `win-vhid-test` — installs the vhidmini2 driver and runs the `_winapi` virtual-device tests (`DeviceIO_winapi` + `HotplugAPI_winapi` run for real; `Hotplug_winapi` self-skips — see below). - `libusb-vhid-test` — runs the suite inside a `raw_gadget` + `dummy_hcd` VM (`DeviceIO_libusb` + `HotplugAPI_libusb` run for real; `Hotplug_libusb` self-skips). **Local-only:** the macOS device-backed provider needs the `com.apple.developer.hid.virtual.device` entitlement, so `Hotplug_darwin` self-skips on hosted CI. ### Known coverage gap Real device-backed hotplug plug/unplug currently works only via **`uhid` (Linux)**. The `Hotplug_winapi` and `Hotplug_libusb` providers' plug/unplug halves are stubs (they return `TEST_VDEV_UNAVAILABLE`, so those tests self-skip). Wiring them up is the deferred tier-3/tier-4 provider work: `raw_gadget` re-bind for libusb, and `CM_Disable_DevNode` / `CM_Enable_DevNode` on the root devnode for the Windows driver. Until then, the label validates the virtual-device harness + the device-less hotplug contract in those environments, not device-backed hotplug events. Assisted-by: claude-code:claude-opus-4-8
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'hotplug-tests-integration:hotplug-tests-integration'
git switch 'hotplug-tests-integration'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'connection-callback'
git merge --no-ff 'hotplug-tests-integration'
git switch 'hotplug-tests-integration'
git rebase 'connection-callback'
git switch 'connection-callback'
git merge --ff-only 'hotplug-tests-integration'
git switch 'hotplug-tests-integration'
git rebase 'connection-callback'
git switch 'connection-callback'
git merge --no-ff 'hotplug-tests-integration'
git switch 'connection-callback'
git merge --squash 'hotplug-tests-integration'
git switch 'connection-callback'
git merge --ff-only 'hotplug-tests-integration'
git switch 'connection-callback'
git merge 'hotplug-tests-integration'
git push origin 'connection-callback'
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-libusb/hidapi!830
No description provided.