smpunsupported01: Add missing error check for rtems_task_mode

Update test documentation to include more cases.

Updates #3000.
This commit is contained in:
Joel Sherrill
2017-12-05 09:56:47 -06:00
parent d2711c37f1
commit e9e0f1d464
2 changed files with 13 additions and 1 deletions

View File

@@ -42,9 +42,17 @@ static void test(void)
);
rtems_test_assert(sc == RTEMS_UNSATISFIED);
mode = RTEMS_INTERRUPT_LEVEL(1);
mode = RTEMS_INTERRUPT_LEVEL(0);
if (mode == 0) {
sc = rtems_task_mode(mode, RTEMS_INTERRUPT_MASK, &mode);
rtems_test_assert(sc == RTEMS_NOT_IMPLEMENTED);
}
mode = RTEMS_INTERRUPT_LEVEL(1);
if (mode != 0) {
sc = rtems_task_mode(mode, RTEMS_INTERRUPT_MASK, &mode);
rtems_test_assert(sc == RTEMS_NOT_IMPLEMENTED);
sc = rtems_task_create(
rtems_build_name('T', 'A', 'S', 'K'),
RTEMS_MINIMUM_PRIORITY,

View File

@@ -16,3 +16,7 @@ concepts:
on SMP configurations.
- Ensure that rtems_task_create() with RTEMS_NO_PREEMPT returns an error
status on SMP configurations.
- Ensure that rtems_task_mode() with RTEMS_INTERRUPT_MASK returns an
error status
- Ensure that rtems_task_create() with RTEMS_INTERRUPT_MASK returns an
error status