Unit-test console output — fprime-community/fprime-samd@v0.1.0

passed 8 passed · 0.87s · ← back to the module list · plain text
passedfprime-samd_Drv_AdcDriver_ut_exe0.13s
[STest::Random] Generated seed 569149 from system time
[==========] Running 21 tests from 4 test suites.
[----------] Global test environment set-up.
[----------] 5 tests from Configure
[ RUN      ] Configure.Configure

***************************************
configure() initializes ADC with all parameters and calls sync waits
***************************************

***************************************
(RQ)       SAMD21-ADC-001: The AdcDriver shall configure the ADC peripheral with configurable voltage reference, resolution, hardware averaging, sampling time, and gain
***************************************
[       OK ] Configure.Configure (0 ms)
[ RUN      ] Configure.AllReferences

***************************************
configure() works with all voltage reference options
***************************************

***************************************
(RQ)       SAMD21-ADC-001: The AdcDriver shall configure the ADC peripheral with configurable voltage reference
***************************************
[       OK ] Configure.AllReferences (0 ms)
[ RUN      ] Configure.AllResolutions

***************************************
configure() works with all resolution options (8/10/12-bit)
***************************************

***************************************
(RQ)       SAMD21-ADC-001: The AdcDriver shall configure the ADC peripheral with configurable resolution
***************************************
[       OK ] Configure.AllResolutions (0 ms)
[ RUN      ] Configure.AllSampleCounts

***************************************
configure() works with all hardware averaging sample counts
***************************************

***************************************
(RQ)       SAMD21-ADC-001: The AdcDriver shall configure the ADC peripheral with configurable hardware averaging
***************************************
[       OK ] Configure.AllSampleCounts (0 ms)
[ RUN      ] Configure.AllGains

***************************************
configure() works with all gain options (1X and DIV2)
***************************************

***************************************
(RQ)       SAMD21-ADC-001: The AdcDriver shall configure the ADC peripheral with configurable gain
***************************************
[       OK ] Configure.AllGains (0 ms)
[----------] 5 tests from Configure (0 ms total)

[----------] 1 test from ConfigureChannel
[ RUN      ] ConfigureChannel.Comprehensive

***************************************
configureChannel() handles external channels, internal channels (TEMP, BANDGAP), and SCALEDIOVCC
***************************************

***************************************
(RQ)       SAMD21-ADC-002: The AdcDriver shall bind a readAdc port index to a physical ADC input channel via configureChannel
***************************************
[       OK ] ConfigureChannel.Comprehensive (0 ms)
[----------] 1 test from ConfigureChannel (0 ms total)

[----------] 8 tests from Conversion
[ RUN      ] Conversion.NotConfigured

***************************************
readAdc() before configure() returns NOT_CONFIGURED
***************************************

***************************************
(RQ)       SAMD21-ADC-004: The AdcDriver shall return ADC_NOT_CONFIGURED from readAdc without touching hardware if the peripheral is not configured
***************************************
[       OK ] Conversion.NotConfigured (0 ms)
[ RUN      ] Conversion.ChannelNotConfigured

***************************************
readAdc() on unconfigured channel returns INVALID_CHANNEL
***************************************

***************************************
(RQ)       SAMD21-ADC-004: The AdcDriver shall return ADC_INVALID_CHANNEL from readAdc without touching hardware if the requested port is not configured
***************************************
[       OK ] Conversion.ChannelNotConfigured (0 ms)
[ RUN      ] Conversion.Busy

***************************************
readAdc() while conversion pending returns BUSY
***************************************

***************************************
(RQ)       SAMD21-ADC-003: The AdcDriver shall return ADC_BUSY if a conversion is already in progress on any port
***************************************
[       OK ] Conversion.Busy (0 ms)
[ RUN      ] Conversion.Completion

***************************************
Full conversion flow: readAdc → ISR → activeIn → result delivery
***************************************

***************************************
(RQ)       SAMD21-ADC-003: The AdcDriver shall start an asynchronous conversion on readAdc
***************************************

***************************************
(RQ)       SAMD21-ADC-006: The AdcDriver shall deliver every conversion result from the main context (via activeIn), not from interrupt context
***************************************
[       OK ] Conversion.Completion (0 ms)
[ RUN      ] Conversion.MultipleChannels

***************************************
Sequential conversions across multiple channels with result delivery
***************************************

***************************************
(RQ)       SAMD21-ADC-002: The AdcDriver shall bind a readAdc port index to a physical ADC input channel via configureChannel
***************************************

***************************************
(RQ)       SAMD21-ADC-003: The AdcDriver shall start an asynchronous conversion on readAdc
***************************************
[       OK ] Conversion.MultipleChannels (0 ms)
[ RUN      ] Conversion.ResultBoundaries

***************************************
Conversion handling across full ADC range (0, mid, max)
***************************************

***************************************
(RQ)       SAMD21-ADC-006: The AdcDriver shall deliver every conversion result from the main context (via activeIn), not from interrupt context
***************************************
[       OK ] Conversion.ResultBoundaries (0 ms)
[ RUN      ] Conversion.BeforeComplete

***************************************
activeIn() called before ISR completes does not deliver premature result
***************************************

***************************************
(RQ)       SAMD21-ADC-006: The AdcDriver shall deliver a conversion result via activeIn only once the conversion has completed
***************************************
[       OK ] Conversion.BeforeComplete (0 ms)
[ RUN      ] Conversion.MultipleactiveInIdle

***************************************
Multiple activeIn() calls while idle do not produce spurious results
***************************************

