Files
claude-desktop-debian/tests
Travis 89582bb8f0 fix: detect virtiofsd at off-PATH install locations (#447) (#453)
* fix: detect virtiofsd at off-PATH install locations (#447)

Ubuntu ships virtiofsd at /usr/libexec/virtiofsd (from qemu-system-common)
and Arch/CachyOS/Manjaro at /usr/lib/virtiofsd. Neither is on the default
$PATH, so doctor.sh's `command -v virtiofsd` always returned a false
negative — users would install the package and still see "virtiofsd: not
found" (reported most recently by @zabka in #445, originally flagged by
@jarrodcolburn).

Adds a _find_virtiofsd helper that searches PATH first, then the known
off-PATH install locations:

  - /usr/libexec/virtiofsd  (Debian/Ubuntu/Fedora/RHEL)
  - /usr/lib/qemu/virtiofsd (legacy Debian)
  - /usr/lib/virtiofsd      (Arch/CachyOS/Manjaro)

Splits virtiofsd out of the KVM tools loop into a dedicated three-branch
check:

  [PASS] virtiofsd: found                                  — on PATH
  [PASS] virtiofsd: found at <path> (not on PATH)          — off-PATH, bwrap default (virtiofsd unused)
  [WARN] virtiofsd: found at <path> but not on PATH        — off-PATH, COWORK_VM_BACKEND=kvm
         (+ info lines about 9p fallback + symlink Fix)
  [INFO]/[WARN] virtiofsd: not found                       — missing (severity ladder unchanged)

The WARN-on-KVM-active branch surfaces that KvmBackend spawns virtiofsd
by PATH name and will silently fall back to virtio-9p (lower performance)
if the binary is only reachable off-PATH — so the user knows a symlink
is needed to actually get virtiofs performance.

Tests: 6 new BATS cases in tests/cowork-bwrap-config.bats exercise the
helper (PATH hit / fallback hit / ordered fallback / total miss /
non-executable skip / default-list regression guard for the Arch path).
All 45 tests pass.

Does not touch cowork-vm-service.js — teaching KvmBackend to probe
these same paths would give Ubuntu KVM users real virtiofs performance
without a symlink, but that's a separate change.

Fixes #447

Co-Authored-By: Claude <claude@anthropic.com>

* style: collapse unnecessary line continuations in virtiofsd check

Simplifier pass — the five backslash-continued `_warn` / `_info`
invocations in the new virtiofsd three-severity block were all under
63 chars after collapsing, well within the project's 80-char
guideline. The continuations were visual noise, not wrap-driven.

Behavior byte-identical. All 45 BATS tests still pass.

Co-Authored-By: Claude <claude@anthropic.com>

---------

Co-authored-by: Claude <claude@anthropic.com>
2026-04-20 15:34:49 -05:00
..