[rtems commit] psxtests/psxkey08: Limit workspace size
Sebastian Huber
sebh at rtems.org
Wed Mar 12 06:48:16 UTC 2014
Module: rtems
Branch: master
Commit: 0a64eba9b991925448e81b429348bd8b6478acf2
Changeset: http://git.rtems.org/rtems/commit/?id=0a64eba9b991925448e81b429348bd8b6478acf2
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Tue Mar 11 13:58:49 2014 +0100
psxtests/psxkey08: Limit workspace size
This avoids large test execution times on targets with a big RAM.
---
testsuites/psxtests/psxkey08/init.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/testsuites/psxtests/psxkey08/init.c b/testsuites/psxtests/psxkey08/init.c
index fe2e47b..5dee218 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",
More information about the vc
mailing list