forked from Imagelibrary/rtems
tests/smptests: Use <rtems/test.h>
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
const char rtems_test_name[] = "SMP 1";
|
||||
|
||||
void Loop() {
|
||||
volatile int i;
|
||||
|
||||
@@ -40,10 +42,10 @@ rtems_task Init(
|
||||
* debug messages go away.
|
||||
*/
|
||||
Loop();
|
||||
locked_print_initialize();
|
||||
|
||||
/* Put start of test message */
|
||||
locked_printf( "\n\n*** SMP01 TEST ***\n" );
|
||||
TEST_BEGIN();
|
||||
|
||||
locked_print_initialize();
|
||||
|
||||
/* Initialize the TaskRan array */
|
||||
for ( i=0; i<rtems_smp_get_processor_count() ; i++ ) {
|
||||
@@ -81,7 +83,7 @@ rtems_task Init(
|
||||
allDone = false;
|
||||
}
|
||||
if (allDone) {
|
||||
locked_printf( "*** END OF TEST SMP01 ***\n" );
|
||||
TEST_END();
|
||||
rtems_test_exit( 0 );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,6 +32,8 @@ rtems_task Test_task(
|
||||
(1 + CONFIGURE_SMP_MAXIMUM_PROCESSORS)
|
||||
#define CONFIGURE_MAXIMUM_SEMAPHORES 1
|
||||
|
||||
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
|
||||
|
||||
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||
|
||||
#include <rtems/confdefs.h>
|
||||
|
||||
@@ -17,9 +17,11 @@
|
||||
#include <stdio.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
const char rtems_test_name[] = "SMP 2";
|
||||
|
||||
static void success(void)
|
||||
{
|
||||
locked_printf( "*** END OF TEST SMP02 ***\n" );
|
||||
TEST_END();
|
||||
rtems_test_exit( 0 );
|
||||
}
|
||||
|
||||
@@ -34,8 +36,9 @@ rtems_task Init(
|
||||
rtems_status_code status;
|
||||
char str[80];
|
||||
|
||||
TEST_BEGIN();
|
||||
|
||||
locked_print_initialize();
|
||||
locked_printf( "\n\n*** SMP02 TEST ***\n" );
|
||||
|
||||
if ( rtems_smp_get_processor_count() == 1 ) {
|
||||
success();
|
||||
|
||||
@@ -31,6 +31,8 @@ rtems_task Test_task(
|
||||
#define CONFIGURE_MAXIMUM_TASKS \
|
||||
(1 + CONFIGURE_SMP_MAXIMUM_PROCESSORS)
|
||||
|
||||
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
|
||||
|
||||
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||
#define CONFIGURE_INIT_TASK_STACK_SIZE \
|
||||
(3 * CONFIGURE_MINIMUM_TASK_STACK_SIZE)
|
||||
|
||||
@@ -17,9 +17,11 @@
|
||||
#include <stdio.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
const char rtems_test_name[] = "SMP 3";
|
||||
|
||||
static void success(void)
|
||||
{
|
||||
locked_printf( "*** END OF TEST SMP03 ***\n" );
|
||||
TEST_END();
|
||||
rtems_test_exit( 0 );
|
||||
}
|
||||
|
||||
@@ -50,9 +52,10 @@ rtems_task Init(
|
||||
rtems_status_code status;
|
||||
|
||||
Loop();
|
||||
locked_print_initialize();
|
||||
|
||||
locked_printf( "\n\n*** SMP03 TEST ***\n" );
|
||||
TEST_BEGIN();
|
||||
|
||||
locked_print_initialize();
|
||||
|
||||
if ( rtems_smp_get_processor_count() == 1 ) {
|
||||
success();
|
||||
|
||||
@@ -33,6 +33,8 @@ rtems_task Test_task(
|
||||
|
||||
#define CONFIGURE_MAXIMUM_SEMAPHORES 1
|
||||
|
||||
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
|
||||
|
||||
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||
#define CONFIGURE_INIT_TASK_STACK_SIZE \
|
||||
(3 * CONFIGURE_MINIMUM_TASK_STACK_SIZE)
|
||||
|
||||
@@ -14,9 +14,11 @@
|
||||
#include <tmacros.h>
|
||||
#include "test_support.h"
|
||||
|
||||
const char rtems_test_name[] = "SMP 6";
|
||||
|
||||
static void success(void)
|
||||
{
|
||||
locked_printf( "*** END OF TEST SMP05 ***\n" );
|
||||
TEST_END();
|
||||
rtems_test_exit( 0 );
|
||||
}
|
||||
|
||||
@@ -38,8 +40,9 @@ rtems_task Init(
|
||||
rtems_id id;
|
||||
rtems_status_code status;
|
||||
|
||||
TEST_BEGIN();
|
||||
|
||||
locked_print_initialize();
|
||||
locked_printf( "\n\n*** TEST SMP05 ***\n" );
|
||||
|
||||
if ( rtems_smp_get_processor_count() == 1 ) {
|
||||
success();
|
||||
@@ -79,6 +82,8 @@ rtems_task Init(
|
||||
|
||||
#define CONFIGURE_MAXIMUM_TASKS \
|
||||
(1 + CONFIGURE_SMP_MAXIMUM_PROCESSORS)
|
||||
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
|
||||
|
||||
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||
|
||||
#define CONFIGURE_MAXIMUM_SEMAPHORES 1
|
||||
|
||||
@@ -14,13 +14,15 @@
|
||||
#include <tmacros.h>
|
||||
#include "test_support.h"
|
||||
|
||||
const char rtems_test_name[] = "SMP 7";
|
||||
|
||||
volatile bool TaskRan = false;
|
||||
volatile bool TSRFired = false;
|
||||
rtems_id Semaphore;
|
||||
|
||||
static void success(void)
|
||||
{
|
||||
locked_printf( "*** END OF TEST SMP07 ***\n" );
|
||||
TEST_END();
|
||||
rtems_test_exit( 0 );
|
||||
}
|
||||
|
||||
@@ -87,8 +89,9 @@ rtems_task Init(
|
||||
rtems_interval then;
|
||||
rtems_id Timer;
|
||||
|
||||
TEST_BEGIN();
|
||||
|
||||
locked_print_initialize();
|
||||
locked_printf( "\n\n*** TEST SMP07 ***\n" );
|
||||
|
||||
if ( rtems_smp_get_processor_count() == 1 ) {
|
||||
success();
|
||||
@@ -171,6 +174,8 @@ rtems_task Init(
|
||||
#define CONFIGURE_MAXIMUM_TIMERS 1
|
||||
|
||||
#define CONFIGURE_MAXIMUM_TASKS 2
|
||||
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
|
||||
|
||||
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||
#define CONFIGURE_MAXIMUM_SEMAPHORES 2
|
||||
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
#define CONFIGURE_INIT
|
||||
#include "system.h"
|
||||
|
||||
const char rtems_test_name[] = "SMP 8";
|
||||
|
||||
void PrintTaskInfo(
|
||||
const char *task_name,
|
||||
rtems_time_of_day *_tb
|
||||
@@ -44,9 +46,10 @@ rtems_task Init(
|
||||
int i;
|
||||
char ch[4];
|
||||
rtems_id id;
|
||||
|
||||
TEST_BEGIN();
|
||||
|
||||
locked_print_initialize();
|
||||
locked_printf( "\n\n*** SMP08 TEST ***\n" );
|
||||
|
||||
time.year = 1988;
|
||||
time.month = 12;
|
||||
|
||||
@@ -33,6 +33,8 @@ rtems_task Test_task(
|
||||
#define CONFIGURE_MAXIMUM_TASKS \
|
||||
(1 + (CONFIGURE_SMP_MAXIMUM_PROCESSORS*3) )
|
||||
|
||||
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
|
||||
|
||||
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||
#define CONFIGURE_EXTRA_TASK_STACKS (3 * RTEMS_MINIMUM_STACK_SIZE)
|
||||
#define CONFIGURE_MAXIMUM_SEMAPHORES 2
|
||||
|
||||
@@ -38,7 +38,7 @@ rtems_task Test_task(
|
||||
|
||||
status = rtems_clock_get_tod( &time );
|
||||
if ( time.second >= 35 ) {
|
||||
locked_printf( "*** END OF SMP08 TEST ***\n" );
|
||||
TEST_END();
|
||||
rtems_test_exit( 0 );
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
#include "test_support.h"
|
||||
#include <rtems/cpuuse.h>
|
||||
|
||||
const char rtems_test_name[] = "SMP 9";
|
||||
|
||||
volatile int killtime;
|
||||
|
||||
rtems_task Test_task(
|
||||
@@ -36,8 +38,9 @@ rtems_task Init(
|
||||
rtems_id id;
|
||||
rtems_status_code status;
|
||||
|
||||
TEST_BEGIN();
|
||||
|
||||
locked_print_initialize();
|
||||
locked_printf( "\n\n*** TEST SMP09 ***\n" );
|
||||
|
||||
for ( killtime=0; killtime<1000000; killtime++ )
|
||||
;
|
||||
@@ -68,7 +71,7 @@ rtems_task Init(
|
||||
|
||||
rtems_cpu_usage_report();
|
||||
|
||||
locked_printf( "*** END OF TEST SMP09 ***\n" );
|
||||
TEST_END();
|
||||
rtems_test_exit(0);
|
||||
}
|
||||
|
||||
@@ -82,6 +85,8 @@ rtems_task Init(
|
||||
|
||||
#define CONFIGURE_MAXIMUM_TASKS \
|
||||
(1 + CONFIGURE_SMP_MAXIMUM_PROCESSORS)
|
||||
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
|
||||
|
||||
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||
|
||||
#define CONFIGURE_MAXIMUM_SEMAPHORES 1
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
|
||||
#include "tmacros.h"
|
||||
|
||||
const char rtems_test_name[] = "SMPAFFINITY 1";
|
||||
|
||||
#if defined(__RTEMS_HAVE_SYS_CPUSET_H__)
|
||||
|
||||
rtems_id Init_id;
|
||||
@@ -209,7 +211,7 @@ static void Init(rtems_task_argument arg)
|
||||
{
|
||||
int sc;
|
||||
|
||||
puts( "\n\n*** SMP AFFINITY 1 ***" );
|
||||
TEST_BEGIN();
|
||||
|
||||
/* Initialize thread id */
|
||||
sc = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &Init_id );
|
||||
@@ -219,16 +221,16 @@ static void Init(rtems_task_argument arg)
|
||||
Validate_getaffinity_errors();
|
||||
Validate_affinity();
|
||||
|
||||
puts( "*** END OF SMP AFFINITY TEST 1 ***" );
|
||||
TEST_END();
|
||||
rtems_test_exit(0);
|
||||
}
|
||||
|
||||
#else
|
||||
static void Init(rtems_task_argument arg)
|
||||
{
|
||||
puts( "\n\n*** SMP AFFINITY TEST 1 ***" );
|
||||
TEST_BEGIN();
|
||||
puts( " Affinity NOT Supported");
|
||||
puts( "*** END OF SMP AFFINITY TEST 1 ***" );
|
||||
TEST_END();
|
||||
rtems_test_exit(0);
|
||||
}
|
||||
|
||||
@@ -242,6 +244,8 @@ static void Init(rtems_task_argument arg)
|
||||
|
||||
#define CONFIGURE_MAXIMUM_TASKS (NUM_CPUS*2)
|
||||
|
||||
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
|
||||
|
||||
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||
|
||||
#define CONFIGURE_INIT
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
|
||||
#include "tmacros.h"
|
||||
|
||||
const char rtems_test_name[] = "SMPATOMIC 1";
|
||||
|
||||
#define MASTER_PRIORITY 1
|
||||
|
||||
#define WORKER_PRIORITY 2
|
||||
@@ -621,14 +623,13 @@ static void simple_tests(void)
|
||||
|
||||
static void Init(rtems_task_argument arg)
|
||||
{
|
||||
puts("\n\n*** TEST SMPATOMIC 1 ***");
|
||||
TEST_BEGIN();
|
||||
|
||||
simple_tests();
|
||||
|
||||
test();
|
||||
|
||||
puts("*** END OF TEST SMPATOMIC 1 ***");
|
||||
|
||||
TEST_END();
|
||||
rtems_test_exit(0);
|
||||
}
|
||||
|
||||
@@ -647,6 +648,8 @@ static void Init(rtems_task_argument arg)
|
||||
#define CONFIGURE_INIT_TASK_INITIAL_MODES RTEMS_DEFAULT_MODES
|
||||
#define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_DEFAULT_ATTRIBUTES
|
||||
|
||||
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
|
||||
|
||||
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||
|
||||
#define CONFIGURE_INIT
|
||||
|
||||
@@ -17,12 +17,15 @@
|
||||
#endif
|
||||
|
||||
#include <rtems.h>
|
||||
#include <rtems/test.h>
|
||||
#include <rtems/score/percpu.h>
|
||||
#include <rtems/score/smpimpl.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
const char rtems_test_name[] = "SMPFATAL 1";
|
||||
|
||||
#define MAX_CPUS 32
|
||||
|
||||
static uint32_t main_cpu;
|
||||
@@ -32,11 +35,6 @@ static void Init(rtems_task_argument arg)
|
||||
assert(0);
|
||||
}
|
||||
|
||||
static void end_of_test(void)
|
||||
{
|
||||
printk( "*** END OF TEST SMPFATAL 1 ***\n" );
|
||||
}
|
||||
|
||||
static void fatal_extension(
|
||||
rtems_fatal_source source,
|
||||
bool is_internal,
|
||||
@@ -59,7 +57,7 @@ static void fatal_extension(
|
||||
assert(state == PER_CPU_STATE_SHUTDOWN);
|
||||
}
|
||||
|
||||
end_of_test();
|
||||
rtems_test_endk();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -74,7 +72,7 @@ static rtems_status_code test_driver_init(
|
||||
uint32_t cpu_count = rtems_smp_get_processor_count();
|
||||
uint32_t cpu;
|
||||
|
||||
printk("\n\n*** TEST SMPFATAL 1 ***\n");
|
||||
rtems_test_begink();
|
||||
|
||||
assert(rtems_configuration_get_maximum_processors() == MAX_CPUS);
|
||||
|
||||
@@ -102,7 +100,7 @@ static rtems_status_code test_driver_init(
|
||||
|
||||
per_cpu->state = PER_CPU_STATE_SHUTDOWN;
|
||||
} else {
|
||||
end_of_test();
|
||||
rtems_test_endk();
|
||||
exit(0);
|
||||
}
|
||||
|
||||
@@ -115,7 +113,9 @@ static rtems_status_code test_driver_init(
|
||||
#define CONFIGURE_APPLICATION_EXTRA_DRIVERS \
|
||||
{ .initialization_entry = test_driver_init }
|
||||
|
||||
#define CONFIGURE_INITIAL_EXTENSIONS { .fatal = fatal_extension }
|
||||
#define CONFIGURE_INITIAL_EXTENSIONS \
|
||||
{ .fatal = fatal_extension }, \
|
||||
RTEMS_TEST_INITIAL_EXTENSION
|
||||
|
||||
#define CONFIGURE_SMP_APPLICATION
|
||||
|
||||
|
||||
@@ -17,12 +17,15 @@
|
||||
#endif
|
||||
|
||||
#include <rtems.h>
|
||||
#include <rtems/test.h>
|
||||
#include <rtems/score/percpu.h>
|
||||
#include <rtems/score/smpimpl.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
const char rtems_test_name[] = "SMPFATAL 2";
|
||||
|
||||
#define MAX_CPUS 32
|
||||
|
||||
static uint32_t main_cpu;
|
||||
@@ -32,11 +35,6 @@ static void Init(rtems_task_argument arg)
|
||||
assert(0);
|
||||
}
|
||||
|
||||
static void end_of_test(void)
|
||||
{
|
||||
printk( "*** END OF TEST SMPFATAL 2 ***\n" );
|
||||
}
|
||||
|
||||
static void fatal_extension(
|
||||
rtems_fatal_source source,
|
||||
bool is_internal,
|
||||
@@ -64,7 +62,7 @@ static void fatal_extension(
|
||||
assert(state == PER_CPU_STATE_SHUTDOWN);
|
||||
}
|
||||
|
||||
end_of_test();
|
||||
rtems_test_endk();
|
||||
} else {
|
||||
assert(source == RTEMS_FATAL_SOURCE_SMP);
|
||||
assert(code == SMP_FATAL_SHUTDOWN);
|
||||
@@ -82,7 +80,7 @@ static rtems_status_code test_driver_init(
|
||||
uint32_t cpu_count = rtems_smp_get_processor_count();
|
||||
uint32_t cpu;
|
||||
|
||||
printk("\n\n*** TEST SMPFATAL 2 ***\n");
|
||||
rtems_test_begink();
|
||||
|
||||
assert(rtems_configuration_get_maximum_processors() == MAX_CPUS);
|
||||
|
||||
@@ -107,7 +105,7 @@ static rtems_status_code test_driver_init(
|
||||
if (cpu_count > 1) {
|
||||
rtems_fatal(RTEMS_FATAL_SOURCE_APPLICATION, 0xdeadbeef);
|
||||
} else {
|
||||
end_of_test();
|
||||
rtems_test_endk();
|
||||
exit(0);
|
||||
}
|
||||
|
||||
@@ -120,7 +118,9 @@ static rtems_status_code test_driver_init(
|
||||
#define CONFIGURE_APPLICATION_EXTRA_DRIVERS \
|
||||
{ .initialization_entry = test_driver_init }
|
||||
|
||||
#define CONFIGURE_INITIAL_EXTENSIONS { .fatal = fatal_extension }
|
||||
#define CONFIGURE_INITIAL_EXTENSIONS \
|
||||
{ .fatal = fatal_extension }, \
|
||||
RTEMS_TEST_INITIAL_EXTENSION
|
||||
|
||||
#define CONFIGURE_SMP_APPLICATION
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
#include <rtems.h>
|
||||
#include <rtems/counter.h>
|
||||
#include <rtems/test.h>
|
||||
#include <rtems/score/smpbarrier.h>
|
||||
#include <rtems/score/smpimpl.h>
|
||||
#include <rtems/score/threaddispatch.h>
|
||||
@@ -25,17 +26,14 @@
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
const char rtems_test_name[] = "SMPFATAL 3";
|
||||
|
||||
#define CPU_COUNT 2
|
||||
|
||||
static uint32_t main_cpu;
|
||||
|
||||
static SMP_barrier_Control barrier = SMP_BARRIER_CONTROL_INITIALIZER;
|
||||
|
||||
static void end_of_test(void)
|
||||
{
|
||||
printk( "*** END OF TEST SMPFATAL 3 ***\n" );
|
||||
}
|
||||
|
||||
static void acquire_giant_and_fatal_task(rtems_task_argument arg)
|
||||
{
|
||||
SMP_barrier_State state = SMP_BARRIER_STATE_INITIALIZER;
|
||||
@@ -70,7 +68,7 @@ static void Init(rtems_task_argument arg)
|
||||
uint32_t self = rtems_smp_get_current_processor();
|
||||
uint32_t cpu_count = rtems_smp_get_processor_count();
|
||||
|
||||
printk("\n\n*** TEST SMPFATAL 3 ***\n");
|
||||
rtems_test_begink();
|
||||
|
||||
main_cpu = self;
|
||||
|
||||
@@ -93,7 +91,7 @@ static void Init(rtems_task_argument arg)
|
||||
|
||||
wait_for_giant();
|
||||
} else {
|
||||
end_of_test();
|
||||
rtems_test_endk();
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
@@ -116,7 +114,7 @@ static void fatal_extension(
|
||||
assert(source == RTEMS_FATAL_SOURCE_SMP);
|
||||
assert(code == SMP_FATAL_SHUTDOWN);
|
||||
|
||||
end_of_test();
|
||||
rtems_test_endk();
|
||||
} else {
|
||||
assert(source == RTEMS_FATAL_SOURCE_APPLICATION);
|
||||
assert(code == 0xdeadbeef);
|
||||
@@ -127,7 +125,9 @@ static void fatal_extension(
|
||||
#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
|
||||
|
||||
#define CONFIGURE_INITIAL_EXTENSIONS { .fatal = fatal_extension }
|
||||
#define CONFIGURE_INITIAL_EXTENSIONS \
|
||||
{ .fatal = fatal_extension }, \
|
||||
RTEMS_TEST_INITIAL_EXTENSION
|
||||
|
||||
#define CONFIGURE_SMP_APPLICATION
|
||||
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
#include <rtems.h>
|
||||
#include <rtems/profiling.h>
|
||||
|
||||
const char rtems_test_name[] = "SMPLOAD 1";
|
||||
|
||||
#define CPU_COUNT 32
|
||||
|
||||
#define WORKER_COUNT (3 * CPU_COUNT)
|
||||
@@ -112,12 +114,11 @@ static void test(void)
|
||||
|
||||
static void Init(rtems_task_argument arg)
|
||||
{
|
||||
puts("\n\n*** TEST SMPLOAD 1 ***");
|
||||
TEST_BEGIN();
|
||||
|
||||
test();
|
||||
|
||||
puts("*** END OF TEST SMPLOAD 1 ***");
|
||||
|
||||
TEST_END();
|
||||
rtems_test_exit(0);
|
||||
}
|
||||
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
|
||||
#include "tmacros.h"
|
||||
|
||||
const char rtems_test_name[] = "SMPLOCK 1";
|
||||
|
||||
#define TASK_PRIORITY 1
|
||||
|
||||
#define CPU_COUNT 32
|
||||
@@ -331,12 +333,11 @@ static void test(void)
|
||||
|
||||
static void Init(rtems_task_argument arg)
|
||||
{
|
||||
puts("\n\n*** TEST SMPLOCK 1 ***");
|
||||
TEST_BEGIN();
|
||||
|
||||
test();
|
||||
|
||||
puts("*** END OF TEST SMPLOCK 1 ***");
|
||||
|
||||
TEST_END();
|
||||
rtems_test_exit(0);
|
||||
}
|
||||
|
||||
@@ -357,6 +358,8 @@ static void Init(rtems_task_argument arg)
|
||||
#define CONFIGURE_INIT_TASK_INITIAL_MODES RTEMS_DEFAULT_MODES
|
||||
#define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_DEFAULT_ATTRIBUTES
|
||||
|
||||
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
|
||||
|
||||
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||
|
||||
#define CONFIGURE_INIT
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
#include <math.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
const char rtems_test_name[] = "SMPMIGRATION 1";
|
||||
|
||||
#define CPU_COUNT 2
|
||||
|
||||
#define RUNNER_COUNT (CPU_COUNT + 1)
|
||||
@@ -220,14 +222,13 @@ static void test(void)
|
||||
|
||||
static void Init(rtems_task_argument arg)
|
||||
{
|
||||
puts("\n\n*** TEST SMPMIGRATION 1 ***");
|
||||
TEST_BEGIN();
|
||||
|
||||
if (rtems_smp_get_processor_count() >= 2) {
|
||||
test();
|
||||
}
|
||||
|
||||
puts("*** END OF TEST SMPMIGRATION 1 ***");
|
||||
|
||||
TEST_END();
|
||||
rtems_test_exit(0);
|
||||
}
|
||||
|
||||
@@ -242,6 +243,8 @@ static void Init(rtems_task_argument arg)
|
||||
|
||||
#define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT
|
||||
|
||||
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
|
||||
|
||||
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||
|
||||
#define CONFIGURE_INIT
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
#include <pthread.h>
|
||||
#include <sched.h>
|
||||
|
||||
const char rtems_test_name[] = "SMPPSXAFFINITY 1";
|
||||
|
||||
#if HAVE_DECL_PTHREAD_GETAFFINITY_NP
|
||||
|
||||
#define CPU_COUNT 4
|
||||
@@ -129,7 +131,7 @@ void *POSIX_Init(
|
||||
void *ignored
|
||||
)
|
||||
{
|
||||
puts( "\n\n*** SMP POSIX AFFINITY ATTRIBUTE TEST 1 ***" );
|
||||
TEST_BEGIN();
|
||||
|
||||
/* Initialize thread id */
|
||||
Init_id = pthread_self();
|
||||
@@ -138,7 +140,7 @@ void *POSIX_Init(
|
||||
Validate_attrgetaffinity_errors();
|
||||
Validate_attr();
|
||||
|
||||
puts( "*** END OF SMP POSIX AFFINITY ATTRIBUTE TEST 1 ***" );
|
||||
TEST_END();
|
||||
rtems_test_exit(0);
|
||||
}
|
||||
|
||||
@@ -147,9 +149,9 @@ void *POSIX_Init(
|
||||
void *ignored
|
||||
)
|
||||
{
|
||||
puts( "\n\n*** SMP POSIX AFFINITY ATTRIBUTE TEST 1 ***" );
|
||||
TEST_BEGIN();
|
||||
puts( " POSIX Affinity Methods NOT Supported");
|
||||
puts( "*** END OF SMP POSIX AFFINITY ATTRIBUTE TEST 1 ***" );
|
||||
TEST_END();
|
||||
rtems_test_exit(0);
|
||||
}
|
||||
|
||||
@@ -166,6 +168,8 @@ void *POSIX_Init(
|
||||
|
||||
#define CONFIGURE_MAXIMUM_POSIX_THREADS 1
|
||||
|
||||
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
|
||||
|
||||
#define CONFIGURE_POSIX_INIT_THREAD_TABLE
|
||||
|
||||
#define CONFIGURE_INIT
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
#include <pthread.h>
|
||||
#include <sched.h>
|
||||
|
||||
const char rtems_test_name[] = "SMPPSXAFFINITY 2";
|
||||
|
||||
#if HAVE_DECL_PTHREAD_GETAFFINITY_NP
|
||||
|
||||
pthread_t Init_id;
|
||||
@@ -196,7 +198,7 @@ void *POSIX_Init(
|
||||
void *ignored
|
||||
)
|
||||
{
|
||||
puts( "\n\n*** SMP POSIX AFFINITY ATTRIBUTE TEST 2 ***" );
|
||||
TEST_BEGIN();
|
||||
|
||||
/* Initialize thread id */
|
||||
Init_id = pthread_self();
|
||||
@@ -205,7 +207,7 @@ void *POSIX_Init(
|
||||
Validate_getaffinity_errors();
|
||||
Validate_affinity();
|
||||
|
||||
puts( "*** END OF SMP POSIX AFFINITY ATTRIBUTE TEST 2 ***" );
|
||||
TEST_END();
|
||||
rtems_test_exit(0);
|
||||
}
|
||||
|
||||
@@ -214,9 +216,9 @@ void *POSIX_Init(
|
||||
void *ignored
|
||||
)
|
||||
{
|
||||
puts( "\n\n*** SMP POSIX AFFINITY ATTRIBUTE TEST 2 ***" );
|
||||
TEST_BEGIN();
|
||||
puts( " Affinity NOT Supported");
|
||||
puts( "*** END OF SMP POSIX AFFINITY ATTRIBUTE TEST 2 ***" );
|
||||
TEST_END();
|
||||
rtems_test_exit(0);
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
#include <pthread.h>
|
||||
#include <signal.h>
|
||||
|
||||
const char rtems_test_name[] = "SMPPSXSIGNAL 1";
|
||||
|
||||
#define TEST_SIGNAL SIGUSR1
|
||||
|
||||
typedef enum {
|
||||
@@ -161,14 +163,13 @@ static void test(void)
|
||||
|
||||
static void *POSIX_Init(void *arg)
|
||||
{
|
||||
puts("\n\n*** TEST SMPPSXSIGNAL 1 ***");
|
||||
TEST_BEGIN();
|
||||
|
||||
if (rtems_smp_get_processor_count() >= 2) {
|
||||
test();
|
||||
}
|
||||
|
||||
puts("*** END OF TEST SMPPSXSIGNAL 1 ***");
|
||||
|
||||
TEST_END();
|
||||
rtems_test_exit(0);
|
||||
}
|
||||
|
||||
@@ -179,6 +180,8 @@ static void *POSIX_Init(void *arg)
|
||||
|
||||
#define CONFIGURE_SMP_MAXIMUM_PROCESSORS 2
|
||||
|
||||
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
|
||||
|
||||
#define CONFIGURE_MAXIMUM_POSIX_THREADS 2
|
||||
|
||||
#define CONFIGURE_POSIX_INIT_THREAD_TABLE
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
|
||||
#include "tmacros.h"
|
||||
|
||||
const char rtems_test_name[] = "SMPSCHEDULE 1";
|
||||
|
||||
#define CPU_COUNT 2
|
||||
|
||||
#define TASK_COUNT 4
|
||||
@@ -180,12 +182,11 @@ static void test(void)
|
||||
|
||||
static void Init(rtems_task_argument arg)
|
||||
{
|
||||
puts("\n\n*** TEST SMPSCHEDULE 1 ***");
|
||||
TEST_BEGIN();
|
||||
|
||||
test();
|
||||
|
||||
puts("*** END OF TEST SMPSCHEDULE 1 ***");
|
||||
|
||||
TEST_END();
|
||||
rtems_test_exit(0);
|
||||
}
|
||||
|
||||
@@ -202,6 +203,8 @@ static void Init(rtems_task_argument arg)
|
||||
#define CONFIGURE_INIT_TASK_INITIAL_MODES RTEMS_DEFAULT_MODES
|
||||
#define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_DEFAULT_ATTRIBUTES
|
||||
|
||||
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
|
||||
|
||||
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||
|
||||
#define CONFIGURE_INIT
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
|
||||
#include "tmacros.h"
|
||||
|
||||
const char rtems_test_name[] = "SMPSIGNAL 1";
|
||||
|
||||
#define TEST_SIGNAL RTEMS_SIGNAL_0
|
||||
|
||||
typedef enum {
|
||||
@@ -162,14 +164,13 @@ static void test(void)
|
||||
|
||||
static void Init(rtems_task_argument arg)
|
||||
{
|
||||
puts("\n\n*** TEST SMPSIGNAL 1 ***");
|
||||
TEST_BEGIN();
|
||||
|
||||
if (rtems_smp_get_processor_count() >= 2) {
|
||||
test();
|
||||
}
|
||||
|
||||
puts("*** END OF TEST SMPSIGNAL 1 ***");
|
||||
|
||||
TEST_END();
|
||||
rtems_test_exit(0);
|
||||
}
|
||||
|
||||
@@ -182,6 +183,8 @@ static void Init(rtems_task_argument arg)
|
||||
|
||||
#define CONFIGURE_MAXIMUM_TASKS 2
|
||||
|
||||
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
|
||||
|
||||
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||
|
||||
#define CONFIGURE_INIT_TASK_INITIAL_MODES RTEMS_NO_ASR
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
#include <stdio.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
const char rtems_test_name[] = "SMPSWITCHEXTENSION 1";
|
||||
|
||||
#define CPU_COUNT 2
|
||||
|
||||
#define TOGGLER_COUNT 2
|
||||
@@ -221,14 +223,13 @@ static void test(void)
|
||||
|
||||
static void Init(rtems_task_argument arg)
|
||||
{
|
||||
puts("\n\n*** TEST SMPSWITCHEXTENSION 1 ***");
|
||||
TEST_BEGIN();
|
||||
|
||||
if (rtems_smp_get_processor_count() >= 2) {
|
||||
test();
|
||||
}
|
||||
|
||||
puts("*** END OF TEST SMPSWITCHEXTENSION 1 ***");
|
||||
|
||||
TEST_END();
|
||||
rtems_test_exit(0);
|
||||
}
|
||||
|
||||
@@ -243,6 +244,8 @@ static void Init(rtems_task_argument arg)
|
||||
|
||||
#define CONFIGURE_MAXIMUM_USER_EXTENSIONS EXTENSION_COUNT
|
||||
|
||||
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
|
||||
|
||||
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||
|
||||
#define CONFIGURE_INIT
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
|
||||
#include "tmacros.h"
|
||||
|
||||
const char rtems_test_name[] = "SMPUNSUPPORTED 1";
|
||||
|
||||
static void some_task(rtems_task_argument arg)
|
||||
{
|
||||
(void) arg;
|
||||
@@ -77,12 +79,11 @@ static void test(void)
|
||||
|
||||
static void Init(rtems_task_argument arg)
|
||||
{
|
||||
puts("\n\n*** TEST SMPUNSUPPORTED 1 ***");
|
||||
TEST_BEGIN();
|
||||
|
||||
test();
|
||||
|
||||
puts("*** END OF TEST SMPUNSUPPORTED 1 ***");
|
||||
|
||||
TEST_END();
|
||||
rtems_test_exit(0);
|
||||
}
|
||||
|
||||
@@ -95,6 +96,8 @@ static void Init(rtems_task_argument arg)
|
||||
|
||||
#define CONFIGURE_MAXIMUM_TASKS 2
|
||||
|
||||
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
|
||||
|
||||
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||
|
||||
#define CONFIGURE_INIT
|
||||
|
||||
Reference in New Issue
Block a user