summaryrefslogtreecommitdiff
path: root/test/tx/regression
diff options
context:
space:
mode:
authorFrédéric Desbiens <[email protected]>2026-06-08 10:01:32 +0200
committerGitHub <[email protected]>2026-06-08 10:01:32 +0200
commit87ab09cce305eb9cd4aacac4e8c62af72f665bff (patch)
treedd062ebbea5235d1921c64b396bf7e4ce79e9e15 /test/tx/regression
parent9ab0cf9683f832cdb48e2099533a5b06a3afcd64 (diff)
parent730b61874bc5cf40768987605ae5187fde0fa1e2 (diff)
Merge pull request #544 from eclipse-threadx/devv6.5.1.202602_rel
Merging changes for the v.6.5.1.202602 release
Diffstat (limited to 'test/tx/regression')
-rw-r--r--test/tx/regression/testcontrol.c37
-rw-r--r--test/tx/regression/threadx_block_memory_basic_test.c28
-rw-r--r--test/tx/regression/threadx_block_memory_error_detection_test.c29
-rw-r--r--test/tx/regression/threadx_block_memory_information_test.c11
-rw-r--r--test/tx/regression/threadx_block_memory_prioritize_test.c11
-rw-r--r--test/tx/regression/threadx_block_memory_suspension_test.c17
-rw-r--r--test/tx/regression/threadx_block_memory_suspension_timeout_test.c17
-rw-r--r--test/tx/regression/threadx_block_memory_thread_terminate_test.c17
-rw-r--r--test/tx/regression/threadx_byte_memory_basic_test.c56
-rw-r--r--test/tx/regression/threadx_byte_memory_information_test.c14
-rw-r--r--test/tx/regression/threadx_byte_memory_prioritize_test.c15
-rw-r--r--test/tx/regression/threadx_byte_memory_suspension_test.c16
-rw-r--r--test/tx/regression/threadx_byte_memory_suspension_timeout_test.c16
-rw-r--r--test/tx/regression/threadx_byte_memory_thread_contention_test.c16
-rw-r--r--test/tx/regression/threadx_byte_memory_thread_terminate_test.c17
-rw-r--r--test/tx/regression/threadx_event_flag_basic_test.c11
-rw-r--r--test/tx/regression/threadx_event_flag_information_test.c11
-rw-r--r--test/tx/regression/threadx_event_flag_isr_set_clear_test.c13
-rw-r--r--test/tx/regression/threadx_event_flag_isr_wait_abort_test.c11
-rw-r--r--test/tx/regression/threadx_event_flag_single_thread_terminate_test.c11
-rw-r--r--test/tx/regression/threadx_event_flag_suspension_consume_test.c11
-rw-r--r--test/tx/regression/threadx_event_flag_suspension_different_bits_consume_test.c11
-rw-r--r--test/tx/regression/threadx_event_flag_suspension_different_bits_test.c11
-rw-r--r--test/tx/regression/threadx_event_flag_suspension_test.c11
-rw-r--r--test/tx/regression/threadx_event_flag_suspension_timeout_test.c28
-rw-r--r--test/tx/regression/threadx_event_flag_thread_terminate_test.c11
-rw-r--r--test/tx/regression/threadx_initialize_kernel_setup_test.c32
-rw-r--r--test/tx/regression/threadx_interrupt_control_test.c11
-rw-r--r--test/tx/regression/threadx_mutex_basic_test.c11
-rw-r--r--test/tx/regression/threadx_mutex_delete_test.c11
-rw-r--r--test/tx/regression/threadx_mutex_information_test.c47
-rw-r--r--test/tx/regression/threadx_mutex_nested_priority_inheritance_test.c15
-rw-r--r--test/tx/regression/threadx_mutex_no_preemption_test.c11
-rw-r--r--test/tx/regression/threadx_mutex_preemption_test.c11
-rw-r--r--test/tx/regression/threadx_mutex_priority_inheritance_test.c11
-rw-r--r--test/tx/regression/threadx_mutex_proritize_test.c11
-rw-r--r--test/tx/regression/threadx_mutex_suspension_timeout_test.c11
-rw-r--r--test/tx/regression/threadx_mutex_thread_terminate_test.c11
-rw-r--r--test/tx/regression/threadx_queue_basic_eight_word_test.c11
-rw-r--r--test/tx/regression/threadx_queue_basic_four_word_test.c11
-rw-r--r--test/tx/regression/threadx_queue_basic_max_message_size_test.c11
-rw-r--r--test/tx/regression/threadx_queue_basic_one_word_test.c11
-rw-r--r--test/tx/regression/threadx_queue_basic_sixteen_word_test.c11
-rw-r--r--test/tx/regression/threadx_queue_basic_two_word_test.c11
-rw-r--r--test/tx/regression/threadx_queue_empty_suspension_test.c11
-rw-r--r--test/tx/regression/threadx_queue_flush_no_suspension_test.c11
-rw-r--r--test/tx/regression/threadx_queue_flush_test.c11
-rw-r--r--test/tx/regression/threadx_queue_front_send_test.c11
-rw-r--r--test/tx/regression/threadx_queue_full_suspension_test.c11
-rw-r--r--test/tx/regression/threadx_queue_information_test.c11
-rw-r--r--test/tx/regression/threadx_queue_prioritize.c11
-rw-r--r--test/tx/regression/threadx_queue_suspension_timeout_test.c11
-rw-r--r--test/tx/regression/threadx_queue_thread_terminate_test.c11
-rw-r--r--test/tx/regression/threadx_semaphore_basic_test.c11
-rw-r--r--test/tx/regression/threadx_semaphore_ceiling_put_test.c11
-rw-r--r--test/tx/regression/threadx_semaphore_delete_test.c11
-rw-r--r--test/tx/regression/threadx_semaphore_information_test.c11
-rw-r--r--test/tx/regression/threadx_semaphore_non_preemption_test.c11
-rw-r--r--test/tx/regression/threadx_semaphore_preemption_test.c11
-rw-r--r--test/tx/regression/threadx_semaphore_prioritize.c11
-rw-r--r--test/tx/regression/threadx_semaphore_thread_terminate_test.c11
-rw-r--r--test/tx/regression/threadx_semaphore_timeout_test.c13
-rw-r--r--test/tx/regression/threadx_test_port.h37
-rw-r--r--test/tx/regression/threadx_thread_basic_execution_test.c35
-rw-r--r--test/tx/regression/threadx_thread_basic_time_slice_test.c11
-rw-r--r--test/tx/regression/threadx_thread_completed_test.c11
-rw-r--r--test/tx/regression/threadx_thread_create_preemption_threshold_test.c11
-rw-r--r--test/tx/regression/threadx_thread_delayed_suspension_test.c31
-rw-r--r--test/tx/regression/threadx_thread_information_test.c11
-rw-r--r--test/tx/regression/threadx_thread_multi_level_preemption_threshold_test.c11
-rw-r--r--test/tx/regression/threadx_thread_multiple_non_current_test.c11
-rw-r--r--test/tx/regression/threadx_thread_multiple_sleep_test.c11
-rw-r--r--test/tx/regression/threadx_thread_multiple_suspension_test.c11
-rw-r--r--test/tx/regression/threadx_thread_multiple_time_slice_test.c11
-rw-r--r--test/tx/regression/threadx_thread_preemptable_suspension_test.c11
-rw-r--r--test/tx/regression/threadx_thread_preemption_change_test.c11
-rw-r--r--test/tx/regression/threadx_thread_priority_change.c11
-rw-r--r--test/tx/regression/threadx_thread_relinquish_test.c11
-rw-r--r--test/tx/regression/threadx_thread_reset_test.c11
-rw-r--r--test/tx/regression/threadx_thread_simple_sleep_non_clear_test.c12
-rw-r--r--test/tx/regression/threadx_thread_simple_sleep_test.c12
-rw-r--r--test/tx/regression/threadx_thread_simple_suspend_test.c13
-rw-r--r--test/tx/regression/threadx_thread_sleep_for_100ticks_test.c40
-rw-r--r--test/tx/regression/threadx_thread_sleep_terminate_test.c11
-rw-r--r--test/tx/regression/threadx_thread_stack_checking_test.c11
-rw-r--r--test/tx/regression/threadx_thread_terminate_delete_test.c13
-rw-r--r--test/tx/regression/threadx_thread_time_slice_change_test.c11
-rw-r--r--test/tx/regression/threadx_thread_wait_abort_and_isr_test.c11
-rw-r--r--test/tx/regression/threadx_thread_wait_abort_test.c11
-rw-r--r--test/tx/regression/threadx_time_get_set_test.c12
-rw-r--r--test/tx/regression/threadx_timer_activate_deactivate_test.c11
-rw-r--r--test/tx/regression/threadx_timer_deactivate_accuracy_test.c11
-rw-r--r--test/tx/regression/threadx_timer_information_test.c11
-rw-r--r--test/tx/regression/threadx_timer_large_timer_accuracy_test.c11
-rw-r--r--test/tx/regression/threadx_timer_multiple_accuracy_test.c12
-rw-r--r--test/tx/regression/threadx_timer_multiple_test.c12
-rw-r--r--test/tx/regression/threadx_timer_simple_test.c11
-rw-r--r--test/tx/regression/threadx_trace_basic_test.c11
98 files changed, 1260 insertions, 160 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)
-{
-}
diff --git a/test/tx/regression/threadx_block_memory_basic_test.c b/test/tx/regression/threadx_block_memory_basic_test.c
index 12e301d1..94cc8793 100644
--- a/test/tx/regression/threadx_block_memory_basic_test.c
+++ b/test/tx/regression/threadx_block_memory_basic_test.c
@@ -1,8 +1,20 @@
+/***************************************************************************/
+/* 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 test is designed to test simple memory block pool creation, deletion, and
allocates and releases. */
#include <stdio.h>
#include "tx_api.h"
+#include "threadx_test_port.h"
typedef struct BLOCK_MEMORY_TEST_STRUCT
{
@@ -86,7 +98,7 @@ CHAR *pointer;
/* Attempt to create a block pool from a timer. */
pointer = (CHAR *) 0x30000;
- status = tx_block_pool_create(&pool_3, "pool 3", 100, pointer, 320);
+ status = tx_block_pool_create(&pool_3, "pool 3", 100, pointer, TX_TEST_BLOCK_POOL_BYTES(100, 3));
/* Check status. */
if (status != TX_CALLER_ERROR)
@@ -146,7 +158,7 @@ UINT status;
}
/* Attempt to create a block pool from an ISR. */
- status = tx_block_pool_create(&pool_3, "pool 3", 100, (void *) 0x100000, 320);
+ status = tx_block_pool_create(&pool_3, "pool 3", 100, (void *) 0x100000, TX_TEST_BLOCK_POOL_BYTES(100, 3));
/* Check status. */
if (status != TX_CALLER_ERROR)
@@ -217,8 +229,8 @@ CHAR *pointer;
}
/* Create block pools 0 and 1. */
- status = tx_block_pool_create(&pool_0, "pool 0", 100, pointer, 320);
- pointer = pointer + 320;
+ status = tx_block_pool_create(&pool_0, "pool 0", 100, pointer, TX_TEST_BLOCK_POOL_BYTES(100, 3));
+ pointer = pointer + TX_TEST_BLOCK_POOL_BYTES(100, 3);
/* Check status. */
if (status != TX_SUCCESS)
@@ -228,8 +240,8 @@ CHAR *pointer;
test_control_return(1);
}
- status = tx_block_pool_create(&pool_1, "pool 1", 100, pointer, 320);
- pointer = pointer + 320;
+ status = tx_block_pool_create(&pool_1, "pool 1", 100, pointer, TX_TEST_BLOCK_POOL_BYTES(100, 3));
+ pointer = pointer + TX_TEST_BLOCK_POOL_BYTES(100, 3);
/* Check status. */
if (status != TX_SUCCESS)
@@ -265,7 +277,7 @@ CHAR *pointer_2;
CHAR *pointer_3;
CHAR *pointer_4;
INT i;
-unsigned long fake_block[20];
+TX_TEST_POINTER_WORD fake_block[20];
/* Inform user. */
@@ -316,7 +328,7 @@ unsigned long fake_block[20];
/* Try to release a block that points to a non-pool. */
fake_block[0] = 0;
- fake_block[1] = (unsigned long) &fake_block[0];
+ TX_TEST_STORE_POINTER(fake_block[1], &fake_block[0]);
status = tx_block_release(&fake_block[2]);
/* Check status. */
diff --git a/test/tx/regression/threadx_block_memory_error_detection_test.c b/test/tx/regression/threadx_block_memory_error_detection_test.c
index 7b7f2f61..41148120 100644
--- a/test/tx/regression/threadx_block_memory_error_detection_test.c
+++ b/test/tx/regression/threadx_block_memory_error_detection_test.c
@@ -1,7 +1,19 @@
+/***************************************************************************/
+/* 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 test is designed to test error detection for simple memory block operations. */
#include <stdio.h>
#include "tx_api.h"
+#include "threadx_test_port.h"
static unsigned long thread_0_counter = 0;
static TX_THREAD thread_0;
@@ -49,18 +61,18 @@ INT status;
pointer = pointer + TEST_STACK_SIZE_PRINTF;
/* Create block pool 0. */
- status = tx_block_pool_create(&pool_0, "pool 0", 100, pointer, 320);
- pointer = pointer + 320;
+ status = tx_block_pool_create(&pool_0, "pool 0", 100, pointer, TX_TEST_BLOCK_POOL_BYTES(100, 3));
+ pointer = pointer + TX_TEST_BLOCK_POOL_BYTES(100, 3);
#ifndef TX_DISABLE_ERROR_CHECKING /* skip this test and pretend it passed */
/* Create block pool again to get pool_ptr error. */
- status = tx_block_pool_create(&pool_0, "pool 0", 100, pointer, 320);
+ status = tx_block_pool_create(&pool_0, "pool 0", 100, pointer, TX_TEST_BLOCK_POOL_BYTES(100, 3));
if (status != TX_POOL_ERROR)
return;
/* Create block pool with NULL pointer. */
- status = tx_block_pool_create(TX_NULL, "pool 0", 100, pointer, 320);
+ status = tx_block_pool_create(TX_NULL, "pool 0", 100, pointer, TX_TEST_BLOCK_POOL_BYTES(100, 3));
if (status != TX_POOL_ERROR)
{
@@ -69,7 +81,7 @@ INT status;
}
/* Create block pool pointer if NULL start. */
- status = tx_block_pool_create(&pool_1, "pool 0", 100, NULL, 320);
+ status = tx_block_pool_create(&pool_1, "pool 0", 100, NULL, TX_TEST_BLOCK_POOL_BYTES(100, 3));
if (status != TX_PTR_ERROR)
{
@@ -128,11 +140,11 @@ INT i;
#ifndef TX_DISABLE_ERROR_CHECKING /* skip this test and pretend it passed */
- status = tx_block_pool_create(&pool_1, "pool 1", 100, pointer, 320);
- pointer = pointer + 320;
+ status = tx_block_pool_create(&pool_1, "pool 1", 100, pointer, TX_TEST_BLOCK_POOL_BYTES(100, 3));
+ pointer = pointer + TX_TEST_BLOCK_POOL_BYTES(100, 3);
/* Attempt to create a pool with an invalid size. */
- status = _txe_block_pool_create(&pool_2, "pool 2", 100, pointer, 320, 777777);
+ status = _txe_block_pool_create(&pool_2, "pool 2", 100, pointer, TX_TEST_BLOCK_POOL_BYTES(100, 3), 777777);
if (status != TX_POOL_ERROR)
{
@@ -384,4 +396,3 @@ INT i;
printf("SUCCESS!\n");
test_control_return(0);
}
-
diff --git a/test/tx/regression/threadx_block_memory_information_test.c b/test/tx/regression/threadx_block_memory_information_test.c
index 20e34d88..82d57f40 100644
--- a/test/tx/regression/threadx_block_memory_information_test.c
+++ b/test/tx/regression/threadx_block_memory_information_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test block memory information services. */
#include <stdio.h>
diff --git a/test/tx/regression/threadx_block_memory_prioritize_test.c b/test/tx/regression/threadx_block_memory_prioritize_test.c
index 6238aef8..3b2c4f0b 100644
--- a/test/tx/regression/threadx_block_memory_prioritize_test.c
+++ b/test/tx/regression/threadx_block_memory_prioritize_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test block memory pool prioritize. */
#include <stdio.h>
diff --git a/test/tx/regression/threadx_block_memory_suspension_test.c b/test/tx/regression/threadx_block_memory_suspension_test.c
index da14f454..fb68a6f9 100644
--- a/test/tx/regression/threadx_block_memory_suspension_test.c
+++ b/test/tx/regression/threadx_block_memory_suspension_test.c
@@ -1,7 +1,19 @@
+/***************************************************************************/
+/* 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 test is designed to test suspension on memory block pools. */
#include <stdio.h>
#include "tx_api.h"
+#include "threadx_test_port.h"
static unsigned long thread_0_counter = 0;
static TX_THREAD thread_0;
@@ -83,8 +95,8 @@ CHAR *pointer;
}
/* Create block pool. */
- status = tx_block_pool_create(&pool_0, "pool 0", 100, pointer, 320);
- pointer = pointer + 320;
+ status = tx_block_pool_create(&pool_0, "pool 0", 100, pointer, TX_TEST_BLOCK_POOL_BYTES(100, 3));
+ pointer = pointer + TX_TEST_BLOCK_POOL_BYTES(100, 3);
/* Check status. */
if (status != TX_SUCCESS)
@@ -308,4 +320,3 @@ CHAR *pointer_1;
}
}
-
diff --git a/test/tx/regression/threadx_block_memory_suspension_timeout_test.c b/test/tx/regression/threadx_block_memory_suspension_timeout_test.c
index dc460662..257dd122 100644
--- a/test/tx/regression/threadx_block_memory_suspension_timeout_test.c
+++ b/test/tx/regression/threadx_block_memory_suspension_timeout_test.c
@@ -1,7 +1,19 @@
+/***************************************************************************/
+/* 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 test is designed to test timeouts on suspension on memory block pools. */
#include <stdio.h>
#include "tx_api.h"
+#include "threadx_test_port.h"
static unsigned long thread_0_counter = 0;
static TX_THREAD thread_0;
@@ -84,8 +96,8 @@ CHAR *pointer;
}
/* Create block pool. */
- status = tx_block_pool_create(&pool_0, "pool 0", 100, pointer, 320);
- pointer = pointer + 320;
+ status = tx_block_pool_create(&pool_0, "pool 0", 100, pointer, TX_TEST_BLOCK_POOL_BYTES(100, 3));
+ pointer = pointer + TX_TEST_BLOCK_POOL_BYTES(100, 3);
/* Check status. */
if (status != TX_SUCCESS)
@@ -209,4 +221,3 @@ CHAR *pointer_1;
thread_2_counter++;
}
}
-
diff --git a/test/tx/regression/threadx_block_memory_thread_terminate_test.c b/test/tx/regression/threadx_block_memory_thread_terminate_test.c
index 6064891d..89e0c787 100644
--- a/test/tx/regression/threadx_block_memory_thread_terminate_test.c
+++ b/test/tx/regression/threadx_block_memory_thread_terminate_test.c
@@ -1,8 +1,20 @@
+/***************************************************************************/
+/* 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 test is designed to test thread termination on a thread suspended on a block
memory pool. */
#include <stdio.h>
#include "tx_api.h"
+#include "threadx_test_port.h"
static unsigned long thread_0_counter = 0;
static TX_THREAD thread_0;
@@ -69,8 +81,8 @@ CHAR *pointer;
}
/* Create block pool. */
- status = tx_block_pool_create(&pool_0, "pool 0", 100, pointer, 320);
- pointer = pointer + 320;
+ status = tx_block_pool_create(&pool_0, "pool 0", 100, pointer, TX_TEST_BLOCK_POOL_BYTES(100, 3));
+ pointer = pointer + TX_TEST_BLOCK_POOL_BYTES(100, 3);
/* Check status. */
if (status != TX_SUCCESS)
@@ -182,4 +194,3 @@ CHAR *pointer_1;
thread_1_counter++;
}
}
-
diff --git a/test/tx/regression/threadx_byte_memory_basic_test.c b/test/tx/regression/threadx_byte_memory_basic_test.c
index 36f41331..45f92e12 100644
--- a/test/tx/regression/threadx_byte_memory_basic_test.c
+++ b/test/tx/regression/threadx_byte_memory_basic_test.c
@@ -1,8 +1,29 @@
+/***************************************************************************/
+/* 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 test is designed to test simple memory byte pool creation, deletion, and
allocates and releases. */
#include <stdio.h>
#include "tx_api.h"
+#include "threadx_test_port.h"
+
+/* Per-allocation overhead in byte pools: next pointer + ALIGN_TYPE alignment marker. */
+#define BYTE_POOL_OVERHEAD (sizeof(UCHAR *) + sizeof(ALIGN_TYPE))
+
+/* Pool size for pool_0: exactly fits 3 allocations of 24 bytes with no room for a 4th. */
+#define POOL_0_SIZE (ULONG)(3u * (24u + BYTE_POOL_OVERHEAD) + BYTE_POOL_OVERHEAD)
+
+/* Pool size for pool_4: must accommodate 3 allocations of 84 bytes (tightest pattern). */
+#define POOL_4_SIZE (ULONG)(3u * (84u + BYTE_POOL_OVERHEAD) + BYTE_POOL_OVERHEAD + 16u)
typedef struct BYTE_MEMORY_TEST_STRUCT
{
@@ -91,7 +112,7 @@ CHAR *pointer;
/* Attempt to create a byte pool from a timer. */
pointer = (CHAR *) 0x30000;
- status = tx_byte_pool_create(&pool_2, "pool 2", pointer, 108);
+ status = tx_byte_pool_create(&pool_2, "pool 2", pointer, TX_TEST_BYTE_POOL_BYTES(108));
/* Check status. */
if (status != TX_CALLER_ERROR)
@@ -103,7 +124,7 @@ CHAR *pointer;
/* Attempt to create a byte pool with an invalid size. */
status = _txe_byte_pool_create(&pool_3, "pool 3", pointer,
- 108, (sizeof(TX_BYTE_POOL)+1));
+ TX_TEST_BYTE_POOL_BYTES(108), (sizeof(TX_BYTE_POOL)+1));
/* Check status. */
if (status != TX_POOL_ERROR)
@@ -186,7 +207,7 @@ UINT status;
/* Attempt to create a byte pool from an ISR. */
- status = tx_byte_pool_create(&pool_2, "pool 0", (void *) 0x100000, 108);
+ status = tx_byte_pool_create(&pool_2, "pool 0", (void *) 0x100000, TX_TEST_BYTE_POOL_BYTES(108));
/* Check status. */
if (status != TX_CALLER_ERROR)
@@ -256,8 +277,8 @@ CHAR *pointer;
}
/* Create byte pools 0 and 1. */
- status = tx_byte_pool_create(&pool_0, "pool 0", pointer, 108);
- pointer = pointer + 108;
+ status = tx_byte_pool_create(&pool_0, "pool 0", pointer, TX_TEST_BYTE_POOL_CAPACITY_BYTES(24, 3));
+ pointer = pointer + TX_TEST_BYTE_POOL_CAPACITY_BYTES(24, 3);
/* Check status. */
if (status != TX_SUCCESS)
@@ -267,8 +288,8 @@ CHAR *pointer;
test_control_return(1);
}
- status = tx_byte_pool_create(&pool_1, "pool 1", pointer, 200);
- pointer = pointer + 200;
+ status = tx_byte_pool_create(&pool_1, "pool 1", pointer, TX_TEST_BYTE_POOL_BYTES(200));
+ pointer = pointer + TX_TEST_BYTE_POOL_BYTES(200);
/* Check status. */
if (status != TX_SUCCESS)
@@ -279,9 +300,9 @@ CHAR *pointer;
}
/* Test for search pointer issue on wrapped seach with prior block to search pointer merged. */
- status = tx_byte_pool_create(&pool_4, "pool 4", pointer, 300);
+ status = tx_byte_pool_create(&pool_4, "pool 4", pointer, TX_TEST_BYTE_POOL_CAPACITY_BYTES(84, 3));
pool_4_memory = pointer;
- pointer = pointer + 300;
+ pointer = pointer + TX_TEST_BYTE_POOL_CAPACITY_BYTES(84, 3);
/* Check status. */
if (status != TX_SUCCESS)
@@ -353,7 +374,7 @@ CHAR *pointer_2;
CHAR *pointer_3;
CHAR *pointer_4;
INT i;
-ULONG array[20];
+TX_TEST_POINTER_WORD array[20];
UCHAR *save_search;
@@ -394,7 +415,7 @@ UCHAR *save_search;
/* Try to create a NULL pool. */
pointer_1 = (CHAR *) 0x30000;
- status = tx_byte_pool_create(TX_NULL, "pool 0", pointer_1, 108);
+ status = tx_byte_pool_create(TX_NULL, "pool 0", pointer_1, TX_TEST_BYTE_POOL_BYTES(108));
/* Check status. */
if (status != TX_POOL_ERROR)
@@ -406,7 +427,7 @@ UCHAR *save_search;
}
/* Try to create the same pool. */
- status = tx_byte_pool_create(&pool_0, "pool 0", pointer_1, 108);
+ status = tx_byte_pool_create(&pool_0, "pool 0", pointer_1, TX_TEST_BYTE_POOL_BYTES(108));
/* Check status. */
if (status != TX_POOL_ERROR)
@@ -418,7 +439,7 @@ UCHAR *save_search;
}
/* Try to create a pool with a NULL start address. */
- status = tx_byte_pool_create(&pool_2, "pool 2", TX_NULL, 108);
+ status = tx_byte_pool_create(&pool_2, "pool 2", TX_NULL, TX_TEST_BYTE_POOL_BYTES(108));
/* Check status. */
if (status != TX_PTR_ERROR)
@@ -626,7 +647,7 @@ UCHAR *save_search;
/* Test another bad block release.... pool pointer is not a valid pool! */
array[0] = 0;
- array[1] = (ULONG) &array[3];
+ TX_TEST_STORE_POINTER(array[1], &array[3]);
array[2] = 0;
array[3] = 0;
status = _tx_byte_release(&array[2]);
@@ -865,7 +886,7 @@ UCHAR *save_search;
}
/* Move the search pointer to the third block to exercise that code in the byte search algorithm. */
- pool_0.tx_byte_pool_search = (UCHAR *) pointer_3-8;
+ pool_0.tx_byte_pool_search = (UCHAR *) pointer_3 - TX_TEST_BYTE_POOL_SEARCH_OFFSET;
/* Now allocate the block again. */
status = tx_byte_allocate(&pool_0, (VOID **) &pointer_2, 24, TX_NO_WAIT);
@@ -885,7 +906,7 @@ UCHAR *save_search;
status += tx_byte_release(pointer_1);
/* Move the search pointer to the third block to exercise that code in the byte search algorithm. */
- pool_0.tx_byte_pool_search = (UCHAR *) pointer_3-8;
+ pool_0.tx_byte_pool_search = (UCHAR *) pointer_3 - TX_TEST_BYTE_POOL_SEARCH_OFFSET;
/* Allocate a large block to force the search pointer update. */
status = tx_byte_allocate(&pool_0, (VOID **) &pointer_3, 88, TX_NO_WAIT);
@@ -961,7 +982,7 @@ UCHAR *save_search;
}
/* Create pool 4. */
- status = tx_byte_pool_create(&pool_4, "pool 4", pool_4_memory, 300);
+ status = tx_byte_pool_create(&pool_4, "pool 4", pool_4_memory, TX_TEST_BYTE_POOL_CAPACITY_BYTES(84, 3));
/* Check status. */
if (status != TX_SUCCESS)
@@ -1061,4 +1082,3 @@ UCHAR *save_search;
printf("SUCCESS!\n");
test_control_return(0);
}
-
diff --git a/test/tx/regression/threadx_byte_memory_information_test.c b/test/tx/regression/threadx_byte_memory_information_test.c
index 8a619269..f1624a65 100644
--- a/test/tx/regression/threadx_byte_memory_information_test.c
+++ b/test/tx/regression/threadx_byte_memory_information_test.c
@@ -1,7 +1,19 @@
+/***************************************************************************/
+/* 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 test is designed to test byte memory information. */
#include <stdio.h>
#include "tx_api.h"
+#include "threadx_test_port.h"
#include "tx_byte_pool.h"
@@ -193,7 +205,7 @@ CHAR *pointer;
}
/* Create the byte_pool with one byte. */
- status = tx_byte_pool_create(&byte_pool_0, "byte_pool 0", pointer, 100);
+ status = tx_byte_pool_create(&byte_pool_0, "byte_pool 0", pointer, TX_TEST_BYTE_POOL_BYTES(100));
pointer = pointer + 100;
/* Check for status. */
diff --git a/test/tx/regression/threadx_byte_memory_prioritize_test.c b/test/tx/regression/threadx_byte_memory_prioritize_test.c
index 29407135..db36e386 100644
--- a/test/tx/regression/threadx_byte_memory_prioritize_test.c
+++ b/test/tx/regression/threadx_byte_memory_prioritize_test.c
@@ -1,7 +1,19 @@
+/***************************************************************************/
+/* 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 test is designed to test byte memory prioritize. */
#include <stdio.h>
#include "tx_api.h"
+#include "threadx_test_port.h"
/* Define the ISR dispatch. */
@@ -197,7 +209,7 @@ CHAR *pointer;
}
/* Create the byte_pool with one byte. */
- status = tx_byte_pool_create(&byte_pool_0, "byte_pool 0", pointer, 100);
+ status = tx_byte_pool_create(&byte_pool_0, "byte_pool 0", pointer, TX_TEST_BYTE_POOL_BYTES(100));
pointer = pointer + 100;
/* Check for status. */
@@ -495,4 +507,3 @@ VOID *pointer;
thread_6_counter++;
}
}
-
diff --git a/test/tx/regression/threadx_byte_memory_suspension_test.c b/test/tx/regression/threadx_byte_memory_suspension_test.c
index ba159894..3af5fc81 100644
--- a/test/tx/regression/threadx_byte_memory_suspension_test.c
+++ b/test/tx/regression/threadx_byte_memory_suspension_test.c
@@ -1,7 +1,19 @@
+/***************************************************************************/
+/* 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 test is designed to test suspension on a memory byte pool. */
#include <stdio.h>
#include "tx_api.h"
+#include "threadx_test_port.h"
static unsigned long thread_0_counter = 0;
static TX_THREAD thread_0;
@@ -121,8 +133,8 @@ CHAR *pointer;
}
/* Create byte pool 0. */
- status = tx_byte_pool_create(&pool_0, "pool 0", pointer, 108);
- pointer = pointer + 108;
+ status = tx_byte_pool_create(&pool_0, "pool 0", pointer, TX_TEST_BYTE_POOL_BYTES(108));
+ pointer = pointer + TX_TEST_BYTE_POOL_BYTES(108);
/* Check status. */
if (status != TX_SUCCESS)
diff --git a/test/tx/regression/threadx_byte_memory_suspension_timeout_test.c b/test/tx/regression/threadx_byte_memory_suspension_timeout_test.c
index 5e94df97..5df63042 100644
--- a/test/tx/regression/threadx_byte_memory_suspension_timeout_test.c
+++ b/test/tx/regression/threadx_byte_memory_suspension_timeout_test.c
@@ -1,7 +1,19 @@
+/***************************************************************************/
+/* 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 test is designed to test suspension timeout on a memory byte pool. */
#include <stdio.h>
#include "tx_api.h"
+#include "threadx_test_port.h"
static unsigned long thread_0_counter = 0;
static TX_THREAD thread_0;
@@ -85,8 +97,8 @@ CHAR *pointer;
}
/* Create byte pool 0. */
- status = tx_byte_pool_create(&pool_0, "pool 0", pointer, 108);
- pointer = pointer + 108;
+ status = tx_byte_pool_create(&pool_0, "pool 0", pointer, TX_TEST_BYTE_POOL_BYTES(108));
+ pointer = pointer + TX_TEST_BYTE_POOL_BYTES(108);
/* Check status. */
if (status != TX_SUCCESS)
diff --git a/test/tx/regression/threadx_byte_memory_thread_contention_test.c b/test/tx/regression/threadx_byte_memory_thread_contention_test.c
index da2634e3..8e92d44d 100644
--- a/test/tx/regression/threadx_byte_memory_thread_contention_test.c
+++ b/test/tx/regression/threadx_byte_memory_thread_contention_test.c
@@ -1,8 +1,20 @@
+/***************************************************************************/
+/* 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 test is designed to test contention of two threads on a single
memory byte pool. */
#include <stdio.h>
#include "tx_api.h"
+#include "threadx_test_port.h"
static unsigned long thread_0_counter = 0;
static TX_THREAD thread_0;
@@ -89,8 +101,8 @@ CHAR *pointer;
}
/* Create byte pool 0. */
- status = tx_byte_pool_create(&pool_0, "pool 0", pointer, 108);
- pointer = pointer + 108;
+ status = tx_byte_pool_create(&pool_0, "pool 0", pointer, TX_TEST_BYTE_POOL_BYTES(108));
+ pointer = pointer + TX_TEST_BYTE_POOL_BYTES(108);
/* Save off the intial pool size. */
initial_pool_size = pool_0.tx_byte_pool_available;
diff --git a/test/tx/regression/threadx_byte_memory_thread_terminate_test.c b/test/tx/regression/threadx_byte_memory_thread_terminate_test.c
index 4805ba57..b752f340 100644
--- a/test/tx/regression/threadx_byte_memory_thread_terminate_test.c
+++ b/test/tx/regression/threadx_byte_memory_thread_terminate_test.c
@@ -1,7 +1,19 @@
+/***************************************************************************/
+/* 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 test is designed to test termination on thread suspended on memory byte pool. */
#include <stdio.h>
#include "tx_api.h"
+#include "threadx_test_port.h"
static unsigned long thread_0_counter = 0;
static TX_THREAD thread_0;
@@ -68,8 +80,8 @@ CHAR *pointer;
}
/* Create byte pools 0 and 1. */
- status = tx_byte_pool_create(&pool_0, "pool 0", pointer, 108);
- pointer = pointer + 108;
+ status = tx_byte_pool_create(&pool_0, "pool 0", pointer, TX_TEST_BYTE_POOL_BYTES(108));
+ pointer = pointer + TX_TEST_BYTE_POOL_BYTES(108);
/* Check status. */
if (status != TX_SUCCESS)
@@ -174,4 +186,3 @@ CHAR *pointer;
thread_1_counter++;
}
}
-
diff --git a/test/tx/regression/threadx_event_flag_basic_test.c b/test/tx/regression/threadx_event_flag_basic_test.c
index 3261f67f..8ab990f7 100644
--- a/test/tx/regression/threadx_event_flag_basic_test.c
+++ b/test/tx/regression/threadx_event_flag_basic_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test simple event flag group creation, deletion, gets and
sets. */
diff --git a/test/tx/regression/threadx_event_flag_information_test.c b/test/tx/regression/threadx_event_flag_information_test.c
index d2404081..45e547f9 100644
--- a/test/tx/regression/threadx_event_flag_information_test.c
+++ b/test/tx/regression/threadx_event_flag_information_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test the event flag group information gathering services. */
#include <stdio.h>
diff --git a/test/tx/regression/threadx_event_flag_isr_set_clear_test.c b/test/tx/regression/threadx_event_flag_isr_set_clear_test.c
index 7f89a06f..ff8674d9 100644
--- a/test/tx/regression/threadx_event_flag_isr_set_clear_test.c
+++ b/test/tx/regression/threadx_event_flag_isr_set_clear_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test for simultaneous thread event flag set AND ISR event flag set and clear. */
#include <stdio.h>
@@ -355,5 +366,3 @@ static void timer_0_entry(ULONG input)
{
timer_0_counter++;
}
-
-
diff --git a/test/tx/regression/threadx_event_flag_isr_wait_abort_test.c b/test/tx/regression/threadx_event_flag_isr_wait_abort_test.c
index e1ec4e7c..b14e0cbd 100644
--- a/test/tx/regression/threadx_event_flag_isr_wait_abort_test.c
+++ b/test/tx/regression/threadx_event_flag_isr_wait_abort_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test for wait abort from an ISR. */
#include <stdio.h>
diff --git a/test/tx/regression/threadx_event_flag_single_thread_terminate_test.c b/test/tx/regression/threadx_event_flag_single_thread_terminate_test.c
index 86675890..6ae7c712 100644
--- a/test/tx/regression/threadx_event_flag_single_thread_terminate_test.c
+++ b/test/tx/regression/threadx_event_flag_single_thread_terminate_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test event flag suspension with a single suspended thread
being terminated at the same priority level. */
diff --git a/test/tx/regression/threadx_event_flag_suspension_consume_test.c b/test/tx/regression/threadx_event_flag_suspension_consume_test.c
index aae8f1b9..eaa40258 100644
--- a/test/tx/regression/threadx_event_flag_suspension_consume_test.c
+++ b/test/tx/regression/threadx_event_flag_suspension_consume_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test event flag suspension and resumption of two threads
waiting on the same event flag set with the consumption. */
diff --git a/test/tx/regression/threadx_event_flag_suspension_different_bits_consume_test.c b/test/tx/regression/threadx_event_flag_suspension_different_bits_consume_test.c
index 595e60ed..5f4c9494 100644
--- a/test/tx/regression/threadx_event_flag_suspension_different_bits_consume_test.c
+++ b/test/tx/regression/threadx_event_flag_suspension_different_bits_consume_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test event flag suspension and resumption of two threads
waiting on different event flags with consumption. */
diff --git a/test/tx/regression/threadx_event_flag_suspension_different_bits_test.c b/test/tx/regression/threadx_event_flag_suspension_different_bits_test.c
index f9e43cad..56f9c263 100644
--- a/test/tx/regression/threadx_event_flag_suspension_different_bits_test.c
+++ b/test/tx/regression/threadx_event_flag_suspension_different_bits_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test event flag suspension and resumption of two threads
waiting on different event flags. */
diff --git a/test/tx/regression/threadx_event_flag_suspension_test.c b/test/tx/regression/threadx_event_flag_suspension_test.c
index 915e33db..1c98ab49 100644
--- a/test/tx/regression/threadx_event_flag_suspension_test.c
+++ b/test/tx/regression/threadx_event_flag_suspension_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test event flag suspension and resumption of three threads
waiting on the same event flag set. */
diff --git a/test/tx/regression/threadx_event_flag_suspension_timeout_test.c b/test/tx/regression/threadx_event_flag_suspension_timeout_test.c
index 149cb58f..fbfdcc4f 100644
--- a/test/tx/regression/threadx_event_flag_suspension_timeout_test.c
+++ b/test/tx/regression/threadx_event_flag_suspension_timeout_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test event flag suspension timeout processing. */
#include <stdio.h>
@@ -178,17 +189,12 @@ UINT status;
/* Sleep for 63 ticks. */
tx_thread_sleep(63);
- /* Check the run counters. */
- if (((thread_1_counter != 32)
-#ifdef __linux__
- && (thread_1_counter != 33) /* Depending on the starting time, thread 1 can run either 32 or 33 rounds. */
-#endif
- ) ||
- ((thread_2_counter != 13)
-#ifdef __linux__
- && (thread_2_counter != 14) /* When CPU starves, the thread 2 can run 14 ronuds. */
-#endif
- ))
+ /* Check the run counters. Depending on the starting time relative to
+ the tick boundary, thread 1 can run either 32 or 33 rounds and
+ thread 2 can run 13 or 14 rounds. This variance applies to any
+ platform with non-deterministic tick alignment (Linux, QEMU, Windows, etc.). */
+ if (((thread_1_counter < 32UL) || (thread_1_counter > 33UL)) ||
+ ((thread_2_counter < 13UL) || (thread_2_counter > 14UL)))
{
/* Event flag error. */
diff --git a/test/tx/regression/threadx_event_flag_thread_terminate_test.c b/test/tx/regression/threadx_event_flag_thread_terminate_test.c
index 166711f5..25536903 100644
--- a/test/tx/regression/threadx_event_flag_thread_terminate_test.c
+++ b/test/tx/regression/threadx_event_flag_thread_terminate_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test event flag suspension with the suspended threads
being terminated. */
diff --git a/test/tx/regression/threadx_initialize_kernel_setup_test.c b/test/tx/regression/threadx_initialize_kernel_setup_test.c
index 2ef8e158..057ac223 100644
--- a/test/tx/regression/threadx_initialize_kernel_setup_test.c
+++ b/test/tx/regression/threadx_initialize_kernel_setup_test.c
@@ -1,6 +1,19 @@
+/***************************************************************************/
+/* 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 test is designed to test kernel setup functionality in ThreadX. */
+// Some portions generated by Codex (gpt 5.4).
#include <stdio.h>
+#include <stdlib.h>
#include "tx_api.h"
#include "tx_initialize.h"
#include "tx_thread.h"
@@ -30,20 +43,7 @@ UINT test_byte_pool_create_init;
UINT test_block_pool_create_init;
UINT test_timer_create_init;
-
-__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)
-{
-}
-
-void main()
+int main(void)
{
/* Setup the ThreadX kernel. */
@@ -59,6 +59,8 @@ void main()
printf("Running Initialize Kernel Setup Test................................ ERROR!\n");
exit(1);
}
+
+ return(0);
}
void test_application_define(void *first_unused_memory){}
@@ -78,4 +80,4 @@ void delete_timer_thread(void)
_tx_thread_delete(&_tx_timer_thread);
}
-#endif \ No newline at end of file
+#endif
diff --git a/test/tx/regression/threadx_interrupt_control_test.c b/test/tx/regression/threadx_interrupt_control_test.c
index c573c098..ec797ac8 100644
--- a/test/tx/regression/threadx_interrupt_control_test.c
+++ b/test/tx/regression/threadx_interrupt_control_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test the interrupt control service call avaialbe to the
application. */
diff --git a/test/tx/regression/threadx_mutex_basic_test.c b/test/tx/regression/threadx_mutex_basic_test.c
index 419813d3..bb81eb9a 100644
--- a/test/tx/regression/threadx_mutex_basic_test.c
+++ b/test/tx/regression/threadx_mutex_basic_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test the mutex create/delete and immediate
return gets and puts. */
diff --git a/test/tx/regression/threadx_mutex_delete_test.c b/test/tx/regression/threadx_mutex_delete_test.c
index af501488..c706cc66 100644
--- a/test/tx/regression/threadx_mutex_delete_test.c
+++ b/test/tx/regression/threadx_mutex_delete_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test the mutex suspension and mutex delete with
suspended threads. */
diff --git a/test/tx/regression/threadx_mutex_information_test.c b/test/tx/regression/threadx_mutex_information_test.c
index 55503002..3829122c 100644
--- a/test/tx/regression/threadx_mutex_information_test.c
+++ b/test/tx/regression/threadx_mutex_information_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test the mutex information services. */
#include <stdio.h>
@@ -312,7 +323,7 @@ ULONG inheritances;
test_control_return(1);
}
- /* Now get the performance inforamtion. */
+ /* Now get the performance information. */
status = tx_mutex_performance_info_get(&mutex_2, &puts, &gets, &suspensions, &timeouts, &inversions, &inheritances);
/* Check status. */
@@ -325,8 +336,8 @@ ULONG inheritances;
printf("ERROR #19\n");
test_control_return(1);
}
-
- /* Now get the system performance inforamtion. */
+
+ /* Now get the system performance information. */
status = tx_mutex_performance_system_info_get(&puts, &gets, &suspensions, &timeouts, &inversions, &inheritances);
/* Check status. */
@@ -342,7 +353,7 @@ ULONG inheritances;
#else
- /* Now get the performance inforamtion. */
+ /* Now get the performance information. */
status = tx_mutex_performance_info_get(&mutex_2, &puts, &gets, &suspensions, &timeouts, &inversions, &inheritances);
/* Check status. */
@@ -354,7 +365,7 @@ ULONG inheritances;
test_control_return(1);
}
- /* Now get the performance inforamtion. */
+ /* Now get the performance information. */
status = tx_mutex_performance_info_get(TX_NULL, &puts, &gets, &suspensions, &timeouts, &inversions, &inheritances);
/* Check status. */
@@ -366,7 +377,7 @@ ULONG inheritances;
test_control_return(1);
}
- /* Now get the performance inforamtion. */
+ /* Now get the performance information. */
status = tx_mutex_performance_info_get(TX_NULL, TX_NULL, &gets, &suspensions, &timeouts, &inversions, &inheritances);
/* Check status. */
@@ -378,7 +389,7 @@ ULONG inheritances;
test_control_return(1);
}
- /* Now get the performance inforamtion. */
+ /* Now get the performance information. */
status = tx_mutex_performance_info_get(TX_NULL, TX_NULL, TX_NULL, &suspensions, &timeouts, &inversions, &inheritances);
/* Check status. */
@@ -390,7 +401,7 @@ ULONG inheritances;
test_control_return(1);
}
- /* Now get the performance inforamtion. */
+ /* Now get the performance information. */
status = tx_mutex_performance_info_get(TX_NULL, TX_NULL, TX_NULL, TX_NULL, &timeouts, &inversions, &inheritances);
/* Check status. */
@@ -402,7 +413,7 @@ ULONG inheritances;
test_control_return(1);
}
- /* Now get the performance inforamtion. */
+ /* Now get the performance information. */
status = tx_mutex_performance_info_get(TX_NULL, TX_NULL, TX_NULL, TX_NULL, TX_NULL, &inversions, &inheritances);
/* Check status. */
@@ -414,7 +425,7 @@ ULONG inheritances;
test_control_return(1);
}
- /* Now get the performance inforamtion. */
+ /* Now get the performance information. */
status = tx_mutex_performance_info_get(TX_NULL, TX_NULL, TX_NULL, TX_NULL, TX_NULL, TX_NULL, &inheritances);
/* Check status. */
@@ -426,7 +437,7 @@ ULONG inheritances;
test_control_return(1);
}
- /* Now get the performance inforamtion. */
+ /* Now get the performance information. */
status = tx_mutex_performance_info_get(TX_NULL, TX_NULL, TX_NULL, TX_NULL, TX_NULL, TX_NULL, TX_NULL);
/* Check status. */
@@ -438,7 +449,7 @@ ULONG inheritances;
test_control_return(1);
}
- /* Now get the system performance inforamtion. */
+ /* Now get the system performance information. */
status = tx_mutex_performance_system_info_get(&puts, &gets, &suspensions, &timeouts, &inversions, &inheritances);
/* Check status. */
@@ -450,7 +461,7 @@ ULONG inheritances;
test_control_return(1);
}
- /* Now get the system performance inforamtion. */
+ /* Now get the system performance information. */
status = tx_mutex_performance_system_info_get(TX_NULL, &gets, &suspensions, &timeouts, &inversions, &inheritances);
/* Check status. */
@@ -462,7 +473,7 @@ ULONG inheritances;
test_control_return(1);
}
- /* Now get the system performance inforamtion. */
+ /* Now get the system performance information. */
status = tx_mutex_performance_system_info_get(TX_NULL, TX_NULL, &suspensions, &timeouts, &inversions, &inheritances);
/* Check status. */
@@ -474,7 +485,7 @@ ULONG inheritances;
test_control_return(1);
}
- /* Now get the system performance inforamtion. */
+ /* Now get the system performance information. */
status = tx_mutex_performance_system_info_get(TX_NULL, TX_NULL, TX_NULL, &timeouts, &inversions, &inheritances);
/* Check status. */
@@ -486,7 +497,7 @@ ULONG inheritances;
test_control_return(1);
}
- /* Now get the system performance inforamtion. */
+ /* Now get the system performance information. */
status = tx_mutex_performance_system_info_get(TX_NULL, TX_NULL, TX_NULL, TX_NULL, &inversions, &inheritances);
/* Check status. */
@@ -498,7 +509,7 @@ ULONG inheritances;
test_control_return(1);
}
- /* Now get the system performance inforamtion. */
+ /* Now get the system performance information. */
status = tx_mutex_performance_system_info_get(TX_NULL, TX_NULL, TX_NULL, TX_NULL, TX_NULL, &inheritances);
/* Check status. */
@@ -510,7 +521,7 @@ ULONG inheritances;
test_control_return(1);
}
- /* Now get the system performance inforamtion. */
+ /* Now get the system performance information. */
status = tx_mutex_performance_system_info_get(TX_NULL, TX_NULL, TX_NULL, TX_NULL, TX_NULL, TX_NULL);
/* Check status. */
diff --git a/test/tx/regression/threadx_mutex_nested_priority_inheritance_test.c b/test/tx/regression/threadx_mutex_nested_priority_inheritance_test.c
index 1439ca85..929ea0b9 100644
--- a/test/tx/regression/threadx_mutex_nested_priority_inheritance_test.c
+++ b/test/tx/regression/threadx_mutex_nested_priority_inheritance_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test multiple mutex priority inheritance situations. */
#include <stdio.h>
@@ -404,7 +415,7 @@ UINT status;
tx_mutex_put(&mutex_2);
- /* Should reurn us back to priority 15. */
+ /* Should return us back to priority 15. */
if (thread_0.tx_thread_priority != 15)
{
@@ -441,7 +452,7 @@ UINT status;
tx_mutex_put(&mutex_2);
- /* Should reurn us back to priority 8. */
+ /* Should return us back to priority 8. */
if (thread_0.tx_thread_priority != 8)
{
diff --git a/test/tx/regression/threadx_mutex_no_preemption_test.c b/test/tx/regression/threadx_mutex_no_preemption_test.c
index 3cc21b62..2798a5d3 100644
--- a/test/tx/regression/threadx_mutex_no_preemption_test.c
+++ b/test/tx/regression/threadx_mutex_no_preemption_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test the mutex suspension and another thread resuming the
same priority thread by doing a mutex put. */
diff --git a/test/tx/regression/threadx_mutex_preemption_test.c b/test/tx/regression/threadx_mutex_preemption_test.c
index 495ae13c..5e3d4c4b 100644
--- a/test/tx/regression/threadx_mutex_preemption_test.c
+++ b/test/tx/regression/threadx_mutex_preemption_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test the mutex suspension and another thread resuming the
higher priority thread by doing a mutex put. Higher-priority thread should preempt. */
diff --git a/test/tx/regression/threadx_mutex_priority_inheritance_test.c b/test/tx/regression/threadx_mutex_priority_inheritance_test.c
index 0b76aba6..8352c9b1 100644
--- a/test/tx/regression/threadx_mutex_priority_inheritance_test.c
+++ b/test/tx/regression/threadx_mutex_priority_inheritance_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test the mutex suspension and priority inheritance with another
thread resuming the higher priority thread by doing a mutex put. Higher-priority thread should preempt. */
diff --git a/test/tx/regression/threadx_mutex_proritize_test.c b/test/tx/regression/threadx_mutex_proritize_test.c
index bbc2845b..89988273 100644
--- a/test/tx/regression/threadx_mutex_proritize_test.c
+++ b/test/tx/regression/threadx_mutex_proritize_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test the mutex suspension prioritization. */
#include <stdio.h>
diff --git a/test/tx/regression/threadx_mutex_suspension_timeout_test.c b/test/tx/regression/threadx_mutex_suspension_timeout_test.c
index f1a9dfd0..84aed2e3 100644
--- a/test/tx/regression/threadx_mutex_suspension_timeout_test.c
+++ b/test/tx/regression/threadx_mutex_suspension_timeout_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test the mutex suspension and timeout functionality. */
#include <stdio.h>
diff --git a/test/tx/regression/threadx_mutex_thread_terminate_test.c b/test/tx/regression/threadx_mutex_thread_terminate_test.c
index ef21b92d..f4144524 100644
--- a/test/tx/regression/threadx_mutex_thread_terminate_test.c
+++ b/test/tx/regression/threadx_mutex_thread_terminate_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test thread terminate calls when threads are suspended on
a mutex. */
diff --git a/test/tx/regression/threadx_queue_basic_eight_word_test.c b/test/tx/regression/threadx_queue_basic_eight_word_test.c
index fb4640cc..d3271f2c 100644
--- a/test/tx/regression/threadx_queue_basic_eight_word_test.c
+++ b/test/tx/regression/threadx_queue_basic_eight_word_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test immediate response queue services including create
and delete. This test is for queue sizes of 8 ULONG. Two queues are used one with
a capacity of 1 message and another with a capacity of 3 messages. */
diff --git a/test/tx/regression/threadx_queue_basic_four_word_test.c b/test/tx/regression/threadx_queue_basic_four_word_test.c
index 4c54d8bd..49eb9a85 100644
--- a/test/tx/regression/threadx_queue_basic_four_word_test.c
+++ b/test/tx/regression/threadx_queue_basic_four_word_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test immediate response queue services including create
and delete. This test is for queue sizes of 4 ULONG. Two queues are used one with
a capacity of 1 message and another with a capacity of 3 messages. */
diff --git a/test/tx/regression/threadx_queue_basic_max_message_size_test.c b/test/tx/regression/threadx_queue_basic_max_message_size_test.c
index d62e80ff..0ad2be4e 100644
--- a/test/tx/regression/threadx_queue_basic_max_message_size_test.c
+++ b/test/tx/regression/threadx_queue_basic_max_message_size_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test immediate response queue services including create
and delete. This test is for queue sizes of 16 ULONG. Two queues are used one with
a capacity of 1 message and another with a capacity of 3 messages. */
diff --git a/test/tx/regression/threadx_queue_basic_one_word_test.c b/test/tx/regression/threadx_queue_basic_one_word_test.c
index 0e2f1fbc..1abb6986 100644
--- a/test/tx/regression/threadx_queue_basic_one_word_test.c
+++ b/test/tx/regression/threadx_queue_basic_one_word_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test immediate response queue services including create
and delete. This test is for queue sizes of 1 ULONG. Two queues are used one with
a capacity of 1 message and another with a capacity of 3 messages. */
diff --git a/test/tx/regression/threadx_queue_basic_sixteen_word_test.c b/test/tx/regression/threadx_queue_basic_sixteen_word_test.c
index de3ede98..42205d90 100644
--- a/test/tx/regression/threadx_queue_basic_sixteen_word_test.c
+++ b/test/tx/regression/threadx_queue_basic_sixteen_word_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test immediate response queue services including create
and delete. This test is for queue sizes of 16 ULONG. Two queues are used one with
a capacity of 1 message and another with a capacity of 3 messages. */
diff --git a/test/tx/regression/threadx_queue_basic_two_word_test.c b/test/tx/regression/threadx_queue_basic_two_word_test.c
index 46d85a6d..fa2a2fed 100644
--- a/test/tx/regression/threadx_queue_basic_two_word_test.c
+++ b/test/tx/regression/threadx_queue_basic_two_word_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test immediate response queue services including create
and delete. This test is for queue sizes of 2 ULONG. Two queues are used one with
a capacity of 1 message and another with a capacity of 3 messages. */
diff --git a/test/tx/regression/threadx_queue_empty_suspension_test.c b/test/tx/regression/threadx_queue_empty_suspension_test.c
index c63b1715..c0858ac8 100644
--- a/test/tx/regression/threadx_queue_empty_suspension_test.c
+++ b/test/tx/regression/threadx_queue_empty_suspension_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test empty queue suspension of queue that supports 3 messages
that are each 2 ULONG in size. */
diff --git a/test/tx/regression/threadx_queue_flush_no_suspension_test.c b/test/tx/regression/threadx_queue_flush_no_suspension_test.c
index 95bd5fed..5da58b74 100644
--- a/test/tx/regression/threadx_queue_flush_no_suspension_test.c
+++ b/test/tx/regression/threadx_queue_flush_no_suspension_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test the queue flush operation on a queue that has no threads
suspended on it. */
diff --git a/test/tx/regression/threadx_queue_flush_test.c b/test/tx/regression/threadx_queue_flush_test.c
index 77f8d2d5..a28e2288 100644
--- a/test/tx/regression/threadx_queue_flush_test.c
+++ b/test/tx/regression/threadx_queue_flush_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test the queue flush operation on a queue that has two threads
suspended on it. */
diff --git a/test/tx/regression/threadx_queue_front_send_test.c b/test/tx/regression/threadx_queue_front_send_test.c
index d03e7ac2..45b5dd65 100644
--- a/test/tx/regression/threadx_queue_front_send_test.c
+++ b/test/tx/regression/threadx_queue_front_send_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test immediate response queue services including queue front send.
This test is for queue sizes of 2 ULONG. */
diff --git a/test/tx/regression/threadx_queue_full_suspension_test.c b/test/tx/regression/threadx_queue_full_suspension_test.c
index 687ef04a..d1e1759f 100644
--- a/test/tx/regression/threadx_queue_full_suspension_test.c
+++ b/test/tx/regression/threadx_queue_full_suspension_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test queue full suspension of queue that supports 3 messages
that are each 2 ULONG in size. */
diff --git a/test/tx/regression/threadx_queue_information_test.c b/test/tx/regression/threadx_queue_information_test.c
index 5fcdbb8f..f884bd0d 100644
--- a/test/tx/regression/threadx_queue_information_test.c
+++ b/test/tx/regression/threadx_queue_information_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test the queue information services. */
#include <stdio.h>
diff --git a/test/tx/regression/threadx_queue_prioritize.c b/test/tx/regression/threadx_queue_prioritize.c
index 53c19275..f904a525 100644
--- a/test/tx/regression/threadx_queue_prioritize.c
+++ b/test/tx/regression/threadx_queue_prioritize.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test queue prioritize. */
#include <stdio.h>
diff --git a/test/tx/regression/threadx_queue_suspension_timeout_test.c b/test/tx/regression/threadx_queue_suspension_timeout_test.c
index 92dca991..aa05c0dc 100644
--- a/test/tx/regression/threadx_queue_suspension_timeout_test.c
+++ b/test/tx/regression/threadx_queue_suspension_timeout_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test queue full and empty suspension with timeouts on queues
that supports 3 messages that are each 2 ULONG in size. */
diff --git a/test/tx/regression/threadx_queue_thread_terminate_test.c b/test/tx/regression/threadx_queue_thread_terminate_test.c
index 97d8a569..42673c8d 100644
--- a/test/tx/regression/threadx_queue_thread_terminate_test.c
+++ b/test/tx/regression/threadx_queue_thread_terminate_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test thread terminate when the terminated thread is suspeded
on a queue. */
diff --git a/test/tx/regression/threadx_semaphore_basic_test.c b/test/tx/regression/threadx_semaphore_basic_test.c
index 33ee3257..3209b586 100644
--- a/test/tx/regression/threadx_semaphore_basic_test.c
+++ b/test/tx/regression/threadx_semaphore_basic_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test the semaphore create/delete and immediate return gets and puts. */
#include <stdio.h>
diff --git a/test/tx/regression/threadx_semaphore_ceiling_put_test.c b/test/tx/regression/threadx_semaphore_ceiling_put_test.c
index 7d4f5832..f7d7be73 100644
--- a/test/tx/regression/threadx_semaphore_ceiling_put_test.c
+++ b/test/tx/regression/threadx_semaphore_ceiling_put_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test the semaphore ceiling put. */
#include <stdio.h>
diff --git a/test/tx/regression/threadx_semaphore_delete_test.c b/test/tx/regression/threadx_semaphore_delete_test.c
index 2c9bc1aa..272a0252 100644
--- a/test/tx/regression/threadx_semaphore_delete_test.c
+++ b/test/tx/regression/threadx_semaphore_delete_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test the semaphore suspension and semaphore delete with
suspended threads. */
diff --git a/test/tx/regression/threadx_semaphore_information_test.c b/test/tx/regression/threadx_semaphore_information_test.c
index d2e9bd57..ede276e9 100644
--- a/test/tx/regression/threadx_semaphore_information_test.c
+++ b/test/tx/regression/threadx_semaphore_information_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test the semaphore information services. */
#include <stdio.h>
diff --git a/test/tx/regression/threadx_semaphore_non_preemption_test.c b/test/tx/regression/threadx_semaphore_non_preemption_test.c
index c075b16c..e3695e84 100644
--- a/test/tx/regression/threadx_semaphore_non_preemption_test.c
+++ b/test/tx/regression/threadx_semaphore_non_preemption_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test the semaphore suspension and another thread resuming the
same priority thread by doing a semaphore put. */
diff --git a/test/tx/regression/threadx_semaphore_preemption_test.c b/test/tx/regression/threadx_semaphore_preemption_test.c
index f14193a2..33677c01 100644
--- a/test/tx/regression/threadx_semaphore_preemption_test.c
+++ b/test/tx/regression/threadx_semaphore_preemption_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test the semaphore suspension and another thread resuming the
higher priority thread by doing a semaphore put. Higher-priority thread should preempt. */
diff --git a/test/tx/regression/threadx_semaphore_prioritize.c b/test/tx/regression/threadx_semaphore_prioritize.c
index 6bee4656..30d04590 100644
--- a/test/tx/regression/threadx_semaphore_prioritize.c
+++ b/test/tx/regression/threadx_semaphore_prioritize.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test semaphore prioritize. */
#include <stdio.h>
diff --git a/test/tx/regression/threadx_semaphore_thread_terminate_test.c b/test/tx/regression/threadx_semaphore_thread_terminate_test.c
index a15f5963..7055ed07 100644
--- a/test/tx/regression/threadx_semaphore_thread_terminate_test.c
+++ b/test/tx/regression/threadx_semaphore_thread_terminate_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test thread terminate calls when threads are suspended on
a semaphore. */
diff --git a/test/tx/regression/threadx_semaphore_timeout_test.c b/test/tx/regression/threadx_semaphore_timeout_test.c
index 96585337..07e25596 100644
--- a/test/tx/regression/threadx_semaphore_timeout_test.c
+++ b/test/tx/regression/threadx_semaphore_timeout_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test the semaphore suspension and timeout functionality. */
#include <stdio.h>
@@ -163,5 +174,3 @@ ULONG now;
test_control_return(0);
}
}
-
-
diff --git a/test/tx/regression/threadx_test_port.h b/test/tx/regression/threadx_test_port.h
new file mode 100644
index 00000000..b8502b4d
--- /dev/null
+++ b/test/tx/regression/threadx_test_port.h
@@ -0,0 +1,37 @@
+/***************************************************************************
+ * 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.
+ *
+ * AI Disclosure: This file was largely AI-generated by Codex (gpt 5.4).
+ * The AI-generated portions may be considered public domain (CC0-1.0)
+ * and not subject to the project's licence. The human contributor has
+ * reviewed and verified that the code is correct.
+ *
+ * SPDX-License-Identifier: MIT and CC0-1.0
+ **************************************************************************/
+
+#ifndef THREADX_TEST_PORT_H
+#define THREADX_TEST_PORT_H
+
+#include "tx_api.h"
+
+/* Preserve the original 32-bit test expectations for pool capacity. */
+
+#define TX_TEST_BYTE_POOL_BASELINE_OVERHEAD ((ULONG) (2U * sizeof(ULONG)))
+#define TX_TEST_BYTE_POOL_OVERHEAD ((ULONG) (sizeof(VOID *) + sizeof(ALIGN_TYPE)))
+#define TX_TEST_BYTE_POOL_ALIGN(a) ((ULONG) (((((ULONG) (a)) + ((ULONG) sizeof(ALIGN_TYPE)) - ((ULONG) 1)) / ((ULONG) sizeof(ALIGN_TYPE))) * ((ULONG) sizeof(ALIGN_TYPE))))
+#define TX_TEST_BYTE_POOL_BYTES(a) ((ULONG) ((a) + (2U * (TX_TEST_BYTE_POOL_OVERHEAD - TX_TEST_BYTE_POOL_BASELINE_OVERHEAD))))
+#define TX_TEST_BYTE_POOL_CAPACITY_BYTES(a, b) ((ULONG) (((b) * TX_TEST_BYTE_POOL_ALIGN(a)) + (((b) + 1U) * TX_TEST_BYTE_POOL_OVERHEAD)))
+#define TX_TEST_BYTE_POOL_SEARCH_OFFSET TX_TEST_BYTE_POOL_OVERHEAD
+
+#define TX_TEST_BLOCK_POOL_ALIGN(a) ((ULONG) (((((ULONG) (a)) + ((ULONG) sizeof(ALIGN_TYPE)) - ((ULONG) 1)) / ((ULONG) sizeof(ALIGN_TYPE))) * ((ULONG) sizeof(ALIGN_TYPE))))
+#define TX_TEST_BLOCK_POOL_BYTES(a, b) ((ULONG) ((b) * (TX_TEST_BLOCK_POOL_ALIGN(a) + ((ULONG) sizeof(UCHAR *)))))
+
+typedef ALIGN_TYPE TX_TEST_POINTER_WORD;
+
+#define TX_TEST_STORE_POINTER(a, b) (a) = ((TX_TEST_POINTER_WORD) TX_POINTER_TO_ALIGN_TYPE_CONVERT(b))
+
+#endif
diff --git a/test/tx/regression/threadx_thread_basic_execution_test.c b/test/tx/regression/threadx_thread_basic_execution_test.c
index 9949eac8..c51a677c 100644
--- a/test/tx/regression/threadx_thread_basic_execution_test.c
+++ b/test/tx/regression/threadx_thread_basic_execution_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to see if one thread can be created and executed.
It thread_0_entry is hit, then the thread was successfully scheduled.
On success, thread_0_counter gets incremented. */
@@ -11,6 +22,7 @@
#include "tx_queue.h"
#include "tx_semaphore.h"
#include "tx_thread.h"
+#include "tx_timer.h"
typedef struct THREAD_MEMORY_TEST_STRUCT
@@ -52,6 +64,9 @@ static unsigned long timer_executed = 0;
static unsigned long isr_executed = 0;
+extern TX_TIMER_INTERNAL *_tx_timer_expired_timer_ptr;
+
+
/* Define task prototypes. */
static void thread_0_entry(ULONG task_input);
@@ -386,7 +401,21 @@ VOID (*temp_mutex_release)(TX_THREAD *thread_ptr);
test_thread.tx_thread_timer.tx_timer_internal_list_head = TX_NULL;
test_thread.tx_thread_suspending = TX_TRUE;
test_thread.tx_thread_delayed_suspend = TX_TRUE;
+#if defined(_WIN64) || defined(TX_TIMER_EXTENSION_PTR_DEFINED)
+ {
+ TX_TIMER_INTERNAL timeout_timer;
+ TX_TIMER_INTERNAL *saved_expired_timer_ptr;
+
+ TX_MEMSET(&timeout_timer, 0, sizeof(TX_TIMER_INTERNAL));
+ saved_expired_timer_ptr = _tx_timer_expired_timer_ptr;
+ _tx_timer_expired_timer_ptr = &timeout_timer;
+ timeout_timer.tx_timer_internal_extension_ptr = (VOID *) &test_thread;
+ _tx_thread_timeout(0);
+ _tx_timer_expired_timer_ptr = saved_expired_timer_ptr;
+ }
+#else
_tx_thread_timeout((ULONG) &test_thread);
+#endif
/* Setup test thread to make sure _tx_thread_terminate can handle a NULL mutex release function pointer. */
temp_mutex_release = _tx_thread_mutex_release;
@@ -813,7 +842,7 @@ VOID (*temp_mutex_release)(TX_THREAD *thread_ptr);
test_control_return(1);
}
- /* Attempt a thread termiante with a NULL pointer. */
+ /* Attempt a thread terminate with a NULL pointer. */
status = tx_thread_terminate(TX_NULL);
/* Check for status. */
@@ -836,7 +865,7 @@ VOID (*temp_mutex_release)(TX_THREAD *thread_ptr);
test_control_return(1);
}
- /* Attempt a thread time-slice chagne with a NULL pointer. */
+ /* Attempt a thread time-slice change with a NULL pointer. */
status = tx_thread_time_slice_change(TX_NULL, 1, &old_time_slice);
/* Check for status. */
@@ -975,5 +1004,3 @@ TX_INTERRUPT_SAVE_AREA
#endif
#endif
-
-
diff --git a/test/tx/regression/threadx_thread_basic_time_slice_test.c b/test/tx/regression/threadx_thread_basic_time_slice_test.c
index 7c83a715..a4adf72d 100644
--- a/test/tx/regression/threadx_thread_basic_time_slice_test.c
+++ b/test/tx/regression/threadx_thread_basic_time_slice_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to see if a thread can be created with a time-slice.
No time-slice occurs, only the processing to check for time-slicing. */
diff --git a/test/tx/regression/threadx_thread_completed_test.c b/test/tx/regression/threadx_thread_completed_test.c
index adaf1683..e8b609e3 100644
--- a/test/tx/regression/threadx_thread_completed_test.c
+++ b/test/tx/regression/threadx_thread_completed_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to see if one thread can be created, executed, and
return to the thread shell function. The thread shell function places
the thread in a finished state. */
diff --git a/test/tx/regression/threadx_thread_create_preemption_threshold_test.c b/test/tx/regression/threadx_thread_create_preemption_threshold_test.c
index 58ce79fe..b53179cb 100644
--- a/test/tx/regression/threadx_thread_create_preemption_threshold_test.c
+++ b/test/tx/regression/threadx_thread_create_preemption_threshold_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test for preemption-threshold use during thread creation during initialization. */
#include <stdio.h>
diff --git a/test/tx/regression/threadx_thread_delayed_suspension_test.c b/test/tx/regression/threadx_thread_delayed_suspension_test.c
index 91128f83..2bf26421 100644
--- a/test/tx/regression/threadx_thread_delayed_suspension_test.c
+++ b/test/tx/regression/threadx_thread_delayed_suspension_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test checks out the delayed suspension clear from tx_thread_resume. */
#include <stdio.h>
@@ -56,7 +67,7 @@ static volatile ULONG destination = 0;
static ULONG start_time;
static ULONG lower_bound;
static ULONG upper_bound;
-static ULONG current_itterations;
+static ULONG current_iterations;
#ifdef DEBUG_1
static ULONG last_loop_count;
#endif
@@ -106,9 +117,9 @@ ULONG i;
if (upper_bound > max_loop_count)
lower_bound = max_loop_count;
- if ((current_itterations < lower_bound) || (current_itterations > upper_bound))
- current_itterations = lower_bound;
-
+ if ((current_iterations < lower_bound) || (current_iterations > upper_bound))
+ current_iterations = lower_bound;
+
#ifdef DEBUG_1
/* Last loop count. */
last_loop_count = loop_count;
@@ -350,7 +361,7 @@ ULONG i;
lower_bound = lower_bound - 5;
upper_bound = max_loop_count + 5;
- current_itterations = lower_bound;
+ current_iterations = lower_bound;
/* This thread simply suspends over and over... */
while(1)
@@ -366,20 +377,20 @@ ULONG i;
/* Call delay function. */
delay_function();
loop_count++;
- } while (loop_count < current_itterations);
+ } while (loop_count < current_iterations);
/* Suspend this thread. */
tx_semaphore_get(&semaphore_1, TX_WAIT_FOREVER);
- /* Adjust the current itterations. */
- current_itterations++;
- if (current_itterations > upper_bound)
+ /* Adjust the current iterations. */
+ current_iterations++;
+ if (current_iterations > upper_bound)
{
if (lower_bound > min_loop_count)
lower_bound--;
if (upper_bound < max_loop_count)
upper_bound++;
- current_itterations = lower_bound;
+ current_iterations = lower_bound;
}
/* Increment the thread counter. */
diff --git a/test/tx/regression/threadx_thread_information_test.c b/test/tx/regression/threadx_thread_information_test.c
index 19107742..b5d06e71 100644
--- a/test/tx/regression/threadx_thread_information_test.c
+++ b/test/tx/regression/threadx_thread_information_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is for the thread information services. */
#include <stdio.h>
diff --git a/test/tx/regression/threadx_thread_multi_level_preemption_threshold_test.c b/test/tx/regression/threadx_thread_multi_level_preemption_threshold_test.c
index 8944da46..59ed4f4d 100644
--- a/test/tx/regression/threadx_thread_multi_level_preemption_threshold_test.c
+++ b/test/tx/regression/threadx_thread_multi_level_preemption_threshold_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test multi-level preemption threshold. The protection placed
by a thread must be preserved after higher-priority thread preemption that is above the threshold. */
diff --git a/test/tx/regression/threadx_thread_multiple_non_current_test.c b/test/tx/regression/threadx_thread_multiple_non_current_test.c
index 50ed17a0..a0acc1b9 100644
--- a/test/tx/regression/threadx_thread_multiple_non_current_test.c
+++ b/test/tx/regression/threadx_thread_multiple_non_current_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to see if multiple non-current threads can be suspended.
The order the suspension and resumption occurs makes sure everything is working
right. Thread execution should remain predictable even after suspension and
diff --git a/test/tx/regression/threadx_thread_multiple_sleep_test.c b/test/tx/regression/threadx_thread_multiple_sleep_test.c
index f2ae3b99..8c5db032 100644
--- a/test/tx/regression/threadx_thread_multiple_sleep_test.c
+++ b/test/tx/regression/threadx_thread_multiple_sleep_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test multiple threads sleeping for 33 ticks. */
#include <stdio.h>
diff --git a/test/tx/regression/threadx_thread_multiple_suspension_test.c b/test/tx/regression/threadx_thread_multiple_suspension_test.c
index 01c42e8f..d6577b53 100644
--- a/test/tx/regression/threadx_thread_multiple_suspension_test.c
+++ b/test/tx/regression/threadx_thread_multiple_suspension_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to see if multiple threads can be created and suspend.
The order the suspension and resumption occurs makes sure everything is working
right. All the counters should increment at the same rate. */
diff --git a/test/tx/regression/threadx_thread_multiple_time_slice_test.c b/test/tx/regression/threadx_thread_multiple_time_slice_test.c
index f3e9fbf0..af3d8019 100644
--- a/test/tx/regression/threadx_thread_multiple_time_slice_test.c
+++ b/test/tx/regression/threadx_thread_multiple_time_slice_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to see if two threads can be created and execute with a time-slice.
Thread 7 should run twice as long because it has more of a time-slice. */
diff --git a/test/tx/regression/threadx_thread_preemptable_suspension_test.c b/test/tx/regression/threadx_thread_preemptable_suspension_test.c
index 8e4dbdd6..acd426c6 100644
--- a/test/tx/regression/threadx_thread_preemptable_suspension_test.c
+++ b/test/tx/regression/threadx_thread_preemptable_suspension_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to see if multiple threads can be created and suspended.
The order the suspension and resumption occurs makes sure everything is working right.
All the counters should increment at the same rate. This test differs from test 4 in
diff --git a/test/tx/regression/threadx_thread_preemption_change_test.c b/test/tx/regression/threadx_thread_preemption_change_test.c
index ca0a3c72..2144df19 100644
--- a/test/tx/regression/threadx_thread_preemption_change_test.c
+++ b/test/tx/regression/threadx_thread_preemption_change_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test the change preemption service call. */
#include <stdio.h>
diff --git a/test/tx/regression/threadx_thread_priority_change.c b/test/tx/regression/threadx_thread_priority_change.c
index 6a61e2cf..1cb52ff9 100644
--- a/test/tx/regression/threadx_thread_priority_change.c
+++ b/test/tx/regression/threadx_thread_priority_change.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test the change priority service call. */
#include <stdio.h>
diff --git a/test/tx/regression/threadx_thread_relinquish_test.c b/test/tx/regression/threadx_thread_relinquish_test.c
index 5b180d84..fc8b09ed 100644
--- a/test/tx/regression/threadx_thread_relinquish_test.c
+++ b/test/tx/regression/threadx_thread_relinquish_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to see if multiple threads can be created and relinquish control between them. */
#include <stdio.h>
diff --git a/test/tx/regression/threadx_thread_reset_test.c b/test/tx/regression/threadx_thread_reset_test.c
index a709d163..56006be1 100644
--- a/test/tx/regression/threadx_thread_reset_test.c
+++ b/test/tx/regression/threadx_thread_reset_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test the tx_thread_reset function. */
#include <stdio.h>
diff --git a/test/tx/regression/threadx_thread_simple_sleep_non_clear_test.c b/test/tx/regression/threadx_thread_simple_sleep_non_clear_test.c
index df8bb62b..16bd5096 100644
--- a/test/tx/regression/threadx_thread_simple_sleep_non_clear_test.c
+++ b/test/tx/regression/threadx_thread_simple_sleep_non_clear_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test a simple sleep for 18 ticks, with something in the
remaining field of the thread control block. */
@@ -89,4 +100,3 @@ ULONG now;
test_control_return(1);
}
}
-
diff --git a/test/tx/regression/threadx_thread_simple_sleep_test.c b/test/tx/regression/threadx_thread_simple_sleep_test.c
index f038fafd..f7af480c 100644
--- a/test/tx/regression/threadx_thread_simple_sleep_test.c
+++ b/test/tx/regression/threadx_thread_simple_sleep_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test a simple sleep for 18 ticks. */
#include <stdio.h>
@@ -84,4 +95,3 @@ ULONG now;
test_control_return(1);
}
}
-
diff --git a/test/tx/regression/threadx_thread_simple_suspend_test.c b/test/tx/regression/threadx_thread_simple_suspend_test.c
index a05797ec..5089fd64 100644
--- a/test/tx/regression/threadx_thread_simple_suspend_test.c
+++ b/test/tx/regression/threadx_thread_simple_suspend_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to see if a thread can successfully suspend itself in a single
thread system. This also tests a thread created that is not automatically enabled. */
@@ -25,7 +36,7 @@ void test_control_return(UINT status);
#ifdef CTEST
void test_application_define(void *first_unused_memory)
#else
-void threadx_thread_simple_supsend_application_define(void *first_unused_memory)
+void threadx_thread_simple_suspend_application_define(void *first_unused_memory)
#endif
{
diff --git a/test/tx/regression/threadx_thread_sleep_for_100ticks_test.c b/test/tx/regression/threadx_thread_sleep_for_100ticks_test.c
index d5c335f0..e6ebf170 100644
--- a/test/tx/regression/threadx_thread_sleep_for_100ticks_test.c
+++ b/test/tx/regression/threadx_thread_sleep_for_100ticks_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test a simple sleep for 100 ticks. */
#include <stdio.h>
@@ -42,7 +53,7 @@ static ULONG array_delay[ARRAY_SIZE];
static ULONG start_time;
static ULONG lower_bound;
static ULONG upper_bound;
-static ULONG current_itterations;
+static ULONG current_iterations;
#ifdef DEBUG_1
static ULONG last_loop_count;
#endif
@@ -108,9 +119,9 @@ ULONG i;
if (upper_bound > max_loop_count)
lower_bound = max_loop_count;
- if ((current_itterations < lower_bound) || (current_itterations > upper_bound))
- current_itterations = lower_bound;
-
+ if ((current_iterations < lower_bound) || (current_iterations > upper_bound))
+ current_iterations = lower_bound;
+
#ifdef DEBUG_1
/* Last loop count. */
last_loop_count = loop_count;
@@ -218,7 +229,7 @@ CHAR *pointer;
min_loop_count = 0xFFFFFFFF;
max_loop_count = 0;
loop_count = 0xFFFFFFFF;
- current_itterations = 0;
+ current_iterations = 0;
#ifdef DEBUG_1
last_loop_count = 0x0;
#endif
@@ -305,7 +316,7 @@ volatile ULONG value = 0;
upper_bound = max_loop_count;
#endif
- current_itterations = lower_bound;
+ current_iterations = lower_bound;
#ifdef DEBUG
i = 0;
#endif
@@ -323,7 +334,7 @@ volatile ULONG value = 0;
/* Call delay function. */
delay_function();
loop_count++;
- } while (loop_count < current_itterations);
+ } while (loop_count < current_iterations);
/* Check for a timer interrupt... if so, just skip the semaphore get. */
if (start_time != _tx_timer_system_clock)
@@ -331,16 +342,16 @@ volatile ULONG value = 0;
/* Suspend on the semaphore for 20 ticks... */
tx_semaphore_get(&test_semaphore, 20);
-
- /* Adjust the current itterations. */
- current_itterations++;
- if (current_itterations > upper_bound)
+
+ /* Adjust the current iterations. */
+ current_iterations++;
+ if (current_iterations > upper_bound)
{
if (lower_bound > min_loop_count)
lower_bound--;
if (upper_bound < max_loop_count)
upper_bound++;
- current_itterations = lower_bound;
+ current_iterations = lower_bound;
}
/* Set the tick count simply to use value. */
@@ -355,7 +366,7 @@ volatile ULONG value = 0;
printf("loop count: NA\n");
else
printf("loop count: %lu\n", loop_count);
- printf("current: %lu\n", current_itterations);
+ printf("current: %lu\n", current_iterations);
printf("last loop count: %lu\n", last_loop_count);
printf("minimum: %lu\n", min_loop_count);
printf("maximum: %lu\n", max_loop_count);
@@ -373,7 +384,7 @@ volatile ULONG value = 0;
printf("loop count: NA\n");
else
printf("loop count: %lu\n", loop_count);
- printf("current: %lu\n", current_itterations);
+ printf("current: %lu\n", current_iterations);
printf("last loop count: %lu\n", last_loop_count);
printf("minimum: %lu\n", min_loop_count);
printf("maximum: %lu\n", max_loop_count);
@@ -432,4 +443,3 @@ volatile ULONG value = 0;
test_control_return(0);
}
}
-
diff --git a/test/tx/regression/threadx_thread_sleep_terminate_test.c b/test/tx/regression/threadx_thread_sleep_terminate_test.c
index 98862051..374f5d43 100644
--- a/test/tx/regression/threadx_thread_sleep_terminate_test.c
+++ b/test/tx/regression/threadx_thread_sleep_terminate_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test thread termination of a thread in a sleep condition. */
#include <stdio.h>
diff --git a/test/tx/regression/threadx_thread_stack_checking_test.c b/test/tx/regression/threadx_thread_stack_checking_test.c
index 940b6c6b..9db10d0a 100644
--- a/test/tx/regression/threadx_thread_stack_checking_test.c
+++ b/test/tx/regression/threadx_thread_stack_checking_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is for the thread stack checking services. */
#include <stdio.h>
diff --git a/test/tx/regression/threadx_thread_terminate_delete_test.c b/test/tx/regression/threadx_thread_terminate_delete_test.c
index 63fd6a69..2ca2de85 100644
--- a/test/tx/regression/threadx_thread_terminate_delete_test.c
+++ b/test/tx/regression/threadx_thread_terminate_delete_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test thread terminate (self, and other), thread delete,
and thread identify services. */
@@ -244,7 +255,7 @@ UINT status;
test_control_return(1);
}
- /* Delete thread 1 (thread 1 alread terminated) and 2. */
+ /* Delete thread 1 (thread 1 alreadyterminated) and 2. */
status = tx_thread_delete(&thread_2);
/* Check for status. */
diff --git a/test/tx/regression/threadx_thread_time_slice_change_test.c b/test/tx/regression/threadx_thread_time_slice_change_test.c
index 0122fc2a..ab35bd19 100644
--- a/test/tx/regression/threadx_thread_time_slice_change_test.c
+++ b/test/tx/regression/threadx_thread_time_slice_change_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test the change time-slice service call. */
#include <stdio.h>
diff --git a/test/tx/regression/threadx_thread_wait_abort_and_isr_test.c b/test/tx/regression/threadx_thread_wait_abort_and_isr_test.c
index bc7446f7..e15b410f 100644
--- a/test/tx/regression/threadx_thread_wait_abort_and_isr_test.c
+++ b/test/tx/regression/threadx_thread_wait_abort_and_isr_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test for simultaneous thread suspension lifting AND thread wait abort calls. */
#include <stdio.h>
diff --git a/test/tx/regression/threadx_thread_wait_abort_test.c b/test/tx/regression/threadx_thread_wait_abort_test.c
index 49852ec1..0c3f21f2 100644
--- a/test/tx/regression/threadx_thread_wait_abort_test.c
+++ b/test/tx/regression/threadx_thread_wait_abort_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test thread wait abort. */
#include <stdio.h>
diff --git a/test/tx/regression/threadx_time_get_set_test.c b/test/tx/regression/threadx_time_get_set_test.c
index 06b8e6f5..242735ec 100644
--- a/test/tx/regression/threadx_time_get_set_test.c
+++ b/test/tx/regression/threadx_time_get_set_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test simple tx_time_get and set services. */
#include <stdio.h>
@@ -104,4 +115,3 @@ ULONG current_time;
test_control_return(0);
}
}
-
diff --git a/test/tx/regression/threadx_timer_activate_deactivate_test.c b/test/tx/regression/threadx_timer_activate_deactivate_test.c
index 69f9b38f..ceaf79bf 100644
--- a/test/tx/regression/threadx_timer_activate_deactivate_test.c
+++ b/test/tx/regression/threadx_timer_activate_deactivate_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test application timer activation/deactivation services
from threads and the activation routines. */
diff --git a/test/tx/regression/threadx_timer_deactivate_accuracy_test.c b/test/tx/regression/threadx_timer_deactivate_accuracy_test.c
index 625b82a6..0da41a7a 100644
--- a/test/tx/regression/threadx_timer_deactivate_accuracy_test.c
+++ b/test/tx/regression/threadx_timer_deactivate_accuracy_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test application timer activation/deactivation services
from threads... Make sure the remaining ticks are being saved/restored properly. */
diff --git a/test/tx/regression/threadx_timer_information_test.c b/test/tx/regression/threadx_timer_information_test.c
index 7954de2c..ae3bb414 100644
--- a/test/tx/regression/threadx_timer_information_test.c
+++ b/test/tx/regression/threadx_timer_information_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test timer information services. */
#include <stdio.h>
diff --git a/test/tx/regression/threadx_timer_large_timer_accuracy_test.c b/test/tx/regression/threadx_timer_large_timer_accuracy_test.c
index 726523b9..f44d4f05 100644
--- a/test/tx/regression/threadx_timer_large_timer_accuracy_test.c
+++ b/test/tx/regression/threadx_timer_large_timer_accuracy_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test application timer activation/deactivation services
from threads... To make sure large timer expirations are being saved/restored properly. */
diff --git a/test/tx/regression/threadx_timer_multiple_accuracy_test.c b/test/tx/regression/threadx_timer_multiple_accuracy_test.c
index af9957d8..a4cceefa 100644
--- a/test/tx/regression/threadx_timer_multiple_accuracy_test.c
+++ b/test/tx/regression/threadx_timer_multiple_accuracy_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test the accuracy of three free running timers. */
#include <stdio.h>
@@ -183,4 +194,3 @@ static void timer_2_expiration(ULONG timer_input)
/* Process timer expiration. */
timer_2_counter++;
}
-
diff --git a/test/tx/regression/threadx_timer_multiple_test.c b/test/tx/regression/threadx_timer_multiple_test.c
index 688a7d5b..f8d99e5c 100644
--- a/test/tx/regression/threadx_timer_multiple_test.c
+++ b/test/tx/regression/threadx_timer_multiple_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test a simple application timer services,
including create, activate, deactivate, change, and delete with multiple timers. */
@@ -346,4 +357,3 @@ static void timer_2_expiration(ULONG timer_input)
/* Process timer expiration. */
timer_2_counter++;
}
-
diff --git a/test/tx/regression/threadx_timer_simple_test.c b/test/tx/regression/threadx_timer_simple_test.c
index 7fdf022e..cad67086 100644
--- a/test/tx/regression/threadx_timer_simple_test.c
+++ b/test/tx/regression/threadx_timer_simple_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test a simple application timer services, including create,
activate, deactivate, change, and delete. */
diff --git a/test/tx/regression/threadx_trace_basic_test.c b/test/tx/regression/threadx_trace_basic_test.c
index 0914650f..c40be8f1 100644
--- a/test/tx/regression/threadx_trace_basic_test.c
+++ b/test/tx/regression/threadx_trace_basic_test.c
@@ -1,3 +1,14 @@
+/***************************************************************************/
+/* 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 test is designed to test trace functionality in ThreadX. */