67 bool always_set_to_false,
74#define RTEMS_TEST_INITIAL_EXTENSION \
75 { NULL, NULL, NULL, NULL, NULL, NULL, NULL, rtems_test_fatal_extension, NULL }
82 RTEMS_TEST_STATE_PASS,
83 RTEMS_TEST_STATE_FAIL,
84 RTEMS_TEST_STATE_USER_INPUT,
85 RTEMS_TEST_STATE_INDETERMINATE,
86 RTEMS_TEST_STATE_BENCHMARK
89#if (TEST_STATE_EXPECTED_FAIL && TEST_STATE_USER_INPUT) || \
90 (TEST_STATE_EXPECTED_FAIL && TEST_STATE_INDETERMINATE) || \
91 (TEST_STATE_EXPECTED_FAIL && TEST_STATE_BENCHMARK) || \
92 (TEST_STATE_USER_INPUT && TEST_STATE_INDETERMINATE) || \
93 (TEST_STATE_USER_INPUT && TEST_STATE_BENCHMARK) || \
94 (TEST_STATE_INDETERMINATE && TEST_STATE_BENCHMARK)
95 #error Test states must be unique
98#if TEST_STATE_EXPECTED_FAIL
99 #define TEST_STATE RTEMS_TEST_STATE_FAIL
100#elif TEST_STATE_USER_INPUT
101 #define TEST_STATE RTEMS_TEST_STATE_USER_INPUT
102#elif TEST_STATE_INDETERMINATE
103 #define TEST_STATE RTEMS_TEST_STATE_INDETERMINATE
104#elif TEST_STATE_BENCHMARK
105 #define TEST_STATE RTEMS_TEST_STATE_BENCHMARK
107 #define TEST_STATE RTEMS_TEST_STATE_PASS
130#define RTEMS_TEST_PARALLEL_PROCESSOR_MAX 32
141 rtems_id worker_ids[RTEMS_TEST_PARALLEL_PROCESSOR_MAX];
184 size_t active_workers
200 size_t active_workers,
218 size_t active_workers
244static inline bool rtems_test_parallel_stop_job(
248 return _Atomic_Load_ulong(&ctx->stop, ATOMIC_ORDER_RELAXED) != 0;
261static inline bool rtems_test_parallel_is_master_worker(
size_t worker_index)
263 return worker_index == 0;
274static inline rtems_id rtems_test_parallel_get_task_id(
279 return ctx->worker_ids[worker_index];
#define RTEMS_NO_RETURN
Tells the compiler in a function declaration that this function does not return.
Definition: basedefs.h:386
CPU_Uint32ptr rtems_task_argument
This integer type represents task argument values.
Definition: tasks.h:100
Objects_Id rtems_id
This type represents RTEMS object identifiers.
Definition: types.h:94
Watchdog_Interval rtems_interval
This type represents clock tick intervals.
Definition: types.h:114
Internal_errors_t rtems_fatal_code
This integer type represents system termination codes.
Definition: extension.h:161
Internal_errors_Source
This type lists the possible sources from which an error can be reported.
Definition: interr.h:63
void rtems_test_gcov_dump_info(void)
Dumps the gcov information as a base64 encoded gcfn and gcda data stream using rtems_put_char().
Definition: testgcovdumpinfo.c:63
void rtems_test_busy_cpu_usage(time_t seconds, long nanoseconds)
Performs a busy loop for the specified seconds and nanoseconds based on the CPU usage of the executin...
Definition: testbusy.c:36
RTEMS_NO_RETURN void rtems_test_exit(int status)
Exit the test without calling exit() since it closes stdin, etc and pulls in stdio code.
Definition: testbeginend.c:106
const char rtems_test_name[]
Each test must define a test name string.
Definition: init.c:6899
RTEMS_NO_RETURN void rtems_test_run(rtems_task_argument arg, const RTEMS_TEST_STATE state)
Runs the test cases of the RTEMS Test Framework using a default configuration in the context of a tas...
Definition: testrun.c:83
void rtems_test_fatal_extension(rtems_fatal_source source, bool always_set_to_false, rtems_fatal_code code)
Fatal extension for tests.
Definition: testextension.c:43
void(* rtems_test_parallel_worker_setup)(rtems_test_parallel_context *ctx, size_t worker_index, rtems_id worker_id)
Worker task setup handler.
Definition: test-info.h:157
RTEMS_TEST_STATE
Test states.
Definition: test-info.h:81
void rtems_test_parallel(rtems_test_parallel_context *ctx, rtems_test_parallel_worker_setup worker_setup, const rtems_test_parallel_job *jobs, size_t job_count)
Runs a bunch of jobs in parallel on all processors of the system.
Definition: testparallel.c:136
int rtems_test_begin(const char *name, const RTEMS_TEST_STATE state)
Prints a begin of test message using printf().
Definition: testbeginend.c:61
int rtems_test_end(const char *name)
Prints an end of test message using printf().
Definition: testbeginend.c:98
This header file provides the interfaces of the Atomic Operations.
This header file defines the RTEMS Classic API.
This header file provides the interfaces of the SMP Barriers.
SMP barrier control.
Definition: smpbarrier.h:67
Definition: inftrees.h:24
Internal context for parallel job execution.
Definition: test-info.h:137
Basic parallel job description.
Definition: test-info.h:166
rtems_interval(* init)(rtems_test_parallel_context *ctx, void *arg, size_t active_workers)
Job initialization handler.
Definition: test-info.h:181
void * arg
Job specific argument.
Definition: test-info.h:224
void(* body)(rtems_test_parallel_context *ctx, void *arg, size_t active_workers, size_t worker_index)
Job body handler.
Definition: test-info.h:197
void(* fini)(rtems_test_parallel_context *ctx, void *arg, size_t active_workers)
Job finalization handler.
Definition: test-info.h:215
bool cascade
Job cascading flag.
Definition: test-info.h:233