From 3c48568b1aa71ab1b5713a1e632df2a4479813f8 Mon Sep 17 00:00:00 2001 From: Mariano Abad Date: Tue, 21 Jul 2026 19:34:02 -0300 Subject: [PATCH] ci: run the _drm unit tests on every PR (review 6) The _drm unit tests are behind the opt-in drm feature, which the default workspace test job does not build, so they would sit in the tree unrun -- no better than no tests. Add a Linux step to the per-PR ci.yml that runs them with the feature on, alongside the existing ipc/auth tests. drm is a pure runtime-dlopen backend with no link-time deps (no libdrm/EGL/gbm) and the tests are pure userspace (socketpair framing, SCM_RIGHTS, the peer-auth/admission decisions), so this needs no GPU and no extra system packages. The main build/test stays on default features, so the shipped drm-off config remains the primary verified one. --- .github/workflows/ci.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 173eda9f4..aa8224184 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -249,3 +249,18 @@ jobs: use-cross: ${{ matrix.job.use-cross }} command: test args: --locked --target=${{ matrix.job.target }} ${{ steps.test-options.outputs.CARGO_TEST_OPTIONS}} + + # The opt-in `drm` (DRM/KMS capture) feature is off in the default workspace test above, so the + # `_drm` unit tests would otherwise never run in CI. `drm` is a pure runtime-dlopen backend with no + # link-time deps (no libdrm/EGL/gbm, no GPU), so compiling just the rustdesk crate with the feature + # on is cheap and needs no extra system packages. Run the pure-userspace `_drm` tests here (the + # SCM_RIGHTS framing round-trips incl. MSG_CTRUNC/surplus-fd, and the peer-auth + admission-bound + # decisions) so the new screen-content channel is covered on every PR, alongside the ipc/auth tests. + # Linux-only; the main build/test above stays on default features so the shipped drm-off config + # remains the primary verified one. + - name: Run drm unit tests (Linux) + if: matrix.job.target == 'x86_64-unknown-linux-gnu' + uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1 + with: + command: test + args: --locked --target=${{ matrix.job.target }} -p rustdesk --features drm drm_conn_tests