source: rtems/testsuites/smptests/smpfatal04/init.c @ acc9d064

5
Last change on this file since acc9d064 was acc9d064, checked in by Sebastian Huber <sebastian.huber@…>, on 10/26/17 at 11:59:10

tests: Remove obsolete TESTS_USE_PRINTK

Update #3170.
Update #3199.

  • Property mode set to 100644
File size: 1.5 KB
Line 
1/*
2 * Copyright (c) 2014 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#ifdef HAVE_CONFIG_H
16  #include "config.h"
17#endif
18
19#define TEST_INIT
20
21#include "tmacros.h"
22
23#include <rtems.h>
24#include <rtems/score/smpimpl.h>
25
26#include <assert.h>
27#include <stdlib.h>
28
29const char rtems_test_name[] = "SMPFATAL 4";
30
31static void Init(rtems_task_argument arg)
32{
33  assert(0);
34}
35
36static void fatal_extension(
37  rtems_fatal_source source,
38  bool always_set_to_false,
39  rtems_fatal_code code
40)
41{
42  TEST_BEGIN();
43
44  if (
45    source == RTEMS_FATAL_SOURCE_SMP
46      && !always_set_to_false
47      && code == SMP_FATAL_BOOT_PROCESSOR_NOT_ASSIGNED_TO_SCHEDULER
48  ) {
49    rtems_status_code sc;
50    rtems_id id;
51
52    sc = rtems_scheduler_ident_by_processor(0, &id);
53    assert(sc == RTEMS_INCORRECT_STATE);
54
55    TEST_END();
56  }
57}
58
59#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
60#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
61
62#define CONFIGURE_INITIAL_EXTENSIONS \
63  { .fatal = fatal_extension }, \
64  RTEMS_TEST_INITIAL_EXTENSION
65
66#define CONFIGURE_SCHEDULER_CONTROLS
67
68#define CONFIGURE_SMP_SCHEDULER_ASSIGNMENTS RTEMS_SCHEDULER_ASSIGN_NO_SCHEDULER
69
70#define CONFIGURE_MAXIMUM_TASKS 1
71
72#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
73
74#define CONFIGURE_INIT
75
76#include <rtems/confdefs.h>
Note: See TracBrowser for help on using the repository browser.