Skip to content

Add proptest dependency - #77

Open
lforchini wants to merge 1 commit into
test/test-utilsfrom
test/refactor
Open

lforchini wants to merge 1 commit into
test/test-utilsfrom
test/refactor

Conversation

@lforchini

@lforchini lforchini commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

Proptest allows for checking general properties instead of just single
instances. This commit modifies some tests to use proptest.

Previously, the thread_id <-> vq mapping was tested by creating some
thread ids, having a fixed number of VQs, then checking those specific
inputs were reasonably assigned. Now, we generate 0..8 ids and 0..128
vqs and ensure any combination assigns VQs reasonably.

Similarly, proptest is used to ensure that next_qemu_iothread_id
really does pick the lowest thread_id, no matter what has already been
assigned.

Signed-off-by: Leonardo Forchini leonardo.forchini@nutanix.com


Stack created with GitHub Stacks CLI • Give Feedback 💬

@lforchini
lforchini added this pull request to stack #83 October 1, 2026 14:37
@lforchini
lforchini removed this pull request from stack #83 October 1, 2026 14:50
@lforchini
lforchini added this pull request to stack #84 October 1, 2026 14:50
Comment thread src/backends/qemu/helpers.rs Resolved
Comment thread src/config.rs Resolved
Comment thread src/controller.rs Resolved
@lforchini
lforchini removed this pull request from stack #84 October 5, 2026 08:12
@lforchini
lforchini added this pull request to stack #87 October 5, 2026 08:16
@lforchini lforchini changed the title Refactor tests Add proptest dependency Oct 5, 2026
@lforchini
lforchini marked this pull request as ready for review October 5, 2026 08:27
@lforchini
lforchini removed this pull request from stack #87 October 8, 2026 15:22
@lforchini
lforchini added this pull request to stack #88 October 8, 2026 15:23
@lforchini
lforchini removed this pull request from stack #88 October 13, 2026 12:32
@lforchini
lforchini added this pull request to stack #95 October 13, 2026 12:44
@lforchini
lforchini added this pull request to stack #152 October 23, 2026 08:22
@lforchini
lforchini removed this pull request from stack #152 October 23, 2026 08:44
@lforchini
lforchini added this pull request to stack #157 October 23, 2026 08:45
@lforchini
lforchini removed this pull request from stack #157 October 23, 2026 08:49
@lforchini
lforchini added this pull request to stack #159 October 23, 2026 08:50
@lforchini
lforchini removed this pull request from stack #159 October 30, 2026 10:48
@lforchini
lforchini added this pull request to stack #173 October 30, 2026 10:50
@lforchini
lforchini removed this pull request from stack #173 November 5, 2026 15:02
@lforchini
lforchini added this pull request to stack #176 November 5, 2026 15:03
@lforchini
lforchini removed this pull request from stack #176 November 5, 2026 15:09
@lforchini
lforchini added this pull request to stack #178 November 5, 2026 15:10
@lforchini
lforchini removed this pull request from stack #178 November 6, 2026 10:23
@lforchini
lforchini added this pull request to stack #180 November 6, 2026 10:24
@lforchini

Copy link
Copy Markdown
Collaborator Author

I've updated the commit message and also the PR body.

@lforchini
lforchini force-pushed the test/refactor branch 2 times, most recently from d40f0c5 to 2755ad8 Compare November 13, 2026 09:38
Proptest allows for checking general properties instead of just single
instances. This commit modifies some tests to use proptest.

Previously, the thread_id <-> vq mapping was tested by creating some
thread ids, having a fixed number of VQs, then checking those specific
inputs were reasonably assigned. Now, we generate 0..8 ids and 0..128
vqs and ensure any combination assigns VQs reasonably.

Similarly, proptest is used to ensure that `next_qemu_iothread_id`
really does pick the lowest thread_id, no matter what has already been
assigned.

Signed-off-by: Leonardo Forchini <leonardo.forchini@nutanix.com>

@tmakatos tmakatos left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

There's still some comments open so I can't tell whether it's ready for review. Also I see some force pushes, can you instead add fixup commits so I can track what changed more easily?

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.

2 participants