Commit Graph

3258 Commits

Author SHA1 Message Date
Sebastian Huber
f8b2eb03f7 tests/libtests: Use <rtems/test.h> 2014-03-20 09:10:26 +01:00
Sebastian Huber
802d3ba712 tests/fstests: Remove duplicate begin/end messages
Fix file system names.  Remove superfluous defines.
2014-03-20 09:10:08 +01:00
Christian Mauderer
4484112216 psxonce01: Add call counter to check if init function has been called. 2014-03-19 08:34:28 +01:00
Christian Mauderer
6592cabade psxtests: move pthread_once tests into an extra test. 2014-03-19 08:34:27 +01:00
Sebastian Huber
51f823c932 posix: Use interal mutex for once implementation
Enable pthread_once() for all configurations.  The pthread_once()
function is one means to initialize POSIX keys.  Another use case is the
C++ support.
2014-03-19 08:34:26 +01:00
Sebastian Huber
65c0166faf smptests/smpload01: Use test extension 2014-03-17 13:21:15 +01:00
Andre Marques
27d240e050 New fstest to check rename POSIX conformance
This patch is a newer version of the test presented on

http://www.rtems.org/pipermail/rtems-devel/2014-February/005318.html

Unchecked error cases:

- EIO (physical error)

- ENOSPC (no space left in the new filepath)

- EROFS (already covered on testsuites/fstests/fsrofs01)

Untested functionality:

- File system lock during rename() operation

- If after rename() the link count of a file becomes 0 it should be
removed and the space ocupied by the file shall be freed and no longer
accessible (the function statvfs() gives "not implemented" on the imfs
file system, so this is postponed for now)
2014-03-17 10:21:56 +01:00
Sebastian Huber
bc75887774 tests/fstests: Use <rtems/test.h> 2014-03-17 09:17:36 +01:00
Sebastian Huber
ad48ebbfc7 tests/smptests: Use <rtems/test.h> 2014-03-17 09:17:36 +01:00
Sebastian Huber
9391f6d663 tests/samples: Use <rtems/test.h> 2014-03-17 09:17:36 +01:00
Sebastian Huber
840ae715a9 sapi: Add <rtems/test.h>
Provide support functions to print the begin/end of test message.
Provide a test fatal extension to print out profiling reports in the
future.
2014-03-17 09:17:36 +01:00
Sebastian Huber
4575ae0a40 smptests/smpload01: New test 2014-03-14 08:46:50 +01:00
Sebastian Huber
53ad908a64 score: Add SMP lock profiling support 2014-03-14 08:46:49 +01:00
Sebastian Huber
29c9eb601e sapi: Add per-CPU profiling application level data 2014-03-14 08:46:49 +01:00
Sebastian Huber
4dad4b8411 sapi: Add profiling application level support 2014-03-14 08:46:49 +01:00
Sebastian Huber
0dd025ccb9 psxtests/psxkey07: Do not allocate task IDs 2014-03-12 07:54:57 +01:00
Sebastian Huber
92d261c288 psxtests/psxkey07: Limit workspace size
This avoids large test execution times on targets with a big RAM.
2014-03-12 07:54:57 +01:00
Sebastian Huber
fca27b7272 psxtests/psxkey07: Account for RTEMS_TOO_MANY 2014-03-12 07:54:57 +01:00
Sebastian Huber
0a64eba9b9 psxtests/psxkey08: Limit workspace size
This avoids large test execution times on targets with a big RAM.
2014-03-12 07:54:57 +01:00
Sebastian Huber
610815417d psxtests/psxkey08: Do not allocate task IDs
We have a unified work area.  So depending on the memory layout the

    task_id_p = malloc( sizeof( rtems_id ) );
    rtems_test_assert( task_id_p );

or the

    sc = rtems_task_create(
      rtems_build_name('T','A',created_task_count, ' '),
      1,
      RTEMS_MINIMUM_STACK_SIZE,
      RTEMS_DEFAULT_MODES,
      RTEMS_DEFAULT_ATTRIBUTES,
      task_id_p
    );
    rtems_test_assert(
      (sc == RTEMS_UNSATISFIED) ||
      (sc == RTEMS_TOO_MANY) ||
      (sc == RTEMS_SUCCESSFUL)
    );

