cr_stub_test: 16143 checks, 0 failed
USB Record on: device: 18 bytes, misc / IAD class, bcdDevice 3.22              ok
USB Record on: configuration: wTotalLength = the 208 bytes sent                ok
USB Record on: descriptor lengths, endpoints per interface                     ok
USB Record on: 4 interfaces numbered 0.. in order = bNumInterfaces             ok
USB Record on: IADs (2) start at the next interface; AC headers list existing streams ok
USB Record on: MIDI on EP1 OUT / IN, no console                                ok
USB Record on: the recording on (IF 3)                                         ok
USB Record on: format (6 x PCM16, 44.1 kHz) and packet size; no playback (OUT, feedback, format) ok
USB Record on: 208 bytes, 4 interfaces (MIDI 0-1, the recording 2-3)           ok
USB Record off (the console): device: 18 bytes, misc / IAD class, bcdDevice 3.21 ok
USB Record off (the console): configuration: wTotalLength = the 175 bytes sent ok
USB Record off (the console): descriptor lengths, endpoints per interface      ok
USB Record off (the console): 4 interfaces numbered 0.. in order = bNumInterfaces ok
USB Record off (the console): IADs (2) start at the next interface; AC headers list existing streams ok
USB Record off (the console): MIDI on EP1 OUT / IN, the console (CDC) present  ok
USB Record off (the console): the recording off (IF -1)                        ok
USB Record off (the console): format (6 x PCM16, 44.1 kHz) and packet size; no playback (OUT, feedback, format) ok
strings: the product "ChoralRoot FM-1" (the MIDI port), the maker              ok
strings: the device "ChoralRoot In" (3), and its IAD and control interface name it ok
strings: the channel names 4..9, none after                                    ok
the In terminal names its channels from string 4                               ok
capture: the six staged channels into the ring as they are                     ok
the host closed the stream during the block (alternate 0): nothing captured    ok
capture packets: silence until the ring holds its target                       ok
capture packets: PCM16 LE, frames of master L R, CHORD L R, BASS L R           ok
I2S 44117.6 Hz, 20 s, renders at random times: no glitch after 2 s (0)         ok
  every frame once and in order (882099 frames)                                ok
  fill: 189..409 of 512 (a packet: 45, a block: 32)                            ok
  capture 44.105 frames a packet (I2S 44.118 / ms)                             ok
I2S 44070.0 Hz, 20 s, renders at random times: no glitch after 2 s (0)         ok
  every frame once and in order (881304 frames)                                ok
  fill: 111..271 of 512 (a packet: 45, a block: 32)                            ok
  capture 44.065 frames a packet (I2S 44.070 / ms)                             ok
the host stops reading for 50 ms: overrun counted, re-primed                   ok
  it runs again in order, no glitch after                                      ok
hand-off, 10 s: 440830 frames in 9999 packets, none twice (0), none skipped (0), under 0 over 0 ok
QuickTime 60 s, producer 44117.6 Hz: 2646933 frames, longest silence 0, under 0 over 0, fill 323 ok
  packet lengths near nominal: at most 10 44-frame packets in a row (<= 21)    ok
QuickTime 60 s, producer 44144.1 Hz: 2648500 frames, longest silence 0, under 0 over 0, fill 341 ok
  packet lengths near nominal: at most 10 44-frame packets in a row (<= 21)    ok
QuickTime 60 s, producer 44055.9 Hz: 2643383 frames, longest silence 0, under 0 over 0, fill 167 ok
  packet lengths near nominal: at most 30 44-frame packets in a row (<= 31)    ok
QuickTime 60 s, producer 44100.0 Hz: 2645998 frames, longest silence 0, under 0 over 0, fill 199 ok
  packet lengths near nominal: at most 10 44-frame packets in a row (<= 21)    ok
device model, no service during a 1500 us render: the host gets 756/1000 of the frames, 692 overruns (the bug) ok
  + the audio ISR's paced service, render 300 us: 997/1000, 0 overruns         ok
  + nested TIMER5 as well, render 300 us: 997/1000, 0 overruns                 ok
  + the audio ISR's paced service, render 1500 us: 997/1000, 0 overruns        ok
  + nested TIMER5 as well, render 1500 us: 997/1000, 0 overruns                ok
  + the audio ISR's paced service, render 2500 us: 997/1000, 0 overruns        ok
  + nested TIMER5 as well, render 2500 us: 997/1000, 0 overruns                ok
held (the host not reading yet): the ring is not fed, no overrun               ok
  then fed: primed and playing, no overrun                                     ok
