feat(libxce-alloc-preason-equality): full-match job_preason_eq with first-difference description (task 2.2)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
a6cbb323b0
commit
62d0b8b686
5 changed files with 648 additions and 2 deletions
|
|
@ -9,7 +9,7 @@ Test-first throughout (red → green → refactor). Every sub-task leaves the bu
|
|||
- Done when the libxce utility tests include these cases and the libxce suite passes under ASAN.
|
||||
- _Requirements: 1.5, 2.3_
|
||||
|
||||
- [ ] 2. Core: public equality API in libxce
|
||||
- [x] 2. Core: public equality API in libxce
|
||||
- [x] 2.1 Allocation equality for single records, host allocations and job allocations, with an optional first-difference description
|
||||
- Write the tests first: a match; a mismatch on each compared field (resource name, reserve, value, duration, reservation start time) with the expected description; an allocation-instance-id difference still compares equal; host name, entry order and list length matter; job id, ordered hosts, ordered shared resources and list-length mismatches; NULL handling at the top level, in list entries and in string fields; no description requested; no description returned when equal.
|
||||
- Add a wrapped description-allocation failure to the existing allocation OOM test binary (bug-1882) and test that a failed description leaves no description and the same result.
|
||||
|
|
@ -19,7 +19,7 @@ Test-first throughout (red → green → refactor). Every sub-task leaves the bu
|
|||
- Done when the new tests pass, the existing allocation and allocation-OOM tests still pass, and every test frees the descriptions it receives (clean under ASAN/LeakSanitizer).
|
||||
- _Requirements: 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 6.4, 6.6_
|
||||
- _Boundary: libxce allocation module_
|
||||
- [ ] 2.2 Full-match pending-reason equality with an optional first-difference description
|
||||
- [x] 2.2 Full-match pending-reason equality with an optional first-difference description
|
||||
- Write the tests first: a match; main-reason mismatch; host-based reason list mismatch per field, order and length; resource-based reason list mismatch per field, order and length; NULL handling at the top level, in list entries and in string fields; each with the expected description; no description requested; no description returned when equal; a failed description allocation (in the allocation OOM test binary, which already wraps the formatter after 2.1) leaves no description and the same result.
|
||||
- Implement the full structural match in the pending-reason module per design.md (Components: Pending-reason equality, Decision 3), enabling the GNU extension the description formatter needs.
|
||||
- Document in the public header the full-match contract, NULL/order semantics, the malformed-record precondition, the description ownership, and that the simulator deliberately uses a main-reason-only check instead (bug-1845).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue