Commit Graph

3323 Commits

Author SHA1 Message Date
Sebastian Huber
a75242eb65 tmtests/tmcontext01: Use <rtems/test.h> 2014-03-25 16:46:37 +01:00
Sebastian Huber
9b44339c14 score: Delete _Watchdog_Report()
Delete _Watchdog_Report_chain().  These two functions use printk() with
thread dispatching and interrupts disabled.  So they are pretty useless
in real applications.  They are not part of the application APIs.  They
are only used in one test and do nothing useful in this test.
2014-03-25 13:19:22 +01:00
Sebastian Huber
65612ccb85 sptests/spprintk: Use <rtems/test.h> 2014-03-25 09:47:19 +01:00
bjorn larsson
fd46711c54 psxtmtests: Add test.h support 2014-03-25 08:06:37 +01:00
bjorn larsson
2ead50ac4e tmtests: convert to test.h 2014-03-25 08:06:37 +01:00
Sebastian Huber
6c0301daad tests/sptests: Use <rtems/test.h> 2014-03-25 08:06:21 +01:00
Sebastian Huber
698c2e504a tests/psxtests: Use <rtems/test.h> 2014-03-25 08:06:16 +01:00
Sebastian Huber
2272905333 tests: Use rtems_status_text() 2014-03-25 08:06:06 +01:00
Christian Mauderer
5ef9f23fb4 libcsupport: Use POSIX keys for GXX key functions
With this patch C++ applications now eventually need additional POSIX-keys and
POSIX-key-value-pairs configured.
2014-03-24 08:31:49 +01:00
Christian Mauderer
9d9df8b44e libcsupport: Remove unused gxx-wrapper function.
The rtems_gxx_key_dtor function is not longer used by gcc.
2014-03-24 08:31:49 +01:00
Christian Mauderer
01f2337432 posix: Prevent pthread_setspecific from returning EAGAIN.
The man-page for pthread_setspecific does not define the EAGAIN return value.
Further without this patch it was not possible to set keys that have been
already set a new value.

Add test for setting a new value to a already set key.
2014-03-24 08:31:49 +01:00
Sebastian Huber
9486566ca8 smptests/smpload01: Improve test
Add a task producing memory traffic.  Add tasks to obtain a priority
inheritance semaphore in a synchronized way.
2014-03-21 10:52:21 +01:00
Chris Johns
c49985691f Change all references of rtems.com to rtems.org. 2014-03-21 08:10:47 +11:00
Sebastian Huber
f68401e3f5 fstests/fsrename: Fix stack corruption
Use snprintf() instead of sprintf().  Include missing header files.
2014-03-20 13:20:44 +01:00
Christian Mauderer
6cd4a5ca2e cpukit/shell: Replace task variables with posix keys.
Use posix keys for current shell environment instead of task variables. With
this patch the shell needs one posix-key and one posix-key-value-pair
configured.

Update documentation for the shell.

Adapt samples/fileio:
- Add necessary objects.
- Add login function and custom device name for better testing of the shell.
2014-03-20 09:10:26 +01:00
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