***************************************
(RQ)       SAMD21-ADC-006: The AdcDriver shall deliver every conversion result exactly once from the main context (via activeIn)
***************************************
[       OK ] Conversion.MultipleactiveInIdle (0 ms)
[----------] 8 tests from Conversion (0 ms total)

[----------] 7 tests from Interrupt
[ RUN      ] Interrupt.ResultReady

***************************************
handleInterrupt() processes RESRDY flag and stores result
***************************************

***************************************
(RQ)       SAMD21-ADC-006: The AdcDriver shall deliver every conversion result from the main context (via activeIn), not from interrupt context
***************************************
[       OK ] Interrupt.ResultReady (0 ms)
[ RUN      ] Interrupt.Overrun

***************************************
handleInterrupt() handles OVERRUN flag and still delivers result
***************************************

***************************************
(RQ)       SAMD21-ADC-005: The AdcDriver shall report an overrun (ADC_OVERRUN) if the result register was not read before the next conversion completed
***************************************
[       OK ] Interrupt.Overrun (0 ms)
[ RUN      ] Interrupt.BothFlags

***************************************
handleInterrupt() correctly handles both OVERRUN and RESRDY flags
***************************************

***************************************
(RQ)       SAMD21-ADC-005: The AdcDriver shall report an overrun (ADC_OVERRUN) if the result register was not read before the next conversion completed
***************************************
[       OK ] Interrupt.BothFlags (0 ms)
[ RUN      ] Interrupt.NoFlags

***************************************
handleInterrupt() with no flags set (spurious interrupt) is handled safely
***************************************

***************************************
(RQ)       SAMD21-ADC-007: The AdcDriver shall ignore spurious interrupts (flags clear with a conversion requested) without corrupting driver state
***************************************
[       OK ] Interrupt.NoFlags (0 ms)
[ RUN      ] Interrupt.MultipleTimes

***************************************
handleInterrupt() firing multiple times with same result
***************************************

***************************************
(RQ)       SAMD21-ADC-007: The AdcDriver shall ignore repeated interrupts for an already-latched result without corrupting driver state
***************************************
[       OK ] Interrupt.MultipleTimes (0 ms)
[ RUN      ] Interrupt.WithoutPendingConversion

***************************************
handleInterrupt() without pending conversion (spurious) does not deliver result
***************************************

***************************************
(RQ)       SAMD21-ADC-007: The AdcDriver shall ignore spurious interrupts (no conversion pending) without corrupting driver state
***************************************
[       OK ] Interrupt.WithoutPendingConversion (0 ms)
[ RUN      ] Interrupt.SpuriousWithOverrun

***************************************
handleInterrupt() spurious interrupt with overrun flag clears flags and doesn't corrupt state
***************************************

***************************************
(RQ)       SAMD21-ADC-007: The AdcDriver shall ignore spurious interrupts (flags set with nothing requested) without corrupting driver state
***************************************
[       OK ] Interrupt.SpuriousWithOverrun (0 ms)
[----------] 7 tests from Interrupt (0 ms total)

[----------] Global test environment tear-down
[==========] 21 tests from 4 test suites ran. (2 ms total)
[  PASSED  ] 21 tests.
passedfprime-samd_Drv_RtcDriver_ut_exe0.02s
[STest::Random] Generated seed 606393 from system time
[==========] Running 10 tests from 2 test suites.
[----------] Global test environment set-up.
[----------] 9 tests from Nominal
[ RUN      ] Nominal.testConfigure

***************************************
(RQ)       SAMD21-RTC-001: The RtcDriver shall configure the RTC peripheral for periodic interrupts
***************************************

***************************************
(RQ)       SAMD21-RTC-002: The RtcDriver shall support configurable interrupt periods (1-128 Hz)
***************************************

***************************************
(RQ)       SAMD21-RTC-005: The RtcDriver shall support internal, external, and ULP clock sources
***************************************
[       OK ] Nominal.testConfigure (0 ms)
[ RUN      ] Nominal.testEnable

***************************************
(RQ)       SAMD21-RTC-001: The RtcDriver shall configure the RTC peripheral for periodic interrupts
***************************************
[       OK ] Nominal.testEnable (0 ms)
[ RUN      ] Nominal.testCycle

***************************************
(RQ)       SAMD21-RTC-004: The RtcDriver shall detect RTC interrupts via activeIn port
***************************************

***************************************
(RQ)       SAMD21-RTC-006: The RtcDriver shall emit cycle signals via the CycleOut port
***************************************
[       OK ] Nominal.testCycle (0 ms)
[ RUN      ] Nominal.testMultipleCycles

***************************************
(RQ)       SAMD21-RTC-004: The RtcDriver shall detect RTC interrupts via activeIn port
***************************************

***************************************
(RQ)       SAMD21-RTC-006: The RtcDriver shall emit cycle signals via the CycleOut port
***************************************
[       OK ] Nominal.testMultipleCycles (0 ms)
[ RUN      ] Nominal.testTimeNow

***************************************
(RQ)       SAMD21-RTC-007: The RtcDriver shall provide an Os::RawTime implementation
***************************************
[       OK ] Nominal.testTimeNow (0 ms)
[ RUN      ] Nominal.testTimeNowUnconfigured

***************************************
(RQ)       SAMD21-RTC-007: The RtcDriver shall provide an Os::RawTime implementation (zero time when unconfigured)
***************************************
[       OK ] Nominal.testTimeNowUnconfigured (0 ms)
[ RUN      ] Nominal.testTimeNowFunction

***************************************
(RQ)       SAMD21-RTC-007: The RtcDriver shall provide an Os::RawTime implementation (timeNow() derives time from the tick counter and hardware counter)
***************************************
[       OK ] Nominal.testTimeNowFunction (0 ms)
[ RUN      ] Nominal.testSamd21RawTimeNow

