forked from Imagelibrary/rtems
rtems: Add rtems_status_code_description()
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* Copyright (c) 2012 embedded brains GmbH. All rights reserved.
|
||||
* Copyright (c) 2012-2014 embedded brains GmbH. All rights reserved.
|
||||
*
|
||||
* embedded brains GmbH
|
||||
* Obere Lagerstr. 30
|
||||
* Donierstr. 4
|
||||
* 82178 Puchheim
|
||||
* Germany
|
||||
* <rtems@embedded-brains.de>
|
||||
@@ -52,12 +52,29 @@ static void test_fatal_source_description(void)
|
||||
rtems_test_assert( source - 3 == RTEMS_FATAL_SOURCE_EXCEPTION );
|
||||
}
|
||||
|
||||
static void test_status_code_description(void)
|
||||
{
|
||||
rtems_status_code code = 0;
|
||||
const char *desc = NULL;
|
||||
const char *desc_last;
|
||||
|
||||
do {
|
||||
desc_last = desc;
|
||||
desc = rtems_status_code_description( code );
|
||||
++code;
|
||||
puts( desc );
|
||||
} while ( desc != desc_last );
|
||||
|
||||
rtems_test_assert( code - 3 == RTEMS_PROXY_BLOCKING );
|
||||
}
|
||||
|
||||
static void Init(rtems_task_argument arg)
|
||||
{
|
||||
puts("\n\n*** TEST SPINTERNALERROR 2 ***");
|
||||
|
||||
test_internal_error_description();
|
||||
test_fatal_source_description();
|
||||
test_status_code_description();
|
||||
|
||||
puts("*** END OF TEST SPINTERNALERROR 2 ***");
|
||||
|
||||
|
||||
@@ -39,4 +39,35 @@ RTEMS_FATAL_SOURCE_STACK_CHECKER
|
||||
RTEMS_FATAL_SOURCE_EXCEPTION
|
||||
?
|
||||
?
|
||||
RTEMS_SUCCESSFUL
|
||||
RTEMS_TASK_EXITTED
|
||||
RTEMS_MP_NOT_CONFIGURED
|
||||
RTEMS_INVALID_NAME
|
||||
RTEMS_INVALID_ID
|
||||
RTEMS_TOO_MANY
|
||||
RTEMS_TIMEOUT
|
||||
RTEMS_OBJECT_WAS_DELETED
|
||||
RTEMS_INVALID_SIZE
|
||||
RTEMS_INVALID_ADDRESS
|
||||
RTEMS_INVALID_NUMBER
|
||||
RTEMS_NOT_DEFINED
|
||||
RTEMS_RESOURCE_IN_USE
|
||||
RTEMS_UNSATISFIED
|
||||
RTEMS_INCORRECT_STATE
|
||||
RTEMS_ALREADY_SUSPENDED
|
||||
RTEMS_ILLEGAL_ON_SELF
|
||||
RTEMS_ILLEGAL_ON_REMOTE_OBJECT
|
||||
RTEMS_CALLED_FROM_ISR
|
||||
RTEMS_INVALID_PRIORITY
|
||||
RTEMS_INVALID_CLOCK
|
||||
RTEMS_INVALID_NODE
|
||||
RTEMS_NOT_CONFIGURED
|
||||
RTEMS_NOT_OWNER_OF_RESOURCE
|
||||
RTEMS_NOT_IMPLEMENTED
|
||||
RTEMS_INTERNAL_ERROR
|
||||
RTEMS_NO_MEMORY
|
||||
RTEMS_IO_ERROR
|
||||
RTEMS_PROXY_BLOCKING
|
||||
?
|
||||
?
|
||||
*** END OF TEST SPINTERNALERROR 2 ***
|
||||
|
||||
Reference in New Issue
Block a user