diff options
author | WeiY <wei.a.yang@gmail.com> | 2013-09-28 14:54:37 +0800 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-10-08 16:07:21 +0200 |
commit | 27a034ef13e70493eb8457821b87346ee96ee4f8 (patch) | |
tree | 324fdcb4ee0a3bc29e0642fd176c779a2f87daab /testsuites/smptests/smpatomic01 | |
parent | add simple atomic test cases into smpatomic08 (diff) | |
download | rtems-27a034ef13e70493eb8457821b87346ee96ee4f8.tar.bz2 |
delete smpatomic0-7 test cases
Diffstat (limited to 'testsuites/smptests/smpatomic01')
-rw-r--r-- | testsuites/smptests/smpatomic01/Makefile.am | 20 | ||||
-rw-r--r-- | testsuites/smptests/smpatomic01/init.c | 72 | ||||
-rw-r--r-- | testsuites/smptests/smpatomic01/smpatomic01.doc | 23 | ||||
-rw-r--r-- | testsuites/smptests/smpatomic01/smpatomic01.scn | 28 | ||||
-rw-r--r-- | testsuites/smptests/smpatomic01/system.h | 50 | ||||
-rw-r--r-- | testsuites/smptests/smpatomic01/tasks.c | 73 |
6 files changed, 0 insertions, 266 deletions
diff --git a/testsuites/smptests/smpatomic01/Makefile.am b/testsuites/smptests/smpatomic01/Makefile.am deleted file mode 100644 index 7bd5502a8d..0000000000 --- a/testsuites/smptests/smpatomic01/Makefile.am +++ /dev/null @@ -1,20 +0,0 @@ -rtems_tests_PROGRAMS = smpatomic01 -smpatomic01_SOURCES = init.c tasks.c system.h ../../support/src/locked_print.c - -dist_rtems_tests_DATA = smpatomic01.scn -dist_rtems_tests_DATA += smpatomic01.doc - -include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg -include $(top_srcdir)/../automake/compile.am -include $(top_srcdir)/../automake/leaf.am - -AM_CPPFLAGS += -I$(top_srcdir)/../support/include - -LINK_OBJS = $(smpatomic01_OBJECTS) -LINK_LIBS = $(smpatomic01_LDLIBS) - -smpatomic01$(EXEEXT): $(smpatomic01_OBJECTS) $(smpatomic01_DEPENDENCIES) - @rm -f smpatomic01$(EXEEXT) - $(make-exe) - -include $(top_srcdir)/../automake/local.am diff --git a/testsuites/smptests/smpatomic01/init.c b/testsuites/smptests/smpatomic01/init.c deleted file mode 100644 index f7dfa1170a..0000000000 --- a/testsuites/smptests/smpatomic01/init.c +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) 2012 Deng Hengyi. - * - * This test case is to test atomic load operation. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.com/license/LICENSE. - * - */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#define CONFIGURE_INIT -#include "system.h" - -rtems_task Init( - rtems_task_argument argument -) -{ - int i; - char ch; - rtems_id id; - rtems_status_code status; - bool allDone; - - /* XXX - Delay a bit to allow debug messages from - * startup to print. This may need to go away when - * debug messages go away. - */ - locked_print_initialize(); - - /* Put start of test message */ - locked_printf( "\n\n*** SMPatomic01 TEST ***\n" ); - - /* Initialize the TaskRan array */ - for ( i=0; i<rtems_smp_get_processor_count() ; i++ ) { - TaskRan[i] = false; - } - - /* Create and start tasks for each processor */ - for ( i=1; i< rtems_smp_get_processor_count() ; i++ ) { - ch = '0' + i; - - status = rtems_task_create( - rtems_build_name( 'T', 'A', ch, ' ' ), - 1, - RTEMS_MINIMUM_STACK_SIZE, - RTEMS_DEFAULT_MODES, - RTEMS_DEFAULT_ATTRIBUTES, - &id - ); - directive_failed( status, "task create" ); - - status = rtems_task_start( id, Test_task, i+1 ); - directive_failed( status, "task start" ); - } - - /* Wait on the all tasks to run */ - while (1) { - allDone = true; - for ( i=1; i<rtems_smp_get_processor_count() ; i++ ) { - if (TaskRan[i] == false) - allDone = false; - } - if (allDone) { - locked_printf( "\n\n*** END OF TEST SMPatomic01 ***\n" ); - rtems_test_exit( 0 ); - } - } -} diff --git a/testsuites/smptests/smpatomic01/smpatomic01.doc b/testsuites/smptests/smpatomic01/smpatomic01.doc deleted file mode 100644 index 3d83245515..0000000000 --- a/testsuites/smptests/smpatomic01/smpatomic01.doc +++ /dev/null @@ -1,23 +0,0 @@ -# COPYRIGHT (c) 1989-2012. -# On-Line Applications Research Corporation (OAR). -# -# The license and distribution terms for this file may be -# found in the file LICENSE in this distribution or at -# http://www.rtems.com/license/LICENSE. -# - -This file describes the directives and concepts tested by this test set. - -test set name: smpatomic01 - -directives: - - _Atomic_Load_int - _Atomic_Load_long - _Atomic_Load_ptr - _Atomic_Load_32 - _Atomic_Load_64 - -concepts: - -+ Ensure that the atomic load operations listed above behave as defined. diff --git a/testsuites/smptests/smpatomic01/smpatomic01.scn b/testsuites/smptests/smpatomic01/smpatomic01.scn deleted file mode 100644 index dba0d5c096..0000000000 --- a/testsuites/smptests/smpatomic01/smpatomic01.scn +++ /dev/null @@ -1,28 +0,0 @@ -*** SMPatomic01 TEST *** - -CPU1 _Atomic_Load_int: SUCCESS - -CPU2 _Atomic_Load_int: SUCCESS - -CPU3 _Atomic_Load_int: SUCCESS - -CPU1 _Atomic_Load_long: SUCCESS - -CPU2 _Atomic_Load_long: SUCCESS - -CPU3 _Atomic_Load_long: SUCCESS - -CPU1 _Atomic_Load_ptr: SUCCESS - -CPU3 _Atomic_Load_ptr: SUCCESS - -CPU2 _Atomic_Load_ptr: SUCCESS - -CPU1 _Atomic_Load_32: SUCCESS - -CPU2 _Atomic_Load_32: SUCCESS - -CPU3 _Atomic_Load_32: SUCCESS - - -*** END OF TEST SMPatomic01 *** diff --git a/testsuites/smptests/smpatomic01/system.h b/testsuites/smptests/smpatomic01/system.h deleted file mode 100644 index da314a2aa6..0000000000 --- a/testsuites/smptests/smpatomic01/system.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * COPYRIGHT (c) 1989-2011. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.com/license/LICENSE. - */ - -#include "tmacros.h" -#include "test_support.h" - -/* functions */ - -rtems_task Init( - rtems_task_argument argument -); - -rtems_task Test_task( - rtems_task_argument argument -); - -/* configuration information */ - -#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER -#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER - -#define CONFIGURE_SMP_APPLICATION -#define CONFIGURE_SMP_MAXIMUM_PROCESSORS 4 - -#define CONFIGURE_MAXIMUM_TASKS \ - (1 + CONFIGURE_SMP_MAXIMUM_PROCESSORS) - -#define CONFIGURE_RTEMS_INIT_TASKS_TABLE - -#include <rtems/confdefs.h> - -/* global variables */ - -/* - * Keep the names and IDs in global variables so another task can use them. - */ - -TEST_EXTERN volatile bool TaskRan[ CONFIGURE_SMP_MAXIMUM_PROCESSORS ]; - -/* - * Handy macros and static inline functions - */ - -/* end of include file */ diff --git a/testsuites/smptests/smpatomic01/tasks.c b/testsuites/smptests/smpatomic01/tasks.c deleted file mode 100644 index 4dd2ff68d3..0000000000 --- a/testsuites/smptests/smpatomic01/tasks.c +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 2012 Deng Hengyi. - * - * This test case is to test atomic load operation. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.com/license/LICENSE. - * - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "system.h" - -#include <stdlib.h> -#include <rtems/rtems/atomic.h> - -#define TEST_REPEAT 1000 - -#define ATOMIC_LOAD_NO_BARRIER(NAME, TYPE, R_TYPE, cpuid, mem_bar) \ -{ \ - Atomic_##TYPE t; \ - R_TYPE a; \ - R_TYPE b; \ - unsigned int i; \ - for (i = 0; i < TEST_REPEAT; i++){ \ - b = (R_TYPE)rand(); \ - atomic_init(&t, b); \ - a = _Atomic_Load_##NAME(&t, mem_bar); \ - rtems_test_assert(a == b); \ - } \ - locked_printf("\nCPU%d Atomic_Load_" #NAME ": SUCCESS\n", cpuid); \ -} - -rtems_task Test_task( - rtems_task_argument argument - ) -{ - uint32_t cpu_num; - char name[5]; - char *p; - - /* Get the task name */ - p = rtems_object_get_name( RTEMS_SELF, 5, name ); - rtems_test_assert( p != NULL ); - - /* Get the CPU Number */ - cpu_num = rtems_smp_get_current_processor(); - - /* Print that the task is up and running. */ - /* test relaxed barrier */ - ATOMIC_LOAD_NO_BARRIER(ulong, Ulong, unsigned long, cpu_num, ATOMIC_ORDER_RELAXED); - - ATOMIC_LOAD_NO_BARRIER(ptr, Pointer, uintptr_t, cpu_num, ATOMIC_ORDER_RELAXED); - - /* test acquire barrier */ - ATOMIC_LOAD_NO_BARRIER(ulong, Ulong, unsigned long, cpu_num, ATOMIC_ORDER_ACQUIRE); - - ATOMIC_LOAD_NO_BARRIER(ptr, Pointer, unsigned long, cpu_num, ATOMIC_ORDER_ACQUIRE); - -// ATOMIC_LOAD_NO_BARRIER(64, cpu_num); - - /* Set the flag that the task is up and running */ - TaskRan[cpu_num] = true; - - /* Drop into a loop which will keep this task on - * running on the cpu. - */ - while(1); -} |