***************************************
(RQ)       SAMD21-RTC-007: The RtcDriver shall provide an Os::RawTime implementation (Samd21RawTime::now() populates the handle)
***************************************
[       OK ] Nominal.testSamd21RawTimeNow (0 ms)
[ RUN      ] Nominal.testSamd21RawTimeSerialization

***************************************
(RQ)       SAMD21-RTC-007: The RtcDriver shall provide an Os::RawTime implementation (Samd21RawTime serializes and deserializes in both endiannesses)
***************************************
[       OK ] Nominal.testSamd21RawTimeSerialization (0 ms)
[----------] 9 tests from Nominal (1 ms total)

[----------] 1 test from OffNominal
[ RUN      ] OffNominal.testCycleOverrun

***************************************
(RQ)       SAMD21-RTC-008: The RtcDriver shall detect when processing exceeds the configured period
***************************************
[       OK ] OffNominal.testCycleOverrun (0 ms)
[----------] 1 test from OffNominal (0 ms total)

[----------] Global test environment tear-down
[==========] 10 tests from 2 test suites ran. (1 ms total)
[  PASSED  ] 10 tests.
passedfprime-samd_Drv_UsartDriver_ut_exe0.36s
[STest::Random] Generated seed 627646 from system time
[==========] Running 18 tests from 6 test suites.
[----------] Global test environment set-up.
[----------] 3 tests from Configure
[ RUN      ] Configure.Nominal

***************************************
configure() programs the SERCOM once and announces readiness
***************************************

***************************************
(RQ)       SAMD21-UART-001: The UsartDriver shall configure SERCOM peripherals for USART operation
***************************************
[       OK ] Configure.Nominal (1 ms)
[ RUN      ] Configure.AllParameters

***************************************
configure() forwards every format parameter to the HAL
***************************************

***************************************
(RQ)       SAMD21-UART-001: The UsartDriver shall configure SERCOM peripherals with configurable baud rates, data formats, parity, stop bits, bit ordering, communication modes, and clock sources
***************************************
[       OK ] Configure.AllParameters (0 ms)
[ RUN      ] Configure.QueuesRxBuffers

***************************************
configure() primes both RX buffers into the RX DMA channel
***************************************

***************************************
(RQ)       SAMD21-UART-002: The UsartDriver shall use DMA for both transmission and reception
***************************************

***************************************
(RQ)       SAMD21-UART-003: The UsartDriver shall implement double-buffering for continuous RX
***************************************
[       OK ] Configure.QueuesRxBuffers (0 ms)
[----------] 3 tests from Configure (2 ms total)

[----------] 4 tests from Send
[ RUN      ] Send.Nominal

***************************************
send() enqueues a TX DMA transaction with correct descriptors
***************************************

***************************************
(RQ)       SAMD21-UART-002: The UsartDriver shall use DMA for both transmission and reception
***************************************

***************************************
(RQ)       SAMD21-UART-005: The UsartDriver shall queue TX requests with asynchronous completion
***************************************
[       OK ] Send.Nominal (0 ms)
[ RUN      ] Send.QueueFull

***************************************
send() returns SEND_RETRY once the TX queue is full
***************************************

***************************************
(RQ)       SAMD21-UART-005: The UsartDriver shall queue TX requests with asynchronous completion (a full queue returns SEND_RETRY)
***************************************
[       OK ] Send.QueueFull (0 ms)
[ RUN      ] Send.Completion

***************************************
TX DMA completion returns the buffer OP_OK via activeIn
***************************************

***************************************
(RQ)       SAMD21-UART-005: The UsartDriver shall queue TX requests with asynchronous completion (the buffer is returned OP_OK from the main context)
***************************************
[       OK ] Send.Completion (0 ms)
[ RUN      ] Send.ChannelError

***************************************
TX DMA bus error asserts (invalid buffer pointer handed to DMA)
***************************************

***************************************
(RQ)       SAMD21-UART-002: The UsartDriver shall use DMA for transmission (an unrecoverable TX DMA bus error asserts)
***************************************
[       OK ] Send.ChannelError (169 ms)
[----------] 4 tests from Send (171 ms total)

[----------] 1 test from SendSync
[ RUN      ] SendSync.Nominal

***************************************
sendSync() transmits synchronously through the HAL with no DMA
***************************************

***************************************
(RQ)       SAMD21-UART-006: The UsartDriver shall provide synchronous blocking transmission for early boot diagnostics
***************************************
[       OK ] SendSync.Nominal (0 ms)
[----------] 1 test from SendSync (0 ms total)

[----------] 7 tests from Rx
[ RUN      ] Rx.SchedInNoData

***************************************
schedIn with no new bytes forwards nothing downstream
***************************************

***************************************
(RQ)       SAMD21-UART-004: The UsartDriver shall poll the in-progress RX transfer on each rate group tick (no new bytes yields no signal and no recv)
***************************************
[       OK ] Rx.SchedInNoData (0 ms)
[ RUN      ] Rx.SchedInPartial

***************************************
schedIn forwards newly-received bytes and emits RxPartial
***************************************

***************************************
(RQ)       SAMD21-UART-004: The UsartDriver shall poll the in-progress RX transfer on each rate group tick to extract partial RX frames
***************************************
[       OK ] Rx.SchedInPartial (0 ms)
[ RUN      ] Rx.MultiplePartials

***************************************
successive partials advance the processed offset
***************************************

***************************************
(RQ)       SAMD21-UART-004: The UsartDriver shall poll the in-progress RX transfer on each rate group tick (repeated partials advance the buffer offset)
***************************************
[       OK ] Rx.MultiplePartials (0 ms)
[ RUN      ] Rx.BufferDone

