source: rtems/testsuites/sptests/spfatal05/testcase.h @ 5fdb1e7b

4.104.114.9
Last change on this file since 5fdb1e7b was 5fdb1e7b, checked in by Jennifer Averett <Jennifer.Averett@…>, on Jan 28, 2008 at 7:19:35 PM

2008-01-28 Jennifer Averett <jennifer.averett@…>

  • Makefile.am, configure.ac: Added fatal error tests
  • spfatal01/Makefile.am, spfatal01/spfatal01.scn, spfatal01/testcase.h, spfatal02/Makefile.am, spfatal02/spfatal02.scn, spfatal02/testcase.h, spfatal03/Makefile.am, spfatal03/spfatal03.scn, spfatal03/testcase.h, spfatal04/Makefile.am, spfatal04/spfatal04.scn, spfatal04/testcase.h, spfatal05/Makefile.am, spfatal05/spfatal05.scn, spfatal05/testcase.h, spfatal06/Makefile.am, spfatal06/spfatal06.scn, spfatal06/testcase.h, spfatal07/Makefile.am, spfatal07/spfatal07.scn, spfatal07/testcase.h, spfatal08/Makefile.am, spfatal08/spfatal08.scn, spfatal08/testcase.h, spfatal09/Makefile.am, spfatal09/spfatal09.scn, spfatal09/testcase.h, spfatal10/Makefile.am, spfatal10/spfatal10.scn, spfatal10/testcase.h, spfatal_support/init.c, spfatal_support/system.h: New files.
  • Property mode set to 100644
File size: 1.5 KB
Line 
1/*
2 * Classic API Init task create failure
3 *
4 *  $Id$
5 */
6
7/*
8 *  Way too much stack space.  Should generate a fatal error
9 *  on the init task create.
10 */
11#define CONFIGURE_HAS_OWN_INIT_TASK_TABLE
12#define CONFIGURE_INIT_TASK_STACK_SIZE   RTEMS_MINIMUM_STACK_SIZE
13rtems_initialization_tasks_table Initialization_tasks[] = {
14  { rtems_build_name('I', 'N', 'I', ' '),
15    RTEMS_MINIMUM_STACK_SIZE,
16    1,
17    RTEMS_DEFAULT_ATTRIBUTES,
18    Init,
19    RTEMS_DEFAULT_MODES,
20    0
21  }
22};
23#define CONFIGURE_INIT_TASK_TABLE Initialization_tasks
24#define CONFIGURE_INIT_TASK_TABLE_SIZE \
25  sizeof(CONFIGURE_INIT_TASK_TABLE) / sizeof(rtems_initialization_tasks_table)
26
27#define SPFATAL_TEST_CASE_EXTRA_TASKS 1
28
29#define FATAL_ERROR_DESCRIPTION          "Core fall out of a task"
30#define FATAL_ERROR_EXPECTED_SOURCE      INTERNAL_ERROR_CORE
31#define FATAL_ERROR_EXPECTED_IS_INTERNAL TRUE
32#define FATAL_ERROR_EXPECTED_ERROR       INTERNAL_ERROR_THREAD_EXITTED
33
34rtems_task EmptyTask(
35  rtems_task_argument unused
36)
37{
38}
39
40void force_error()
41{
42  rtems_id          id;
43  rtems_status_code status;
44
45  status = rtems_task_create(
46    rtems_build_name('T','A','0','1' ),
47    4,
48    RTEMS_MINIMUM_STACK_SIZE,
49    RTEMS_DEFAULT_MODES,
50    RTEMS_DEFAULT_ATTRIBUTES,
51    &id
52  );
53  directive_failed( status, "rtems_task_create" ); 
54
55  status = rtems_task_start( id, EmptyTask, 0 );
56  directive_failed( status, "rtems_task_start" );
57
58  status = rtems_task_wake_after( 10 );
59  directive_failed( status, "rtems_task_wake_after" );
60 
61  /* we will not run this far */
62}
Note: See TracBrowser for help on using the repository browser.