HF-Core Platform 0.1.0-dev
Hardware-Agnostic Handler Layer & RTOS Utilities for HardFOC
Loading...
Searching...
No Matches
rtos_wrap_comprehensive_test.cpp File Reference

Comprehensive test suite for hf-utils-rtos-wrap FreeRTOS wrappers. More...

#include "TestFramework.h"
#include "Mutex.h"
#include "MutexGuard.h"
#include "PeriodicTimer.h"
#include "BaseThread.h"
#include "OsQueue.h"
#include "OsEventFlags.h"
#include "SignalSemaphore.h"
#include "OsUtility.h"
#include <atomic>
#include <cstring>
#include "esp_log.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
Include dependency graph for rtos_wrap_comprehensive_test.cpp:

Classes

class  TestThread
 

Functions

static bool test_mutex_create () noexcept
 
static bool test_mutex_lock_unlock () noexcept
 
static bool test_mutex_contention () noexcept
 
static bool test_lock_guard_scoped () noexcept
 
static void timer_callback (uint32_t arg)
 
static bool test_periodic_timer () noexcept
 
static bool test_base_thread () noexcept
 
static bool test_os_queue () noexcept
 
static bool test_os_queue_full () noexcept
 
static bool test_event_flags () noexcept
 
static bool test_semaphore () noexcept
 
static bool test_os_delay () noexcept
 
void app_main (void)
 

Variables

static const char * TAG = "RTOS_Wrap_Test"
 
static TestResults g_test_results
 
static constexpr bool ENABLE_MUTEX_TESTS = true
 
static constexpr bool ENABLE_LOCK_GUARD_TESTS = true
 
static constexpr bool ENABLE_PERIODIC_TIMER_TESTS = true
 
static constexpr bool ENABLE_THREAD_TESTS = true
 
static constexpr bool ENABLE_QUEUE_TESTS = true
 
static constexpr bool ENABLE_EVENT_FLAGS_TESTS = true
 
static constexpr bool ENABLE_SEMAPHORE_TESTS = true
 
static constexpr bool ENABLE_DELAY_TESTS = true
 
static std::atomic< int > g_timer_count {0}
 

Detailed Description

Comprehensive test suite for hf-utils-rtos-wrap FreeRTOS wrappers.

Tests: Mutex, MutexGuard, PeriodicTimer, BaseThread (subclass), OsQueue, OsEventFlags, SignalSemaphore, os_delay functions, and multi-threaded synchronization scenarios.

Note
These tests REQUIRE FreeRTOS and exercise real RTOS primitives.
Author
HardFOC Team
Date
2025-2026

Function Documentation

◆ app_main()

void app_main ( void )
Here is the call graph for this function:

◆ test_base_thread()

static bool test_base_thread ( )
staticnoexcept
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_event_flags()

static bool test_event_flags ( )
staticnoexcept
Here is the caller graph for this function:

◆ test_lock_guard_scoped()

static bool test_lock_guard_scoped ( )
staticnoexcept
Here is the caller graph for this function:

◆ test_mutex_contention()

static bool test_mutex_contention ( )
staticnoexcept
Here is the caller graph for this function:

◆ test_mutex_create()

static bool test_mutex_create ( )
staticnoexcept
Here is the caller graph for this function:

◆ test_mutex_lock_unlock()

static bool test_mutex_lock_unlock ( )
staticnoexcept
Here is the caller graph for this function:

◆ test_os_delay()

static bool test_os_delay ( )
staticnoexcept
Here is the caller graph for this function:

◆ test_os_queue()

static bool test_os_queue ( )
staticnoexcept
Here is the caller graph for this function:

◆ test_os_queue_full()

static bool test_os_queue_full ( )
staticnoexcept
Here is the caller graph for this function:

◆ test_periodic_timer()

static bool test_periodic_timer ( )
staticnoexcept
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_semaphore()

static bool test_semaphore ( )
staticnoexcept
Here is the caller graph for this function:

◆ timer_callback()

static void timer_callback ( uint32_t arg)
static
Here is the caller graph for this function:

Variable Documentation

◆ ENABLE_DELAY_TESTS

constexpr bool ENABLE_DELAY_TESTS = true
staticconstexpr

◆ ENABLE_EVENT_FLAGS_TESTS

constexpr bool ENABLE_EVENT_FLAGS_TESTS = true
staticconstexpr

◆ ENABLE_LOCK_GUARD_TESTS

constexpr bool ENABLE_LOCK_GUARD_TESTS = true
staticconstexpr

◆ ENABLE_MUTEX_TESTS

constexpr bool ENABLE_MUTEX_TESTS = true
staticconstexpr

◆ ENABLE_PERIODIC_TIMER_TESTS

constexpr bool ENABLE_PERIODIC_TIMER_TESTS = true
staticconstexpr

◆ ENABLE_QUEUE_TESTS

constexpr bool ENABLE_QUEUE_TESTS = true
staticconstexpr

◆ ENABLE_SEMAPHORE_TESTS

constexpr bool ENABLE_SEMAPHORE_TESTS = true
staticconstexpr

◆ ENABLE_THREAD_TESTS

constexpr bool ENABLE_THREAD_TESTS = true
staticconstexpr

◆ g_test_results

TestResults g_test_results
static

◆ g_timer_count

std::atomic<int> g_timer_count {0}
static

◆ TAG

const char* TAG = "RTOS_Wrap_Test"
static