may fail.  If we are unlucky then we hit the first case and the test
fails.
2014-03-12 07:54:56 +01:00
Sebastian Huber
28779c70ff score: Add function to destroy SMP locks 2014-03-11 10:58:09 +01:00
Sebastian Huber
d50acdbb6c score: Add local context to SMP lock API
Add a local context structure to the SMP lock API for acquire and
release pairs.  This context can be used to store the ISR level and
profiling information.  It may be later used to enable more
sophisticated lock algorithms, e.g. MCS locks.

There is only one lock that cannot be used with a local context.  This
is the per-CPU lock since here we would have to transfer the local
context through a context switch which is very complicated.
2014-03-11 10:58:09 +01:00
Sebastian Huber
ae88aa7927 sapi: Use one SMP lock for all chains
This partially reverts commit 1215fd4d94.

In order to support profiling of SMP locks and provide a future
compatible SMP locks API it is necessary to add an SMP lock destroy
function.  Since the commit above adds an SMP lock to each chain control
we would have to add a rtems_chain_destroy() function as well.  This
complicates the chain usage dramatically.  Thus revert the patch above.
A global SMP lock for all chains is used to implement the protected
chain operations.

Advantages:

* The SAPI chain API is now identical on SMP and non-SMP
  configurations.

* The size of the chain control is reduced and is then equal to the
  Score chains.

* The protected chain operations work correctly on SMP.

Disadvantage:

* Applications using many different chains and the protected operations
  may notice lock contention.

The chain control size drop is a huge benefit (SAPI chain controls are
66% larger than the Score chain controls).  The only disadvantage is not
really a problem since these applications can use specific interrupt
locks and unprotected chain operations to avoid this issue.
2014-03-11 10:58:09 +01:00
Sebastian Huber
b1196e3268 printk: Add support for long long 2014-03-11 10:58:05 +01:00
Sebastian Huber
909f61b14a smptests/smppsxaffinity02: Fix end of test message 2014-03-10 13:28:53 +01:00
Joel Sherrill
e6c87f7872 POSIX keys now enabled in all configurations.
Formerly POSIX keys were only enabled when POSIX threads
were enabled. Because they are a truly safe alternative
to per-task variables in an SMP system, they are being
enabled in all configurations.
2014-03-07 13:21:11 -06:00
Jennifer Averett
5c3323492e Remove trailing whitespace in previous patches 2014-03-07 09:15:15 -06:00
Jennifer Averett
2ef0328958 smptests: Add smppsxaffinity02.
This method exercises the ability to dynamically get and set
the affinity of POSIX threads.

NOTE: There is no scheduler support for affinity. This is
simply a data integrity test.
2014-03-07 09:14:33 -06:00
Jennifer Averett
f3e6b18a4a smptests: Add smppsxaffinity01.
This test exercises the ability to obtain and modify
the affinity field of the POSIX thread attributes.
2014-03-07 09:13:35 -06:00
Jennifer Averett
a3e055fe8a smptests: Add smpaffinity01
This test exercises the new Classic API task affinity methods.
2014-03-07 09:13:14 -06:00
Jennifer Averett
c315dbf2f7 psxtests: Added test for pthread_getattr_np(). 2014-03-07 09:13:08 -06:00
Jennifer Averett
13ab94be6c spcpuset01: Add check for sys/cpuset.h.
If <sys/cpuset.h> is not provided by the toolset, the test
cannot be compiled.
2014-03-07 09:07:17 -06:00
Sebastian Huber
e5bcb24bd0 smptests: Delete config.h.in 2014-03-06 11:16:57 +01:00
Sebastian Huber
825cb1f196 score: Delete _Thread_Dispatch_set_disable_level()
This function was only used in some tests and can be replaced with other
functions.
2014-03-06 09:43:59 +01:00
Sebastian Huber
b323e1fb41 tmtests/tm26: Fix deadlock for SMP configurations
Some _Context_Switch() invocations end up in _Thread_Handler().  Create
the right context for this function.
2014-03-06 09:43:59 +01:00
Sebastian Huber
8b50a55001 score: Add _Atomic_Fence() 2014-03-06 09:43:58 +01:00
Sebastian Huber
a418b2f8b0 libnetworking: Typo 2014-03-06 09:43:58 +01:00
Sebastian Huber
ba25cc208c score: Add and use _Giant_Drop()
New test smptests/smpfatal03.
2014-03-06 09:43:58 +01:00
Sebastian Huber
7336be9d78 score: SMP initialization and shutdown changes
Rename _SMP_Request_other_cores_to_perform_first_context_switch() into
_SMP_Request_start_multitasking() since this requests now a multitasking
start on all configured and available processors.  The name corresponds
_Thread_Start_multitasking() and
_SMP_Start_multitasking_on_secondary_processor() actions issued in
response to this request.  Move in source file to right place.

