Safe Data Fault-Reaction Test Application
All test cases of the tests/safe_data_fault test application, generated
from the doxygen XML of its annotated sources (module group
safe_data_fault_module). Each scenario selects one unrecoverable-fault
reaction (return, handler, panic). The tests cause a fault or an ISR-context
call on purpose, so they are kept out of the main test application.
Test Scenarios
Scenario |
Tags |
Extra config |
|---|---|---|
|
safe_data |
CONFIG_SAFE_DATA_FAULT_RETURN=y |
|
safe_data |
CONFIG_SAFE_DATA_FAULT_HANDLER=y |
|
safe_data |
CONFIG_SAFE_DATA_FAULT_PANIC=y |
safe_data_fault
Unrecoverable fault gets the configured reaction. An unrecoverable corruption (no shadow copy) gets the reaction that CONFIG_SAFE_DATA_FAULT_* selects: RETURN gives -EILSEQ and calls no handler; HANDLER calls safe_data_fault_handler() with the affected payload and then gives -EILSEQ, and a registered callback takes precedence over that handler; PANIC halts the faulting thread with a kernel panic, and the faulting call does not return. Source: main.c (line 130) |
Locking call from an ISR is caught by an assertion. A locked operation (SAFE_READ) runs in ISR context through irq_offload(). With CONFIG_ASSERT enabled, the first assertion that fires is the ISR check in the Safe Data API header, not a kernel assertion further down. The same call from thread context fires no assertion. Depends on: Source: main.c (line 200) |