source: rtems/testsuites/sptests/spfatal29/testcase.h @ 13097181

5
Last change on this file since 13097181 was 13097181, checked in by Sebastian Huber <sebastian.huber@…>, on 05/11/17 at 09:03:00

confdefs.h: CONFIGURE_DISABLE_SMP_CONFIGURATION

Enable the SMP configuration by default in case SMP is enabled. Add
configuration option CONFIGURE_DISABLE_SMP_CONFIGURATION to disable it
explicitly.

Add CONFIGURE_DISABLE_SMP_CONFIGURATION to all test which would fail
otherwise.

Update #3001.

  • Property mode set to 100644
File size: 1.1 KB
Line 
1/*
2 * Copyright (c) 2016 embedded brains GmbH.  All rights reserved.
3 *
4 *  embedded brains GmbH
5 *  Dornierstr. 4
6 *  82178 Puchheim
7 *  Germany
8 *  <rtems@embedded-brains.de>
9 *
10 * The license and distribution terms for this file may be
11 * found in the file LICENSE in this distribution or at
12 * http://www.rtems.org/license/LICENSE.
13 */
14
15#define FATAL_ERROR_TEST_NAME            "29"
16#define FATAL_ERROR_DESCRIPTION          "yield in interrupt context"
17#define FATAL_ERROR_EXPECTED_SOURCE      INTERNAL_ERROR_CORE
18#define FATAL_ERROR_EXPECTED_ERROR       INTERNAL_ERROR_BAD_THREAD_DISPATCH_DISABLE_LEVEL
19
20#define CONFIGURE_MAXIMUM_TIMERS 1
21
22#define CONFIGURE_DISABLE_SMP_CONFIGURATION
23
24static void timer(rtems_id id, void *arg)
25{
26  rtems_task_wake_after(RTEMS_YIELD_PROCESSOR);
27}
28
29void force_error()
30{
31  rtems_status_code sc;
32  rtems_id id;
33
34  sc = rtems_timer_create(
35    rtems_build_name('T', 'I', 'M', 'E'),
36    &id
37  );
38  rtems_test_assert(sc == RTEMS_SUCCESSFUL);
39
40  sc = rtems_timer_fire_after(id, 1, timer, NULL);
41  rtems_test_assert(sc == RTEMS_SUCCESSFUL);
42
43  sc = rtems_task_delete(RTEMS_SELF);
44  rtems_test_assert(sc == RTEMS_SUCCESSFUL);
45}
Note: See TracBrowser for help on using the repository browser.