Skip to content

Added regression and unit tests for kernel, utilities, module manager, and FreeRTOS wrapper - #860

Open
Dev10-sys wants to merge 1 commit into
eclipse-threadx:devfrom
Dev10-sys:test/coverage-regression-and-unit-tests
Open

Dev10-sys wants to merge 1 commit into
eclipse-threadx:devfrom
Dev10-sys:test/coverage-regression-and-unit-tests

Conversation

@Dev10-sys

Copy link
Copy Markdown

PR checklist

  • Updated function header with a short description and version number
  • Added test case for bug fix or new feature
  • Validated on real hardware

Description

Split out from #847 (commit dfac3661) as requested, cherry-picked onto a fresh branch from dev with the conflict in test/tx/cmake/module_manager/CMakeLists.txt resolved.

Adds unit and regression tests across the ThreadX core scheduler, SMP time-slicing, Module Manager host suite, low-power and execution profile utilities, and the FreeRTOS compatibility layer:

  • test/tx/regression/threadx_thread_basic_execution_test.c: Exercises deferred _tx_thread_system_resume preemption handoff when _tx_thread_preempt_disable > 0 and higher- then lower-priority threads are resumed.
  • test/smp/regression/threadx_smp_time_slice_test.c: Exercises the SMP time-slice ready-list scan wraparound path when all ready equal-priority threads are currently executing on cores.
  • test/freertos/regression/: Adds runtime tests covering queues, queue sets, semaphores, mutexes, task lifecycle, notifications, event groups, and software timers.
  • test/tx/low_power/ and test/tx/execution_profile/: Adds standalone host tests for low-power enter/exit/next-timer helpers and execution profile tick/ISR/thread/idle counters.
  • test/tx/module_manager/: Adds host tests covering module callback notification trampolines and queue deduplication, full module manager lifecycle and cleanup paths, and dispatcher parameter, range, and ownership validation.

Conflict Resolution

  • test/tx/cmake/module_manager/CMakeLists.txt: Kept the upstream targets added on dev (threadx_module_manager_thread_reset_stack_test, threadx_module_manager_thread_reset_stack_no_mmu_test, threadx_module_manager_*_properties_test, and threadx_module_manager_secure_stack_guard_test) alongside the three new Module Manager host tests.

Local Verification (Windows host, GCC 16.2.0)

  • threadx_low_power_test and threadx_execution_profile_test compiled with -std=c99 -Wall -Wextra -Werror and passed across all five non-MISRA configuration macro sets (20 and 19 expectations respectively).
  • test/tx/cmake/module_manager configured with CMake 4.4.3 / Ninja and compiled cleanly for the three new targets and the Cortex-A7 thread reset stack targets (32-bit execution deferred to Linux CI).
  • txfr_queue_runtime_test.c, txfr_sync_runtime_test.c, and txfr_task_and_timer_test.c passed -Wall -Wextra -Werror syntax checks.

…and FreeRTOS wrapper

Add unit and regression tests to close remaining execution and coverage
gaps across the ThreadX core scheduler, SMP time-slicing, module manager
host suite, low-power and execution profile utilities, and the FreeRTOS
compatibility layer:

- test/tx/regression/threadx_thread_basic_execution_test.c: Exercise
  deferred _tx_thread_system_resume preemption handoff when
  _tx_thread_preempt_disable > 0 and higher- then lower-priority
  threads are resumed.
- test/smp/regression/threadx_smp_time_slice_test.c: Exercise the SMP
  time-slice ready-list scan wraparound path when all ready equal-priority
  threads are currently executing on cores.
- test/freertos/regression/: Add runtime tests covering queues, queue
  sets, semaphores, mutexes, task lifecycle, notifications, event
  groups, and software timers.
- test/tx/low_power/ and test/tx/execution_profile/: Add standalone
  host tests for low-power enter/exit/next-timer helpers and execution
  profile tick/ISR/thread/idle counters.
- test/tx/module_manager/: Add host tests covering module callback
  notification trampolines and queue deduplication, full module
  manager lifecycle and cleanup paths, and dispatcher parameter, range,
  and ownership validation.

Signed-off-by: Dev10-sys <[email protected]>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant