diff options
Diffstat (limited to 'test/tx/regression/testcontrol.c')
| -rw-r--r-- | test/tx/regression/testcontrol.c | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/test/tx/regression/testcontrol.c b/test/tx/regression/testcontrol.c index 3d33bc7f..e2b3f725 100644 --- a/test/tx/regression/testcontrol.c +++ b/test/tx/regression/testcontrol.c @@ -1,4 +1,16 @@ +/***************************************************************************/ +/* Copyright (c) 2024 Microsoft Corporation */ +/* Copyright (c) 2026 Eclipse ThreadX contributors */ +/* */ +/* This program and the accompanying materials are made available under */ +/* the terms of the MIT License which is available at */ +/* https://opensource.org/licenses/MIT. */ +/* */ +/* SPDX-License-Identifier: MIT */ +/***************************************************************************/ + /* This is the test control routine of the ThreadX kernel. All tests are dispatched from this routine. */ +// Some portions generated by Codex (gpt 5.4). #include "tx_api.h" #include <stdio.h> @@ -122,7 +134,6 @@ typedef struct TEST_ENTRY_STRUCT VOID (*test_entry)(void *); } TEST_ENTRY; - /* Define the prototypes for the test entry points. */ void threadx_block_memory_basic_application_define(void *); @@ -195,7 +206,7 @@ void threadx_semaphore_information_application_define(void *); void threadx_thread_basic_execution_application_define(void *); void threadx_thread_completed_application_define(void *); void threadx_thread_relinquish_application_define(void *); -void threadx_thread_simple_supsend_application_define(void *); +void threadx_thread_simple_suspend_application_define(void *); void threadx_thread_multiple_suspension_application_define(void *); void threadx_thread_multiple_non_current_suspension_application_define(void *); void threadx_thread_multi_level_preemption_threshold_application_define(void *); @@ -312,7 +323,7 @@ TEST_ENTRY test_control_tests[] = threadx_thread_basic_execution_application_define, threadx_thread_completed_application_define, threadx_thread_relinquish_application_define, - threadx_thread_simple_supsend_application_define, + threadx_thread_simple_suspend_application_define, threadx_thread_multiple_suspension_application_define, threadx_thread_multiple_non_current_suspension_application_define, threadx_thread_multi_level_preemption_threshold_application_define, @@ -483,7 +494,6 @@ UINT i, j; TX_THREAD *thread_ptr; #endif - /* Initialize the test error/success counters. */ test_control_successful_tests = 0; test_control_failed_tests = 0; @@ -565,6 +575,7 @@ TX_THREAD *thread_ptr; /* Clear the ISR dispatch. */ test_isr_dispatch = TX_NULL; + /* Ensure that _tx_thread_time_slice can handle NULL thread, note that current thread pointer is NULL at this point. */ _tx_thread_time_slice(); @@ -586,7 +597,7 @@ TX_THREAD *thread_ptr; init_test_thread.tx_thread_ready_previous = &init_test_thread; _tx_thread_time_slice(); _tx_thread_current_ptr = TX_NULL; - +#ifndef TX_DISABLE_NOTIFY_CALLBACKS /* Test to make sure _tx_thread_shell_entry can handle a NULL mutex release function pointer. */ temp_mutex_release = _tx_thread_mutex_release; temp_thread = _tx_thread_execute_ptr; @@ -605,6 +616,7 @@ TX_THREAD *thread_ptr; _tx_thread_current_ptr = TX_NULL; _tx_thread_execute_ptr = temp_thread; _tx_thread_mutex_release = temp_mutex_release; /* Recover Mutex release pointer. */ +#endif /* Test _tx_thread_system_suspend when not current, preemption is needed but disabled. */ temp_thread = _tx_thread_execute_ptr; @@ -1232,8 +1244,8 @@ UINT old_posture = TX_INT_ENABLE; /* Are interrupts disabled? */ if (old_posture == TX_INT_DISABLE) { - - /* System error - interrupts should alwasy be enabled in our test threads! */ + + /* System error - interrupts should always be enabled in our test threads! */ printf(" ***** SYSTEM ERROR ***** test returned with interrupts disabled!\n"); test_control_system_errors++; } @@ -1413,14 +1425,3 @@ void test_exit_notify(TX_THREAD *thread_ptr, UINT type) } -__attribute__((weak)) void abort_all_threads_suspended_on_mutex(void) -{ -} - -__attribute__((weak)) void suspend_lowest_priority(void) -{ -} - -__attribute__((weak)) void abort_and_resume_byte_allocating_thread(void) -{ -} |
