Skip to content

tests/unit: add FEMU pqueue regression coverage - #196

Open
shining-b-02 wants to merge 1 commit into
MoatLab:masterfrom
shining-b-02:test/pqueue-priority-change
Open

tests/unit: add FEMU pqueue regression coverage#196
shining-b-02 wants to merge 1 commit into
MoatLab:masterfrom
shining-b-02:test/pqueue-priority-change

Conversation

@shining-b-02

Copy link
Copy Markdown

Summary

  • add a GLib unit-test target for the FEMU priority queue
  • verify min-heap insertion and pop ordering
  • cover the pre-updated priority scenario fixed by repair pqueue using current heap relation #192
  • cover random removal when the replacement must bubble up

Motivation

Recent fixes changed how pqueue_change_priority() and pqueue_randpop() restore the heap, but the priority queue had no focused unit coverage. These tests exercise both repair directions and assert the heap invariant after each operation.

Testing

  • configured a minimal aarch64-softmmu build on macOS
  • built tests/unit/test-femu-pqueue with Ninja
  • ran the Meson unit test: 3 subtests passed
  • ran scripts/checkpatch.pl: 0 errors, 0 warnings
  • ran git diff --check successfully

The PR is left as a draft while upstream CI runs.

@shining-b-02
shining-b-02 marked this pull request as ready for review August 21, 2026 09:42
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