From 0a64eba9b991925448e81b429348bd8b6478acf2 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 11 Mar 2014 13:58:49 +0100 Subject: psxtests/psxkey08: Limit workspace size This avoids large test execution times on targets with a big RAM. --- testsuites/psxtests/psxkey08/init.c | 12 +++++++++--- 1 file 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", -- cgit v1.2.3