Skip to content

Add hardware-free IceBT endpoint tests and a Bluetooth CI probe#5803

Closed
externl wants to merge 1 commit into
zeroc-ice:mainfrom
externl:icebt-endpoint-tests
Closed

Add hardware-free IceBT endpoint tests and a Bluetooth CI probe#5803
externl wants to merge 1 commit into
zeroc-ice:mainfrom
externl:icebt-endpoint-tests

Conversation

@externl

@externl externl commented Jul 2, 2026

Copy link
Copy Markdown
Member

The IceBT transport has had no CI coverage because its RFCOMM data path and BlueZ/D-Bus control path both need real hardware. This adds:

  • A hardware-free test (cpp/test/IceBT/endpoints) that parses bt/bts endpoint strings with the IceBT plug-in loaded but not initialized (Ice.InitPlugins=0) — no Bluetooth daemon or radios needed.
  • Coverage that a bts endpoint layers SSL over an IceBT endpoint, and that malformed endpoints are rejected.
  • Build/run gating so it compiles only on Linux with BlueZ/D-Bus and runs in the normal suite under the default tcp config (no --host-bt).
  • A manual bluetooth-probe workflow (workflow_dispatch only) that probes whether GitHub runners can host an emulated Bluetooth stack (virtual HCI via hci_vhci + BlueZ) — a step toward running IceBT over Bluetooth in CI without hardware.

Copilot AI review requested due to automatic review settings July 2, 2026 12:44

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.

Pull request overview

Adds CI coverage for IceBT endpoint parsing without requiring Bluetooth hardware, and introduces a manual GitHub Actions probe to assess whether GitHub-hosted Ubuntu runners can support an emulated Bluetooth stack (vhci + BlueZ) for future full IceBT CI.

Changes:

  • Add a C++ client-only test that registers (but does not initialize) the IceBT plugin, then parses and validates bt/bts endpoint strings and rejection of malformed endpoints.
  • Add build/run guards so the test is only built/executed on Linux when BlueZ/DBus libraries are available.
  • Add a workflow_dispatch-only “bluetooth-probe” workflow to probe kernel/user-space prerequisites for virtual Bluetooth controllers on GitHub-hosted runners.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
cpp/test/IceBT/endpoints/test.py Adds harness gating (Linux + pkg-config check) to only run when IceBT can be built.
cpp/test/IceBT/endpoints/Makefile.mk Builds the new test only when IceBT_system_libs is set.
cpp/test/IceBT/endpoints/Client.cpp Implements endpoint parsing/round-trip assertions for bt and bts, plus malformed input checks.
.github/workflows/bluetooth-probe.yml Adds a manual diagnostic workflow to probe virtual Bluetooth feasibility on Ubuntu runners.

Comment on lines +99 to +103
try
{
Ice::ObjectPrx bad{communicator, "dummy:bt -a not-an-address"};
test(false);
}
Comment on lines +109 to +113
try
{
Ice::ObjectPrx bad{communicator, "dummy:bt -a 01:23:45:67:89:AB -c 99"};
test(false);
}
Comment thread .github/workflows/bluetooth-probe.yml Outdated
Comment on lines +63 to +68
sudo apt-get update
sudo apt-get install -y bluez bluez-tools
# btvirt (the virtual-controller emulator) ships in bluez-tests on some distros and not at
# all on others; try to install it, but don't fail the probe if it's unavailable.
sudo apt-get install -y bluez-tests 2>/dev/null || echo "bluez-tests not packaged on this runner"

Comment thread cpp/test/IceBT/endpoints/Client.cpp Outdated

cout << "testing bt endpoint parsing... " << flush;
{
Ice::ObjectPrx prx{communicator, "dummy:bt -a " + addr + " -u " + uuid + " --name test -c 1"};
@externl
externl force-pushed the icebt-endpoint-tests branch 3 times, most recently from ee81f52 to 43afaa2 Compare July 2, 2026 14:34
Add a client-only test under cpp/test/IceBT/endpoints that parses bt and
bts endpoint strings with the IceBT plug-in loaded but not initialized
(Ice.InitPlugins=0), so it needs no Bluetooth hardware or D-Bus and runs
in the normal Linux test suite under the default tcp config.

Also add a Bluetooth runner-capability probe step to the Linux release CI
job that reports whether the runner can host an emulated Bluetooth stack
(virtual HCI controller plus BlueZ), as a step toward exercising the IceBT
transport over Bluetooth in CI without real radios.
@externl

externl commented Jul 7, 2026

Copy link
Copy Markdown
Member Author

Superseded by #5839, which folds in these hardware-free endpoint tests and the CI probe (verified identical) alongside the Android-emulator IceBT-over-Bluetooth harness. Closing in favor of the consolidated PR.

@externl externl closed this Jul 7, 2026
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