STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
test_self_test.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "self_test.h"
Include dependency graph for test_self_test.c:

Go to the source code of this file.

Classes

struct  fake_t

Macros

#define CHECK(condition)

Functions

static self_test_reply_t probe (void *context, uint16_t id, uint8_t attempt, uint32_t now_ms, uint32_t budget_ms)
static self_test_battery_t battery (void *context, uint32_t now_ms, uint32_t budget_ms)
static self_test_reply_t publish_status (void *context, const self_test_status_t *status, uint32_t budget_ms)
static self_test_config_t config (void)
static void setup (self_test_t *t, fake_t *f, const self_test_config_t *c, uint32_t now)
static void test_pass_and_inventory (void)
static void test_terminal_results (void)
static void test_pending_timeout_and_fairness (void)
static void test_probe_retry_bounds_and_recovery (void)
static void test_timeout_retry (void)
static void test_heartbeat_boundaries_and_gap (void)
static void test_wraparound (void)
static void test_battery_validity (void)
static void test_publication_retry_and_recovery (void)
static void test_missing_and_optional (void)
static void test_reset_and_copied_dependencies (void)
static void test_invalid_inputs (void)
static void test_malformed_driver_results (void)
static void test_full_inventory_budget (void)
static void test_session_deadline (void)
static void test_deadline_retry_and_unstarted (void)
static void test_failure_completes_after_three_attempts (void)
int main (void)

Variables

static const self_test_port_t port = {probe, battery, publish_status}

Macro Definition Documentation

◆ CHECK

Function Documentation

◆ battery()

◆ config()

◆ main()

◆ probe()

self_test_reply_t probe ( void * context,
uint16_t id,
uint8_t attempt,
uint32_t now_ms,
uint32_t budget_ms )
static

◆ publish_status()

self_test_reply_t publish_status ( void * context,
const self_test_status_t * status,
uint32_t budget_ms )
static

◆ setup()

◆ test_battery_validity()

◆ test_deadline_retry_and_unstarted()

◆ test_failure_completes_after_three_attempts()

void test_failure_completes_after_three_attempts ( void )
static

◆ test_full_inventory_budget()

◆ test_heartbeat_boundaries_and_gap()

void test_heartbeat_boundaries_and_gap ( void )
static

◆ test_invalid_inputs()

◆ test_malformed_driver_results()

◆ test_missing_and_optional()

◆ test_pass_and_inventory()

◆ test_pending_timeout_and_fairness()

◆ test_probe_retry_bounds_and_recovery()

◆ test_publication_retry_and_recovery()

◆ test_reset_and_copied_dependencies()

◆ test_session_deadline()

◆ test_terminal_results()

◆ test_timeout_retry()

◆ test_wraparound()

Variable Documentation

◆ port

const self_test_port_t port = {probe, battery, publish_status}
static

Definition at line 67 of file test_self_test.c.