***************************************
a completed RX buffer forwards the full buffer and emits RxFull
***************************************

***************************************
(RQ)       SAMD21-UART-003: The UsartDriver shall implement double-buffering for continuous RX (a full buffer drains its remainder)
***************************************
[       OK ] Rx.BufferDone (0 ms)
[ RUN      ] Rx.BufferFlip

***************************************
the active RX buffer flips A->B->A on completion
***************************************

***************************************
(RQ)       SAMD21-UART-003: The UsartDriver shall implement double-buffering for continuous RX (the active buffer flips A->B->A on completion)
***************************************
[       OK ] Rx.BufferFlip (0 ms)
[ RUN      ] Rx.RecvReturnIn

***************************************
recvReturnIn is a no-op; buffers remain owned by the DMA
***************************************

***************************************
(RQ)       SAMD21-UART-003: The UsartDriver shall implement double-buffering for continuous RX (returned buffers stay in the DMA chain)
***************************************
[       OK ] Rx.RecvReturnIn (0 ms)
[ RUN      ] Rx.ChannelError

***************************************
RX DMA bus error asserts (invalid buffer pointer handed to DMA)
***************************************

***************************************
(RQ)       SAMD21-UART-002: The UsartDriver shall use DMA for reception (an unrecoverable RX DMA bus error asserts)
***************************************
[       OK ] Rx.ChannelError (156 ms)
[----------] 7 tests from Rx (159 ms total)

[----------] 2 tests from Unconfigured
[ RUN      ] Unconfigured.SchedIn

***************************************
schedIn before configure() is a safe no-op
***************************************

***************************************
(RQ)       SAMD21-UART-004: The UsartDriver shall poll the in-progress RX transfer on each rate group tick (a tick before configure() is a no-op)
***************************************
[       OK ] Unconfigured.SchedIn (0 ms)
[ RUN      ] Unconfigured.ActiveIn

***************************************
activeIn before configure() is a safe no-op
***************************************

***************************************
(RQ)       SAMD21-UART-005: The UsartDriver shall queue TX requests with asynchronous completion (an activeIn tick before configure() delivers nothing)
***************************************
[       OK ] Unconfigured.ActiveIn (0 ms)
[----------] 2 tests from Unconfigured (0 ms total)

[----------] 1 test from TriggerSource
[ RUN      ] TriggerSource.Mapping

***************************************
each SERCOM maps to its matching RX DMA trigger source
***************************************

***************************************
(RQ)       SAMD21-UART-002: The UsartDriver shall use DMA for both transmission and reception (the correct DMA trigger is selected per SERCOM)
***************************************
[       OK ] TriggerSource.Mapping (0 ms)
[----------] 1 test from TriggerSource (0 ms total)

[----------] Global test environment tear-down
[==========] 18 tests from 6 test suites ran. (336 ms total)
[  PASSED  ] 18 tests.
passedfprime-samd_Drv_I2cDriver_ut_exe0.09s
[STest::Random] Generated seed 996187 from system time
[==========] Running 39 tests from 10 test suites.
[----------] Global test environment set-up.
[----------] 3 tests from Configure
[ RUN      ] Configure.Nominal

***************************************
configure() programs the SERCOM once with the requested parameters
***************************************

***************************************
(RQ)       SAMD21-I2C-001: The I2cDriver shall configure a SERCOM peripheral for I2C host operation
***************************************
[       OK ] Configure.Nominal (3 ms)
[ RUN      ] Configure.AllParameters

***************************************
configure() forwards every parameter to the HAL
***************************************

***************************************
(RQ)       SAMD21-I2C-001: The I2cDriver shall configure a SERCOM peripheral for I2C host operation with configurable SCL frequency, SDA hold, and pin usage
***************************************
[       OK ] Configure.AllParameters (1 ms)
[ RUN      ] Configure.RegistersIsr

***************************************
configure() registers the component's ISR trampoline
***************************************

