|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
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} |
| #define CHECK | ( | condition | ) |
Definition at line 7 of file test_self_test.c.
Referenced by battery(), probe(), publish_status(), setup(), test_battery_validity(), test_deadline_retry_and_unstarted(), test_failure_completes_after_three_attempts(), test_full_inventory_budget(), test_heartbeat_boundaries_and_gap(), 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(), and test_wraparound().
|
static |
Definition at line 45 of file test_self_test.c.
References fake_t::battery, fake_t::battery_calls, CHECK, fake_t::expected_budget, fake_t::fresh_battery, and result.
Referenced by board_bringup_read_battery(), boot_report_build(), bringup_task(), test_battery_validity(), test_malformed_driver_results(), test_missing_and_optional(), test_pass_and_inventory(), test_reset_and_copied_dependencies(), and test_wraparound().
|
static |
Definition at line 69 of file test_self_test.c.
Referenced by test_battery_validity(), test_deadline_retry_and_unstarted(), test_failure_completes_after_three_attempts(), test_full_inventory_budget(), test_heartbeat_boundaries_and_gap(), 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(), and test_wraparound().
| int main | ( | void | ) |
Definition at line 577 of file test_self_test.c.
References test_battery_validity(), test_deadline_retry_and_unstarted(), test_failure_completes_after_three_attempts(), test_full_inventory_budget(), test_heartbeat_boundaries_and_gap(), 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(), and test_wraparound().
|
static |
Definition at line 31 of file test_self_test.c.
References fake_t::attempts, fake_t::call_order, fake_t::calls, CHECK, fake_t::last_probe_budget, fake_t::replies, SELF_TEST_MAX_DEVICES, and fake_t::total_probes.
|
static |
Definition at line 57 of file test_self_test.c.
References CHECK, fake_t::expected_budget, fake_t::publication, fake_t::publication_calls, and fake_t::sent.
|
static |
Definition at line 83 of file test_self_test.c.
References fake_t::battery, self_test_config_t::callback_budget_ms, CHECK, fake_t::expected_budget, fake_t::fresh_battery, port, fake_t::publication, fake_t::replies, self_test_reply_t::result, self_test_init(), SELF_TEST_MAX_DEVICES, and SELF_TEST_PASS.
|
static |
Definition at line 262 of file test_self_test.c.
References battery(), fake_t::battery, idle_heartbeat_t::battery, self_test_config_t::battery_interval_ms, CHECK, config(), fake_t::fresh_battery, self_test_battery_t::raw_counts, self_test_battery_t::reply, self_test_reply_t::result, self_test_battery_t::sampled_at_ms, SELF_TEST_DIAG_BAD_REPLY, SELF_TEST_DIAG_STALE_BATTERY, SELF_TEST_FAIL, SELF_TEST_PASS, self_test_status(), self_test_tick(), fake_t::sent, setup(), and self_test_battery_t::valid.
Referenced by main().
|
static |
Definition at line 529 of file test_self_test.c.
References CHECK, config(), self_test_config_t::device_count, devices, self_test_config_t::probe_max_attempts, fake_t::replies, reply(), self_test_reply_t::result, SELF_TEST_FAIL, self_test_status(), self_test_tick(), SELF_TEST_TIMEOUT, self_test_config_t::session_timeout_ms, setup(), and fake_t::total_probes.
Referenced by main().
|
static |
Definition at line 559 of file test_self_test.c.
References fake_t::attempts, CHECK, config(), self_test_config_t::device_count, self_test_config_t::probe_max_attempts, fake_t::replies, self_test_reply_t::result, SELF_TEST_FAIL, self_test_status(), self_test_tick(), and setup().
Referenced by main().
|
static |
Definition at line 465 of file test_self_test.c.
References fake_t::battery_calls, fake_t::call_order, CHECK, config(), self_test_config_t::device_count, self_test_config_t::devices, fake_t::publication_calls, SELF_TEST_MAX_DEVICES, SELF_TEST_PASS, self_test_status(), self_test_tick(), setup(), and fake_t::total_probes.
Referenced by main().
|
static |
Definition at line 209 of file test_self_test.c.
References CHECK, config(), self_test_config_t::heartbeat_interval_ms, fake_t::publication_calls, self_test_tick(), and setup().
Referenced by main().
|
static |
Definition at line 387 of file test_self_test.c.
References self_test_config_t::battery_interval_ms, self_test_config_t::battery_max_age_ms, self_test_config_t::callback_budget_ms, CHECK, config(), self_test_config_t::device_count, self_test_device_t::device_id, self_test_config_t::devices, self_test_config_t::heartbeat_interval_ms, NULL, port, self_test_config_t::probe_max_attempts, self_test_config_t::probe_timeout_ms, self_test_config_t::publication_max_attempts, self_test_config_t::retry_interval_ms, self_test_init(), SELF_TEST_MAX_DEVICES, self_test_reset(), self_test_status(), self_test_tick(), self_test_config_t::session_timeout_ms, and self_test_config_t::tick_budget_ms.
Referenced by main().
|
static |
Definition at line 446 of file test_self_test.c.
References battery(), fake_t::battery, CHECK, config(), devices, self_test_config_t::probe_max_attempts, fake_t::publication, fake_t::replies, reply(), self_test_battery_t::reply, self_test_reply_t::result, SELF_TEST_DIAG_BAD_REPLY, SELF_TEST_FAIL, self_test_status(), self_test_tick(), and setup().
Referenced by main().
|
static |
Definition at line 331 of file test_self_test.c.
References battery(), CHECK, config(), self_test_config_t::device_count, devices, self_test_config_t::devices, NULL, fake_t::replies, reply(), self_test_device_t::required, self_test_reply_t::result, SELF_TEST_FAIL, self_test_init(), SELF_TEST_NOT_CONFIGURED, SELF_TEST_NOT_IMPLEMENTED, SELF_TEST_PASS, self_test_status(), self_test_tick(), and setup().
Referenced by main().
|
static |
Definition at line 97 of file test_self_test.c.
References fake_t::attempts, battery(), idle_heartbeat_t::battery, fake_t::call_order, fake_t::calls, CHECK, config(), SELF_TEST_PASS, SELF_TEST_PENDING, self_test_status(), self_test_tick(), fake_t::sent, setup(), and fake_t::total_probes.
Referenced by main().
|
static |
Definition at line 141 of file test_self_test.c.
References fake_t::calls, CHECK, config(), devices, self_test_config_t::heartbeat_interval_ms, self_test_config_t::probe_max_attempts, fake_t::publication_calls, fake_t::replies, reply(), SELF_TEST_FAIL, SELF_TEST_PENDING, self_test_status(), self_test_tick(), SELF_TEST_TIMEOUT, and setup().
Referenced by main().
|
static |
Definition at line 165 of file test_self_test.c.
References fake_t::attempts, fake_t::calls, CHECK, config(), self_test_config_t::device_count, fake_t::replies, self_test_reply_t::result, SELF_TEST_FAIL, SELF_TEST_PASS, SELF_TEST_PENDING, self_test_reset(), self_test_status(), self_test_tick(), and setup().
Referenced by main().
|
static |
Definition at line 301 of file test_self_test.c.
References CHECK, config(), fake_t::publication, fake_t::publication_calls, self_test_reply_t::result, SELF_TEST_FAIL, SELF_TEST_PASS, SELF_TEST_PENDING, self_test_status(), self_test_tick(), SELF_TEST_TIMEOUT, fake_t::sent, and setup().
Referenced by main().
|
static |
Definition at line 363 of file test_self_test.c.
References fake_t::attempts, battery(), fake_t::battery_calls, fake_t::calls, CHECK, config(), self_test_config_t::device_count, NULL, port, self_test_port_t::probe, fake_t::publication_calls, self_test_init(), SELF_TEST_PENDING, self_test_reset(), self_test_status(), self_test_tick(), and setup().
Referenced by main().
|
static |
Definition at line 485 of file test_self_test.c.
References self_test_config_t::callback_budget_ms, CHECK, config(), self_test_config_t::devices, fake_t::last_probe_budget, fake_t::replies, self_test_device_t::required, self_test_reply_t::result, SELF_TEST_DIAG_SESSION_TIMEOUT, SELF_TEST_PASS, SELF_TEST_PENDING, self_test_reset(), self_test_status(), self_test_tick(), SELF_TEST_TIMEOUT, fake_t::sent, self_test_config_t::session_timeout_ms, setup(), start(), self_test_config_t::tick_budget_ms, and fake_t::total_probes.
Referenced by main().
|
static |
Definition at line 118 of file test_self_test.c.
References fake_t::calls, CHECK, config(), self_test_config_t::probe_max_attempts, fake_t::publication_calls, fake_t::replies, SELF_TEST_FAIL, SELF_TEST_NOT_CONFIGURED, SELF_TEST_NOT_IMPLEMENTED, SELF_TEST_PASS, self_test_tick(), SELF_TEST_TIMEOUT, fake_t::sent, and setup().
Referenced by main().
|
static |
Definition at line 189 of file test_self_test.c.
References fake_t::attempts, fake_t::calls, CHECK, config(), self_test_config_t::device_count, devices, fake_t::replies, reply(), self_test_reply_t::result, SELF_TEST_PENDING, self_test_status(), self_test_tick(), SELF_TEST_TIMEOUT, and setup().
Referenced by main().
|
static |
Definition at line 235 of file test_self_test.c.
References battery(), self_test_config_t::battery_interval_ms, CHECK, config(), self_test_config_t::device_count, devices, fake_t::publication_calls, fake_t::replies, reply(), self_test_reply_t::result, SELF_TEST_PASS, SELF_TEST_PENDING, self_test_status(), self_test_tick(), SELF_TEST_TIMEOUT, setup(), and start().
Referenced by main().
|
static |
Definition at line 67 of file test_self_test.c.