Rename PER_CPU_STATE_READY_TO_BEGIN_MULTITASKING into
PER_CPU_STATE_READY_TO_START_MULTITASKING.

Rename PER_CPU_STATE_BEGIN_MULTITASKING into
PER_CPU_STATE_REQUEST_START_MULTITASKING.

Rename _SMP_Request_other_cores_to_shutdown() into
_SMP_Request_shutdown().

Add a per-CPU state lock to protect all changes.  This was necessary to
offer a controlled shutdown of the system (atomic read/writes alone are
not sufficient for this kind of synchronization).

Add documentation for Per_CPU_State.

Delete debug output.

New tests smptests/smpfatal01 and smptests/smpfatal02.
2014-03-06 09:43:57 +01:00
Sebastian Huber
9abbb6ab97 tmtests/tmcontext01: New test 2014-02-28 09:06:20 +01:00
Sebastian Huber
e1d7bf002e rtems: Add cache size functions
Add rtems_cache_get_data_cache_size() and
rtems_cache_get_instruction_cache_size().
2014-02-28 09:06:16 +01:00
Sebastian Huber
e7549ff4a1 rtems: Use size_t for cache line size
A cache line cannot have a negative size.
2014-02-28 08:59:02 +01:00
Sebastian Huber
31494ab264 sptests/spcache01: Detect write-through cache 2014-02-28 08:59:02 +01:00
Sebastian Huber
3378be955a sptests/spcache01: New test 2014-02-24 16:12:03 +01:00
Sebastian Huber
95d0c98cac score: Fix thread TLS area initialization
Do not use _TLS_Size here since this will lead GCC to assume that this
symbol is not 0 and the later > 0 test will be optimized away.
2014-02-24 12:50:32 +01:00
Sebastian Huber
07dc9709a4 sptests/spcpucounter01: Adjust test
Adjust test to work with clock driver based CPU counters.  They have a
period equal to the clock tick interval.
2014-02-24 12:49:45 +01:00
Sebastian Huber
47d6013417 score: _CPU_SMP_Get_current_processor()
Remove RTEMS_COMPILER_PURE_ATTRIBUTE from _SMP_Get_current_processor()
and all _CPU_SMP_Get_current_processor().  Make inline ASM statements
volatile again.  Test smptests/smpmigration01 showed that GCC optimizes
too much otherwise.
2014-02-21 09:38:54 +01:00
Sebastian Huber
83bf105486 score: Rename _Internal_error_Occurred()
Rename _Internal_error_Occurred() into _Terminate().
2014-02-21 09:38:24 +01:00
Sebastian Huber
9eec2f33e9 score: Add RTEMS_FATAL_SOURCE_SMP
Use rtems_fatal() instead of _CPU_Fatal_halt() to shutdown processors in
SMP configurations since this allows intervention of BSP or application
specific fatal extensions.
2014-02-19 09:59:40 +01:00
Sebastian Huber
33cb8bf64d score: Add RTEMS_FATAL_SOURCE_BSP
Merge RTEMS_FATAL_SOURCE_BSP_GENERIC and RTEMS_FATAL_SOURCE_BSP_SPECIFIC
into new fatal source RTEMS_FATAL_SOURCE_BSP.  This makes it easier to
figure out the code position given a fatal source and code.
2014-02-19 09:59:39 +01:00