***************************************
(RQ)       SAMD21-I2C-001: The I2cDriver shall configure a SERCOM peripheral for I2C host operation (the driver's ISR trampoline is registered for its SERCOM)
***************************************
[       OK ] Configure.RegistersIsr (1 ms)
[----------] 3 tests from Configure (5 ms total)

[----------] 3 tests from Read
[ RUN      ] Read.Nominal

***************************************
read() queues an RX DMA transfer and kicks off the peripheral
***************************************

***************************************
(RQ)       SAMD21-I2C-002: The I2cDriver shall perform 7-bit-addressed read transactions using DMA for the data payload
***************************************
[       OK ] Read.Nominal (1 ms)
[ RUN      ] Read.Completion

***************************************
RX DMA completion returns the buffer OK and frees the driver
***************************************

***************************************
(RQ)       SAMD21-I2C-002: The I2cDriver shall perform 7-bit-addressed read transactions using DMA for the data payload
***************************************

***************************************
(RQ)       SAMD21-I2C-006: The I2cDriver shall deliver every completion callback from the main context (via activeIn), not from interrupt context
***************************************
[       OK ] Read.Completion (1 ms)
[ RUN      ] Read.Busy

***************************************
read() while busy is rejected with OTHER_ERR
***************************************

***************************************
(RQ)       SAMD21-I2C-005: The I2cDriver shall reject a new request that arrives while a transaction is in progress, returning I2C_OTHER_ERR on the matching completion callback
***************************************
[       OK ] Read.Busy (1 ms)
[----------] 3 tests from Read (3 ms total)

[----------] 3 tests from Write
[ RUN      ] Write.Nominal

***************************************
write() queues a TX DMA transfer with an automatic STOP
***************************************

***************************************
(RQ)       SAMD21-I2C-002: The I2cDriver shall perform 7-bit-addressed write transactions using DMA for the data payload
***************************************
[       OK ] Write.Nominal (0 ms)
[ RUN      ] Write.Completion

***************************************
TX DMA completion returns the buffer OK and frees the driver
***************************************

***************************************
(RQ)       SAMD21-I2C-002: The I2cDriver shall perform 7-bit-addressed write transactions using DMA for the data payload
***************************************

***************************************
(RQ)       SAMD21-I2C-006: The I2cDriver shall deliver every completion callback from the main context (via activeIn), not from interrupt context
***************************************
[       OK ] Write.Completion (1 ms)
[ RUN      ] Write.Busy

***************************************
write() while busy is rejected with OTHER_ERR
***************************************

***************************************
(RQ)       SAMD21-I2C-005: The I2cDriver shall reject a new request that arrives while a transaction is in progress, returning I2C_OTHER_ERR on the matching completion callback
***************************************
[       OK ] Write.Busy (0 ms)
[----------] 3 tests from Write (3 ms total)

[----------] 6 tests from WriteRead
[ RUN      ] WriteRead.Nominal

***************************************
writeRead() queues both DMA transfers and writes without a STOP
***************************************

***************************************
(RQ)       SAMD21-I2C-002: The I2cDriver shall perform 7-bit-addressed combined write-read transactions using DMA for the data payload
***************************************

***************************************
(RQ)       SAMD21-I2C-003: The I2cDriver shall implement writeRead as a repeated START with no intervening STOP
***************************************
[       OK ] WriteRead.Nominal (1 ms)
[ RUN      ] WriteRead.FullSequence

***************************************
write-read walks write DMA -> master-on-bus -> read DMA -> OK
***************************************

***************************************
(RQ)       SAMD21-I2C-003: The I2cDriver shall implement writeRead as a repeated START with no intervening STOP
***************************************

***************************************
(RQ)       SAMD21-I2C-006: The I2cDriver shall deliver every completion callback from the main context (via activeIn), not from interrupt context
***************************************
[       OK ] WriteRead.FullSequence (1 ms)
[ RUN      ] WriteRead.Busy

***************************************
writeRead() while busy is rejected with OTHER_ERR
***************************************

***************************************
(RQ)       SAMD21-I2C-005: The I2cDriver shall reject a new request that arrives while a transaction is in progress, returning I2C_OTHER_ERR on the matching completion callback
***************************************
[       OK ] WriteRead.Busy (1 ms)
[ RUN      ] WriteRead.PointerNack

***************************************
a client NACK of the register pointer fails the write-read with WRITE_ERR, no read issued
***************************************

***************************************
(RQ)       SAMD21-I2C-004: The I2cDriver shall fail the in-flight transaction with the appropriate status (a NACKed register pointer fails the write-read with I2C_WRITE_ERR)
***************************************
[       OK ] WriteRead.PointerNack (1 ms)
[ RUN      ] WriteRead.MbAlreadyLatched

***************************************
MB already latched at write-DMA completion services the handoff inline (no lost edge)
***************************************

***************************************
(RQ)       SAMD21-I2C-003: The I2cDriver shall implement writeRead as a repeated START with no intervening STOP (the read half is kicked off even when MB is already latched)
***************************************
[       OK ] WriteRead.MbAlreadyLatched (1 ms)
[ RUN      ] WriteRead.MbAlreadyLatchedSpuriousIsr

***************************************
the stale SERCOM interrupt after an inline handoff is a benign no-op, not an assert
***************************************

***************************************
(RQ)       SAMD21-I2C-003: The I2cDriver shall implement writeRead as a repeated START with no intervening STOP (a stale SERCOM interrupt after the inline handoff is a benign no-op)
***************************************
[       OK ] WriteRead.MbAlreadyLatchedSpuriousIsr (1 ms)
[----------] 6 tests from WriteRead (7 ms total)

[----------] 8 tests from Isr
[ RUN      ] Isr.ErrorIdleUnexpected

***************************************
an error interrupt while IDLE logs the error and an unexpected warning
***************************************

***************************************
(RQ)       SAMD21-I2C-004: The I2cDriver shall report bus errors as events (an error with no transaction in flight also raises UnexpectedInterrupt)
***************************************
[       OK ] Isr.ErrorIdleUnexpected (1 ms)
[ RUN      ] Isr.ErrorDuringRead

***************************************
an error during a read aborts the DMA and replies READ_ERR
***************************************

***************************************
(RQ)       SAMD21-I2C-004: The I2cDriver shall report bus errors as events and fail the in-flight transaction with the appropriate status (I2C_READ_ERR during a read)
***************************************
[       OK ] Isr.ErrorDuringRead (1 ms)
[ RUN      ] Isr.ErrorDuringWrite

***************************************
an error during a write aborts the DMA and replies WRITE_ERR
***************************************

***************************************
(RQ)       SAMD21-I2C-004: The I2cDriver shall report bus errors as events and fail the in-flight transaction with the appropriate status (I2C_WRITE_ERR during a write)
***************************************
[       OK ] Isr.ErrorDuringWrite (1 ms)
[ RUN      ] Isr.ErrorDuringWriteReadWriting

***************************************
an error while writing a write-read aborts both channels, replies WRITE_ERR
***************************************

***************************************
(RQ)       SAMD21-I2C-004: The I2cDriver shall report bus errors as events and fail the in-flight transaction with the appropriate status (I2C_WRITE_ERR during the write half of a write-read)
***************************************
[       OK ] Isr.ErrorDuringWriteReadWriting (0 ms)
[ RUN      ] Isr.ErrorDuringWriteReadReading

***************************************
an error while reading a write-read aborts the read channel, replies READ_ERR
***************************************

***************************************
(RQ)       SAMD21-I2C-004: The I2cDriver shall report bus errors as events and fail the in-flight transaction with the appropriate status (I2C_READ_ERR during the read half of a write-read)
***************************************
[       OK ] Isr.ErrorDuringWriteReadReading (0 ms)
[ RUN      ] Isr.AllErrorFlags

***************************************
every error STATUS bit maps to its own event and increments the counter
***************************************

***************************************
(RQ)       SAMD21-I2C-004: The I2cDriver shall report bus errors as events and count them in telemetry
***************************************
[       OK ] Isr.AllErrorFlags (1 ms)
[ RUN      ] Isr.MasterOnBusUnexpected

***************************************
a master-on-bus interrupt outside write-read is flagged unexpected
***************************************

***************************************
(RQ)       SAMD21-I2C-004: The I2cDriver shall report an unexpected master-on-bus interrupt as an event
***************************************
[       OK ] Isr.MasterOnBusUnexpected (1 ms)
[ RUN      ] Isr.ErrorDuringWriteReadWaitDisablesMb

***************************************
an error while in WRITE_READ_WRITING_WAIT disables the armed MB interrupt (leak fix)
***************************************

***************************************
(RQ)       SAMD21-I2C-004: The I2cDriver shall fail the in-flight transaction with the appropriate status and return to service (the error path disables the armed MB interrupt)
***************************************
[       OK ] Isr.ErrorDuringWriteReadWaitDisablesMb (1 ms)
[----------] 8 tests from Isr (9 ms total)

[----------] 7 tests from StallWatchdog
[ RUN      ] StallWatchdog.NoRecoveryBeforeThreshold

***************************************
an in-flight transaction is not recovered until the tick threshold is reached
***************************************

***************************************
(RQ)       SAMD21-I2C-007: The I2cDriver shall force-recover a transaction whose completion interrupt is lost (only once the stall threshold is reached)
***************************************
[       OK ] StallWatchdog.NoRecoveryBeforeThreshold (1 ms)
[ RUN      ] StallWatchdog.RecoversWriteRead

***************************************
a write-read with a lost MB completion is force-recovered after the threshold
***************************************

***************************************
(RQ)       SAMD21-I2C-007: The I2cDriver shall force-recover a write-read whose completion interrupt is lost, reply to the caller with an error, and return to service
***************************************
[       OK ] StallWatchdog.RecoversWriteRead (1 ms)
[ RUN      ] StallWatchdog.RecoversRead

***************************************
a stuck read is force-recovered and the caller gets an error reply
***************************************

***************************************
(RQ)       SAMD21-I2C-007: The I2cDriver shall force-recover a stalled read, reply to the caller with an error, and return to service
***************************************
[       OK ] StallWatchdog.RecoversRead (1 ms)
[ RUN      ] StallWatchdog.RecoversWrite

***************************************
a stuck write is force-recovered and the caller gets an error reply
***************************************

***************************************
(RQ)       SAMD21-I2C-007: The I2cDriver shall force-recover a stalled write, reply to the caller with an error, and return to service
***************************************
[       OK ] StallWatchdog.RecoversWrite (1 ms)
[ RUN      ] StallWatchdog.ResetsWhenIdle

***************************************
ticks while IDLE never trigger a recovery
***************************************

***************************************
(RQ)       SAMD21-I2C-007: The I2cDriver shall force-recover only stalled transactions (an IDLE driver is never recovered)
***************************************
[       OK ] StallWatchdog.ResetsWhenIdle (1 ms)
[ RUN      ] StallWatchdog.ResetsOnCompletion

***************************************
a normal completion resets the stall counter so it does not spuriously recover
***************************************

***************************************
(RQ)       SAMD21-I2C-007: The I2cDriver shall force-recover only stalled transactions (the stall counter resets when a transaction completes normally)
***************************************
[       OK ] StallWatchdog.ResetsOnCompletion (1 ms)
[ RUN      ] StallWatchdog.RecoveryCountTelemetry

***************************************
StallRecoveryCount telemetry tracks the number of recoveries
***************************************

***************************************
(RQ)       SAMD21-I2C-007: The I2cDriver shall force-recover a stalled transaction and count the recovery in telemetry
***************************************
[       OK ] StallWatchdog.RecoveryCountTelemetry (1 ms)
[----------] 7 tests from StallWatchdog (9 ms total)

[----------] 3 tests from DmaReply
[ RUN      ] DmaReply.WrongChannelRead

***************************************
a WRITE-channel reply during a read is flagged InvalidDmaReply
***************************************

***************************************
(RQ)       SAMD21-I2C-004: The I2cDriver shall report a DMA reply on an unexpected channel as an event without advancing the in-flight read
***************************************
[       OK ] DmaReply.WrongChannelRead (1 ms)
[ RUN      ] DmaReply.WrongChannelWrite

***************************************
a READ-channel reply during a write is flagged InvalidDmaReply
***************************************

***************************************
(RQ)       SAMD21-I2C-004: The I2cDriver shall report a DMA reply on an unexpected channel as an event without advancing the in-flight write
***************************************
[       OK ] DmaReply.WrongChannelWrite (0 ms)
[ RUN      ] DmaReply.IdleIgnored

***************************************
a DMA reply while IDLE is silently ignored
***************************************

***************************************
(RQ)       SAMD21-I2C-006: The I2cDriver shall deliver completion callbacks only for transactions it has in flight (a DMA reply while IDLE is ignored)
***************************************
[       OK ] DmaReply.IdleIgnored (0 ms)
[----------] 3 tests from DmaReply (3 ms total)

[----------] 3 tests from Boundary
[ RUN      ] Boundary.WriteMaxPayload

***************************************
a 255-byte write (max DMA payload) queues a full-length transfer and completes OK
***************************************

***************************************
(RQ)       SAMD21-I2C-002: The I2cDriver shall perform write transactions using DMA for the data payload (at the maximum supported payload length)
***************************************
[       OK ] Boundary.WriteMaxPayload (1 ms)
[ RUN      ] Boundary.ReadMinPayload

***************************************
a 1-byte read (min payload) queues a single-beat transfer and completes OK
***************************************

***************************************
(RQ)       SAMD21-I2C-002: The I2cDriver shall perform read transactions using DMA for the data payload (at the minimum payload length of one byte)
***************************************
[       OK ] Boundary.ReadMinPayload (1 ms)
[ RUN      ] Boundary.WriteReadMaxAddress

***************************************
both phases of a write-read target the max legal 7-bit address 0x7F
***************************************

***************************************
(RQ)       SAMD21-I2C-002: The I2cDriver shall perform 7-bit-addressed transactions (at the largest legal address, 0x7F)
***************************************

***************************************
(RQ)       SAMD21-I2C-003: The I2cDriver shall implement writeRead as a repeated START with no intervening STOP (both halves target the same address)
***************************************
[       OK ] Boundary.WriteReadMaxAddress (1 ms)
[----------] 3 tests from Boundary (3 ms total)

[----------] 2 tests from Telemetry
[ RUN      ] Telemetry.BusStatus

***************************************
reportTelemetryIn maps the bus status registers to channels
***************************************

***************************************
(RQ)       SAMD21-I2C-004: The I2cDriver shall count bus errors in telemetry
***************************************
[       OK ] Telemetry.BusStatus (1 ms)
[ RUN      ] Telemetry.DeviceOnBus

***************************************
both SB and MB set maps to MASTER_AND_SLAVE_ON_BUS
***************************************

***************************************
(RQ)       SAMD21-I2C-004: The I2cDriver shall report bus state in telemetry
***************************************
[       OK ] Telemetry.DeviceOnBus (1 ms)
[----------] 2 tests from Telemetry (2 ms total)

[----------] 1 test from Command
[ RUN      ] Command.ClearErrors

***************************************
CLEAR_ERRORS resets the error counter and responds OK
***************************************

***************************************
(RQ)       SAMD21-I2C-004: The I2cDriver shall count bus errors in telemetry (CLEAR_ERRORS resets the counter)
***************************************
[       OK ] Command.ClearErrors (1 ms)
[----------] 1 test from Command (1 ms total)

[----------] Global test environment tear-down
[==========] 39 tests from 10 test suites ran. (49 ms total)
[  PASSED  ] 39 tests.
passedfprime-samd_Drv_GpioDriver_ut_exe0.04s
[STest::Random] Generated seed 84544 from system time
[==========] Running 13 tests from 2 test suites.
[----------] Global test environment set-up.
[----------] 7 tests from Nominal
[ RUN      ] Nominal.testConfigureOutput

***************************************
(RQ)       GPIO-001: configureOutput shall bind the instance to one group/pin and forward the configuration to the PORT peripheral
***************************************
[       OK ] Nominal.testConfigureOutput (0 ms)
[ RUN      ] Nominal.testConfigureInput

***************************************
(RQ)       GPIO-001: configureInput shall bind the instance to one group/pin and forward the configuration to the PORT peripheral
***************************************

***************************************
(RQ)       GPIO-002: configureInput shall select a pull-up, pull-down, or no internal resistor via InputPullMode
***************************************
[       OK ] Nominal.testConfigureInput (0 ms)
[ RUN      ] Nominal.testConfigureAllPins

***************************************
(RQ)       GPIO-001: configureOutput shall bind the instance to any one group/pin combination
***************************************
[       OK ] Nominal.testConfigureAllPins (0 ms)
[ RUN      ] Nominal.testWriteNominal

***************************************
(RQ)       GPIO-003: gpioWrite shall set the pin logic level and return OP_OK when the pin is configured as an output
***************************************
[       OK ] Nominal.testWriteNominal (0 ms)
[ RUN      ] Nominal.testReadNominal

***************************************
(RQ)       GPIO-004: gpioRead shall return the pin logic level and OP_OK when the pin is configured as an input
***************************************
[       OK ] Nominal.testReadNominal (0 ms)
[ RUN      ] Nominal.testConfigureInputExternalInterrupt

***************************************
(RQ)       GPIO-007: configureInput shall, when ExternalInterruptMode is not NONE, configure the EIC to detect the selected edge(s) on the pin's EXTINT line
***************************************
[       OK ] Nominal.testConfigureInputExternalInterrupt (0 ms)
[ RUN      ] Nominal.testInterruptFiresWhenConnected

***************************************
(RQ)       GPIO-008: On each configured edge, the driver shall emit a cycle on the gpioInterrupt output port when it is connected
***************************************
[       OK ] Nominal.testInterruptFiresWhenConnected (0 ms)
[----------] 7 tests from Nominal (1 ms total)

[----------] 6 tests from OffNominal
[ RUN      ] OffNominal.testWriteUnconfigured

***************************************
(RQ)       GPIO-005: gpioWrite shall return NOT_OPENED if invoked before configureOutput
***************************************
[       OK ] OffNominal.testWriteUnconfigured (0 ms)
[ RUN      ] OffNominal.testReadUnconfigured

***************************************
(RQ)       GPIO-005: gpioRead shall return NOT_OPENED if invoked before configureInput
***************************************
[       OK ] OffNominal.testReadUnconfigured (0 ms)
[ RUN      ] OffNominal.testWriteWrongMode

***************************************
(RQ)       GPIO-006: gpioWrite on an input pin shall return INVALID_MODE without touching hardware
***************************************
[       OK ] OffNominal.testWriteWrongMode (0 ms)
[ RUN      ] OffNominal.testReadWrongMode

***************************************
(RQ)       GPIO-006: gpioRead on an output pin shall return INVALID_MODE without touching hardware
***************************************
[       OK ] OffNominal.testReadWrongMode (0 ms)
[ RUN      ] OffNominal.testInterruptIsrNoOpWhenDisconnected

***************************************
(RQ)       GPIO-008: the driver shall emit a cycle on the gpioInterrupt output port only when it is connected
***************************************
[       OK ] OffNominal.testInterruptIsrNoOpWhenDisconnected (0 ms)
[ RUN      ] OffNominal.testInterruptNoDispatchWithoutRegisteredHandler

***************************************
(RQ)       GPIO-008: the driver shall emit a cycle on the gpioInterrupt output port only for edges on the pin it configured
***************************************
[       OK ] OffNominal.testInterruptNoDispatchWithoutRegisteredHandler (0 ms)
[----------] 6 tests from OffNominal (0 ms total)

[----------] Global test environment tear-down
[==========] 13 tests from 2 test suites ran. (2 ms total)
[  PASSED  ] 13 tests.
passedfprime-samd_Svc_ThinBufferManager_ut_exe0.03s
[==========] Running 3 tests from 1 test suite.
[----------] Global test environment set-up.
[----------] 3 tests from Nominal
[ RUN      ] Nominal.Setup
[       OK ] Nominal.Setup (2 ms)
[ RUN      ] Nominal.OneSize
Returning buffer 3
Returning buffer 1
Returning buffer 0
Returning buffer 2
[       OK ] Nominal.OneSize (0 ms)
[ RUN      ] Nominal.MultSize
[       OK ] Nominal.MultSize (0 ms)
[----------] 3 tests from Nominal (4 ms total)

[----------] Global test environment tear-down
[==========] 3 tests from 1 test suite ran. (4 ms total)
[  PASSED  ] 3 tests.
passedfprime-samd_Svc_Framer_ut_exe0.02s
[STest::Random] Generated seed 147212 from system time
[==========] Running 6 tests from 2 test suites.
[----------] Global test environment set-up.
[----------] 5 tests from Nominal
[ RUN      ] Nominal.SinglePacket
[       OK ] Nominal.SinglePacket (1 ms)
[ RUN      ] Nominal.MultiPacketAccumulation
[       OK ] Nominal.MultiPacketAccumulation (0 ms)
[ RUN      ] Nominal.BufferOverflow
[       OK ] Nominal.BufferOverflow (0 ms)
[ RUN      ] Nominal.DoubleBufferLifecycle
[       OK ] Nominal.DoubleBufferLifecycle (0 ms)
[ RUN      ] Nominal.SchedInFlush
[       OK ] Nominal.SchedInFlush (0 ms)
[----------] 5 tests from Nominal (2 ms total)

[----------] 1 test from OffNominal
[ RUN      ] OffNominal.Backpressure
[       OK ] OffNominal.Backpressure (0 ms)
[----------] 1 test from OffNominal (0 ms total)

[----------] Global test environment tear-down
[==========] 6 tests from 2 test suites ran. (2 ms total)
[  PASSED  ] 6 tests.
passedfprime-samd_Svc_TmFramer_ut_exe0.18s
[STest::Random] Generated seed 173514 from system time
[==========] Running 11 tests from 2 test suites.
[----------] Global test environment set-up.
[----------] 8 tests from Nominal
[ RUN      ] Nominal.NominalFraming
[       OK ] Nominal.NominalFraming (1 ms)
[ RUN      ] Nominal.MultiPacketAccumulation
[       OK ] Nominal.MultiPacketAccumulation (0 ms)
[ RUN      ] Nominal.DeadZoneAvoidance
[       OK ] Nominal.DeadZoneAvoidance (0 ms)
[ RUN      ] Nominal.BufferOverflow
[       OK ] Nominal.BufferOverflow (0 ms)
[ RUN      ] Nominal.DoubleBufferLifecycle
[       OK ] Nominal.DoubleBufferLifecycle (0 ms)
[ RUN      ] Nominal.SchedInFlush
[       OK ] Nominal.SchedInFlush (0 ms)
[ RUN      ] Nominal.PerApidSequenceCounts
[       OK ] Nominal.PerApidSequenceCounts (0 ms)
[ RUN      ] Nominal.FrameCountWrapAround
[       OK ] Nominal.FrameCountWrapAround (15 ms)
[----------] 8 tests from Nominal (17 ms total)

[----------] 3 tests from OffNominal
[ RUN      ] OffNominal.Backpressure
[       OK ] OffNominal.Backpressure (0 ms)
[ RUN      ] OffNominal.UnexpectedBufferReturn
[       OK ] OffNominal.UnexpectedBufferReturn (137 ms)
[ RUN      ] OffNominal.ApidTrackingOverflow
[       OK ] OffNominal.ApidTrackingOverflow (0 ms)
[----------] 3 tests from OffNominal (138 ms total)

[----------] Global test environment tear-down
[==========] 11 tests from 2 test suites ran. (156 ms total)
[  PASSED  ] 11 tests.