summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-03-11 13:58:49 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-03-12 07:54:57 +0100
commit0a64eba9b991925448e81b429348bd8b6478acf2 (patch)
tree79e10d6d78e86f999158083f5896195f995a9beb
parentpsxtests/psxkey08: Do not allocate task IDs (diff)
downloadrtems-0a64eba9b991925448e81b429348bd8b6478acf2.tar.bz2
psxtests/psxkey08: Limit workspace size
This avoids large test execution times on targets with a big RAM.
-rw-r--r--testsuites/psxtests/psxkey08/init.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/testsuites/psxtests/psxkey08/init.c b/testsuites/psxtests/psxkey08/init.c
index fe2e47b343..5dee218377 100644
--- a/testsuites/psxtests/psxkey08/init.c
+++ b/testsuites/psxtests/psxkey08/init.c
@@ -55,9 +55,10 @@ rtems_task test_task(rtems_task_argument arg)
rtems_task Init(rtems_task_argument arg)
{
- rtems_status_code status;
- int sc;
- rtems_id *task_id_p;
+ rtems_status_code status;
+ int sc;
+ uintptr_t max_free_size = 13 * RTEMS_MINIMUM_STACK_SIZE;
+ void *greedy;
all_thread_created = 0;
@@ -88,6 +89,9 @@ rtems_task Init(rtems_task_argument arg)
sc = pthread_key_create( &Key, NULL );
rtems_test_assert( !sc );
+ /* Reduce workspace size if necessary to shorten test time */
+ greedy = rtems_workspace_greedy_allocate( &max_free_size, 1 );
+
for ( ; ; ) {
rtems_id task_id;
@@ -121,6 +125,8 @@ rtems_task Init(rtems_task_argument arg)
rtems_test_assert( sc == RTEMS_SUCCESSFUL );
}
+ rtems_workspace_greedy_free( greedy );
+
printf(
"Init - %d tasks have been created - OK\n"
"Init - %d tasks have been setted key data - OK\n",