Safe Data API Test Specification
Annotated ztest sources of the Safe Data API
v0.0-dev+gbb519af
Loading...
Searching...
No Matches

Functions

void test_fault_reaction (void)
 Unrecoverable fault gets the configured reaction.
void test_lock_from_isr_asserts (void)
 Locking call from an ISR is caught by an assertion.

Detailed Description

Function Documentation

◆ test_fault_reaction()

void test_fault_reaction ( void )
active

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.

Test ID
TC_SAFE_DATA_FAULT_REACTION
Test Status: Active

Definition at line 130 of file main.c.

Verifies requirement SD-REQ-011 (Configurable unrecoverable-fault reaction).

◆ test_lock_from_isr_asserts()

void test_lock_from_isr_asserts ( void )
active

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.

Test ID
TC_SAFE_DATA_LOCK_FROM_ISR_ASSERTS
Depends on
CONFIG_ASSERT
Test Status: Active

Definition at line 200 of file main.c.

Verifies requirement SD-REQ-015 (No ISR-context locking).