Commit 917d728
Shreyansh Sancheti
parity: add LCOW document permutation tests
Add TestLCOWDocumentParityPermutations to exercise annotation and option
combinations that trigger different document construction branches in the
legacy and v2 LCOW pipelines. Each test sets all required fields so
comparisons check real values rather than defaults.
Permutation categories:
- CPU partial combinations (count, limit, weight)
- Memory (overcommit disabled, cold discard hint)
- Boot mode (kernel direct + VHD rootfs)
- Feature flags (scratch encryption, writable overlay)
- Device interactions (VPMem disabled → 4 SCSI controllers)
- Cross-group (physically backed + VPMem + encryption)
- Shim option overrides (annotation CPU/memory priority)
- Kernel args (VPCIEnabled, time sync, process dump, initrd boot)
Gap tests document three known v2 builder differences:
- No CPUGroupID: legacy nil vs v2 empty CpuGroup struct
- No StorageQoS: legacy nil vs v2 empty StorageQoS struct
- Initrd boot: legacy VPMem controller vs v2 nil VirtualPMem
Gap tests use inverted assertions — they expect a diff and only fail if
documents unexpectedly match, signaling the v2 bug was fixed.
Also adds normalizeKernelCmdLine and isOnlyKernelCmdLineWhitespaceDiff
helpers to handle a known legacy quirk where initrd+KernelDirect boot
produces a leading space in kernel command lines that v2 correctly omits.
Signed-off-by: Shreyansh Sancheti <shsancheti@microsoft.com>1 parent b6a131c commit 917d728
2 files changed
Lines changed: 414 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| 16 | + | |
| 17 | + | |
15 | 18 | | |
16 | 19 | | |
17 | 20 | | |
| |||
111 | 114 | | |
112 | 115 | | |
113 | 116 | | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
0 commit comments