Skip to content

Conversation

@rh-jugraham
Copy link
Contributor

@rh-jugraham rh-jugraham commented Oct 14, 2025

Summary by CodeRabbit

  • Tests

    • Simplified GPU hotplug test flow by removing unsupported hot‑unplug steps, focusing on hotplug validation only.
    • Reduces flaky results and false failures with NVIDIA GPUs.
  • Documentation

    • Clarified that hot‑unplug is not supported for NVIDIA GPUs.
    • Updated test logs/messages to reflect hotplug‑only behavior.

@coderabbitai
Copy link

coderabbitai bot commented Oct 14, 2025

Walkthrough

Removed NVIDIA GPU hot-unplug/replug validation from the hotplug GPU test. The test now performs hotplug, driver validation, and final exclusivity checks only. Documentation/log text updated to reflect lack of hot-unplug support. Unused import removed.

Changes

Cohort / File(s) Summary of Changes
GPU hotplug test simplification
libvirt/tests/src/gpu/hotplug_gpu.py
Removed unplug/replug workflow and related GPU state checks; retained hotplug, driver validation, and exclusivity check. Updated logs/docs to state NVIDIA hot-unplug not supported. Cleaned imports (removed vm_xml).

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant T as Test Runner
  participant L as libvirt/Host
  participant G as Guest VM
  participant D as NVIDIA Driver

  rect rgb(235, 245, 255)
  note over T,L: Current flow (hotplug-only)
  T->>L: Attach GPU (hostdev) to VM
  L-->>G: Device appears in guest
  T->>G: Validate via nvidia-smi / driver presence
  T->>L: Final exclusivity check
  end
Loading
sequenceDiagram
  autonumber
  participant T as Test Runner
  participant L as libvirt/Host
  participant G as Guest VM
  participant D as NVIDIA Driver

  rect rgb(255, 240, 240)
  note over T,L: Removed flow (unplug/replug)
  T->>L: Detach GPU (hostdev) from VM
  L-->>G: Device removed event
  T-x G: (Removed) Validate device absence
  T-x L: (Removed) Re-attach GPU and re-validate
  end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I hop through logs with nimble cheer,
Hotplug stays, unplug’s not here.
GPUs snug in virtual dens,
Drivers nod with tidy grins.
Imports trimmed, the path is clean—
Thump-thump! a lean and focused scene.
Carrot commits: crisp and keen.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title directly references the primary change, namely updating the hotplug_gpu test due to unsupported hot-unplug support for NVIDIA GPUs, which matches the removal of the unplug/replug workflow in the changeset.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0ada0bf and 835a3e8.

📒 Files selected for processing (1)
  • libvirt/tests/src/gpu/hotplug_gpu.py (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Python 3.11
  • GitHub Check: Python 3.9
  • GitHub Check: Python 3.12
  • GitHub Check: Python 3.8
🔇 Additional comments (2)
libvirt/tests/src/gpu/hotplug_gpu.py (2)

11-12: LGTM: Clear documentation of NVIDIA GPU limitation.

The updated docstring accurately reflects that hot-unplug is not supported for NVIDIA GPUs, properly setting expectations for the test scope.


27-38: All hot-unplug code removed; only a docstring note remains
The only reference to “hotunplug” is the docstring in hotplug_gpu.py, which appropriately notes that hot-unplug isn’t supported. No further changes required.


Comment @coderabbitai help to get the list of available commands and usage tips.

@rh-jugraham rh-jugraham force-pushed the remove_hotunplug branch 2 times, most recently from 0292073 to 0ada0bf Compare October 14, 2025 19:56
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.

1 participant