Skip to content

run_cvd: Improve tap device validation error messages#2601

Merged
bridadan merged 1 commit into
google:mainfrom
bridadan:tap_message_improvement
May 27, 2026
Merged

run_cvd: Improve tap device validation error messages#2601
bridadan merged 1 commit into
google:mainfrom
bridadan:tap_message_improvement

Conversation

@bridadan
Copy link
Copy Markdown
Collaborator

Refactor ValidateTapInterfaceUnused to check if the interface exists first, avoiding misleading "Operation not permitted" errors when the device simply does not exist.

Update ValidateTapDevices to remove the assumption that another device is running, while keeping the actionable suggestions (cvd reset, pkill).

Also remove redundant "Device in use" messages in TestTapDevices to keep logs terse.

Bug: 512536991
Test: Built it with a intentionally incorrect interface name, ensured
output stated interface did not exist instead of a misleading error

@bridadan bridadan requested a review from ser-io May 22, 2026 19:20
@bridadan bridadan force-pushed the tap_message_improvement branch from 04dd053 to 01cdfbb Compare May 22, 2026 19:20
Copy link
Copy Markdown
Member

@ser-io ser-io left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for updating this!

Comment thread base/cvd/allocd/alloc_utils.cpp Outdated
@bridadan bridadan force-pushed the tap_message_improvement branch 2 times, most recently from aad626e to 30582bf Compare May 26, 2026 15:22
@bridadan bridadan added the kokoro:run Run e2e tests. label May 26, 2026
@jemoreira jemoreira added the kokoro:force-run Trigger a presubmit build unconditionally. label May 26, 2026
@bridadan bridadan force-pushed the tap_message_improvement branch from 30582bf to 5f6025c Compare May 26, 2026 19:00
Refactor ValidateTapInterfaceUnused to check if the interface exists
first, avoiding misleading "Operation not permitted" errors when the
device simply does not exist.

Update ValidateTapDevices to remove the assumption that another device
is running, while keeping the actionable suggestions (cvd reset, pkill).

Also remove redundant "Device in use" messages in TestTapDevices to
keep logs terse.

Bug: 512536991
Test: Built it with a intentionally incorrect interface name, ensured
      output stated interface did not exist instead of a misleading error
Flag: EXEMPT BUGFIX
@bridadan bridadan force-pushed the tap_message_improvement branch from 4280687 to 1f43b54 Compare May 26, 2026 20:08
@GoogleCuttlefishTesterBot GoogleCuttlefishTesterBot removed kokoro:run Run e2e tests. kokoro:force-run Trigger a presubmit build unconditionally. labels May 26, 2026
@bridadan bridadan added this pull request to the merge queue May 27, 2026
Merged via the queue into google:main with commit deffb10 May 27, 2026
38 checks passed
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.

5 participants