packets byte for byte, 30 s: 1323273 frames of 6 channels, 0 wrong, 0 bad lengths, nudges +406 -0 ok
cr_usbaudio: 54 passed, 0 failed
PASS: official CPU1 rails, VDC14 first, bounded one-step ramp, caps, no lowering, VDDIO untouched
uart: running status, realtime, SysEx, system common ok
clock: timestamps and USB/TRS source, no active sensing ok
uart: channels 1, 2, 3, 10, 16 -> USB-MIDI packets   ok
usb: ota_wire_send packets (CIN 4.. then 5/6/7)      ok
usb: received frame == the bytes between F0 and F7   ok
usb: a frame while one is pending is dropped         ok
usb: a truncated frame is replaced by the next one   ok
usb: an oversized frame (698 B) is not taken         ok
usb: soft key -> uboot_req, not a frame              ok
usb: upgrade key -> ota_req, not a frame             ok
usb: bytes outside F0..F7 are ignored                ok
usb: send with a full ring and no host fails at once ok
usb: send with a full ring times out (200 ms)        ok
midi parser test passed
PASS: corrupted CPU1 mailbox rejected, zero callback executions, completion returned for CPU0 reset
stub_pkg_test: 265 checks, 0 failed
Created SYNTHETIC host fixtures; no executable device firmware.
  rc 0, 1149 requests, 83 sector erases
install completes                                        ok
app area == the new package's flash.bin                  ok
flash head [0, 0x4000) untouched                         ok
finish asked (0xF0000000)                                ok
update record cleared (RAM + flash)                      ok
no write outside the allowed windows                     ok
re-run with the same package erases nothing              ok
foreign key / damaged app head refused, nothing erased   ok
stub: the staged loader passes its check                 ok
install -> boot: the record gone, the staged loader kept and whole ok
.. the stub boots the app                                ok
.. with OCT- held: that loader, one attempt counted      ok
.. a second arrival with the key and no boot between: UBOOT ok
interruption model: a power cut after every erase and every programmed page
  no stub (0.16 layout) -> stub       1378 cut points: 1360 rescue, 1 boot (the end), 1 old firmware whole, 16 UNPROTECTED (cuts 2..17); 1149 requests  ok
SAME_STUB carries the new package's stub sector, byte for byte ok
.. and another body                                      ok
  same stub, another body -> stub     1361 cut points: 1360 rescue, 1 boot (the end), 0 old firmware whole,  0 UNPROTECTED; 1149 requests  ok
the dark unit's state holds no stub                      ok
  the dark unit (33 new, then old)    1378 cut points: 1360 rescue, 1 boot (the end), 0 old firmware whole, 17 UNPROTECTED (cuts 1..17); 1149 requests  ok
the same cut (33 sectors in) with a stub in place: rescue, the loader ok
OLD_STUB: a marker, another stub sector, another body    ok
.. its directory (0x4000..0x411F) is the new package's: only the stub's bytes differ ok
  an earlier stub -> this stub        1378 cut points: 1361 rescue, 1 boot (the end), 0 old firmware whole, 16 UNPROTECTED (cuts 2..17); 1149 requests  ok
loader test passed
handshake answered                                   ok
identity frame is FM-1_900                           ok
  14 requests
session commits                                      ok
headers + loader + confirm, no head reads            ok
staged body == the package's loader                  ok
LOADER.BIN head CRC                                  ok
record at 0xE4F00 == RAM record                      ok
record CRC / type / magic / ota_addr                 ok
nothing written outside 0xE0000..0xE4FFF             ok
stub: the staged loader passes its check             ok
stub: its record == the committed one                ok
ota_staged == the stub's answer, the staged length   ok
our loader ends below the record's sector            ok
boot: the loader kept, the record's sector erased (rc 2) ok
second boot: nothing to do, the loader still passes  ok
step 1 over a kept loader: commits, staged again     ok
a package refused before the erase (-7): the kept loader stays ok
no 'success' over a kept loader: -13, the area erased ok
stub: no head (staging not finished) -> refused      ok
boot: a staging without its head is erased (rc 1)    ok
stub: erased from half way on -> refused             ok
boot: a torn loader is erased                        ok
boot: a record alone is erased                       ok
fixture: the own-loader signature found              ok
boot: not Felucca's loader is erased                 ok
a loader into the record's sector: kept, and the record with it (rc 0) ok
  10822 of 20000 damaged copies still pass both checks (block contents are not checked)
ota_staged == stub_loader_check on 20000 damaged copies ok
host gone -> no commit, area clean                   ok
no 'success' -> -13, no commit, area clean           ok
ota test passed
