psxtests/psxkey08: Limit workspace size

This avoids large test execution times on targets with a big RAM.
This commit is contained in:
Sebastian Huber
2014-03-11 13:58:49 +01:00
parent 610815417d
commit 0a64eba9b9

View File

@@ -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",