feat(libxce-alloc-preason-equality): public alloc_eq/host_alloc_eq/job_alloc_eq with first-difference description (task 2.1)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
8f25c1c3f3
commit
a6cbb323b0
6 changed files with 952 additions and 5 deletions
|
|
@ -10,7 +10,7 @@ Test-first throughout (red → green → refactor). Every sub-task leaves the bu
|
|||
- _Requirements: 1.5, 2.3_
|
||||
|
||||
- [ ] 2. Core: public equality API in libxce
|
||||
- [ ] 2.1 Allocation equality for single records, host allocations and job allocations, with an optional first-difference description
|
||||
- [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.
|
||||
- Implement the three comparisons in the allocation module with the field order, exact value comparison, description path format and ownership contract of design.md (Data Models, Components: Allocation equality, Decision 9), enabling the GNU extension the description formatter needs.
|
||||
|
|
@ -87,3 +87,4 @@ Test-first throughout (red → green → refactor). Every sub-task leaves the bu
|
|||
|
||||
## Implementation Notes
|
||||
- `xce-build.sh` resolves a relative build dir under `src/`: `bash src/tools/xce-build.sh lib asan xce.build.alloceq` builds into `src/xce.build.alloceq`, so iterate with `meson test -C src/xce.build.alloceq`.
|
||||
- `xce-build.sh lib` runs only the `libxce test` binary; run `meson test -C src/xce.build.alloceq "libxce alloc OOM test"` (or plain `meson test`) for the allocation OOM binary, which also wraps `vasprintf`/`__vasprintf_chk` since 2.1.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue