[YUNIKORN-3384] Add partition accounting property fuzzer - #1131
Open
tigerquoll wants to merge 1 commit into
Open
[YUNIKORN-3384] Add partition accounting property fuzzer#1131tigerquoll wants to merge 1 commit into
tigerquoll wants to merge 1 commit into
Conversation
Drive seeded, weighted random sequences of the operations a resource manager triggers against a real PartitionContext and check the accounting invariants after every single operation. Operations: node add and remove (including removal of a node that still holds allocations), application add and remove, request add (regular and required node), regular and reserved scheduling cycles, and allocation release. Every termination type is released except the placeholder replacement: placeholders, and with them the replacement flow, are out of scope. Invariants: parent queue usage is the sum of its children (Q1), leaf queue usage is the sum of its applications (Q2), queue usage is never negative and never over the maximum (Q3), the user and group trackers match the applications a user owns (Q4), node usage is the sum of the allocations on it (Q5), queue pending is the sum of the pending below it (Q6), and every reservation references a live application, request and node from both ends (R1). A running total of the allocations placed minus released cross-checks the partition totals. A failure reports the seed, the step and the last operations so the sequence can be replayed. The run logs what the sequence covered so a fuzzer that stops exercising the interesting paths is visible. Signed-off-by: Tigerquoll <tigerquoll@outlook.com>
tigerquoll
force-pushed
the
test/core-fuzzer
branch
from
August 30, 2026 11:38
419b204 to
161b1d7
Compare
tigerquoll
marked this pull request as ready for review
August 30, 2026 11:38
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this is
A property fuzzer for the core's partition-level accounting. The shim cache property fuzzer (YUNIKORN-3373) guards shim bookkeeping; nothing guarded the core's. This is the structural guard for that class from the core side.
JIRA: YUNIKORN-3384
Design
Seeded, weighted random operation sequences against a real
PartitionContextwith a small queue hierarchy, driven through the same entry points the RM uses: add/remove node (removal with live allocations included), add/remove app, add ask (regular and required-node), regular and reserved scheduling cycles, and allocation release with each termination type. Placeholders and the replacement flow are out of scope.After every operation it checks:
plus a running allocated-minus-released model cross-check. A failure reports the seed, step, and last operations for replay; the run logs its coverage so a fuzzer that stops exercising the interesting paths is visible.
Verification
Green on master across all seeds — this is a guard, not necessarily a finder. Its teeth are proven by mutation testing: five deliberate accounting breaks each fire the expected invariant (e.g. dropping
DecAllocatedResourcefires Q2/Q3/model; dropping the parent recursion fires Q1; breaking the user tracker fires Q4). All mutations reverted — the committed diff is test-only. Runtime ~4s.Two real core defects were found while developing this and are filed separately: YUNIKORN-3379 and YUNIKORN-3380. Their trigger operations are deliberately excluded so this fuzzer stays green and mergeable; a follow-up can add them once the bugs are fixed.
Generated by the Author with assistance from Claude Code.