Skip to content

fix(inject_fault): detect QEMU monitor prompt across split recv() chunks , minor bugs too #1267

Open
Anshul1596 wants to merge 1 commit into
ruvnet:mainfrom
Anshul1596:fix/qemu-monitor-prompt-detection
Open

fix(inject_fault): detect QEMU monitor prompt across split recv() chunks , minor bugs too #1267
Anshul1596 wants to merge 1 commit into
ruvnet:mainfrom
Anshul1596:fix/qemu-monitor-prompt-detection

Conversation

@Anshul1596

Copy link
Copy Markdown

What

Fixes a bug where send_cmd() only checked the latest recv() chunk for the (qemu) prompt. If the prompt was split across multiple reads, every command waited for a timeout, slowing down fault injection—especially ring_flood.

Changes

  • Fix send_cmd() to check the accumulated response for (qemu).
  • Batch all ring_flood NMI triggers into a single sendall().
  • Use os.urandom(16) in fault_nvs_corrupt() for faster random bytes.
  • Ensure the monitor socket is always closed with try/finally.

Testing

Tested all fault types against a local QEMU instance. Verified behavior is unchanged, with ring_flood completing noticeably faster.

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