Change details: the length cut never hides observed bytes (v2.7.5)
- a record whose FCP understates the layout (the reported case: record_len 2 while the READ RECORD carried P3=0x2C and returned 44 bytes) had its rows cut to two cells by the v2.7.3 length rule, hiding 42 newly-observed bytes while the summary still counted them - the filler now stops at the known length only while the data fits inside it; beyond that — and when the length is unknown or absent — the row ends at the data, so nothing observed is ever hidden and no bytes are invented - verified on the live payload (session 55, 5f3a/4f09 change 0): before = 2 cells, both changed; after = 16+16+12 cells with 2 changed and 42 newly observed, matching the summary line - tests: the regression case (a 2-byte record_len with a 44-byte read) and the unknown-length case, whose row now ends at the data; 527 Python + 76 Node tests - PWA_VERSION/pyproject/version.py 2.7.5, SW cache simtrace-analyser-v85
This commit is contained in:
1 parent
06c6e952a9
commit
1df52a34e5
6 files changed
+23
-8
No files matched your search
@@ -332,9 +332,18 @@ test('Files view: the hex rows stop at the known length (no filler)', () => {
|
||||
assert.equal(rec.rows[0].cells.length, 9);
|
||||
assert.equal(rec.rows[0].cells.filter(c => c.cls === 'hex-unknown').length, 5);
|
||||
assert.deepEqual(rec.used, {changed: true, fresh: false, unknown: true});
|
||||
// Without a known length the old row padding stays (nothing better to do).
|
||||
// Without a known length the row ends at the data — no invented bytes.
|
||||
const noSize = hexImageRows([{offset: 0, hex: 'aabb'}], [], [], undefined, null);
|
||||
assert.equal(noSize.rows[0].cells.length, 16);
|
||||
assert.equal(noSize.rows[0].cells.length, 2);
|
||||
// A card whose FCP understates the layout (a 2-byte record_len for a
|
||||
// 44-byte read) must still show every observed byte, not two per row.
|
||||
const wide = hexImageRows(
|
||||
[{offset: 0, hex: 'aa'.repeat(44)}], [[0, 2]], [[2, 42]], undefined, 2);
|
||||
assert.deepEqual(wide.rows.map(r => r.cells.length), [16, 16, 12]);
|
||||
assert.equal(wide.rows[0].cells[0].cls, 'hex-changed');
|
||||
assert.equal(wide.rows[0].cells[2].cls, 'hex-new');
|
||||
assert.equal(wide.used.changed, true);
|
||||
assert.equal(wide.used.fresh, true);
|
||||
});
|
||||
|
||||
test('Files view: the hex image respects the row limit', () => {
|
||||
|
||||
Reference in new issue
Block a user