source: rtems/testsuites/sptests/spfatal05/testcase.h @ 55658c6

4.115
Last change on this file since 55658c6 was 55658c6, checked in by Sebastian Huber <sebastian.huber@…>, on Aug 22, 2011 at 10:10:56 AM

2011-08-22 Sebastian Huber <sebastian.huber@…>

  • spfatal13/testcase.h: Fixed test name.
  • spfatal05/testcase.h: Increased wait time for slow hardware.
  • spfatal_support/init.c: Print test name at end of test.
  • spfatal01/spfatal01.scn, spfatal02/spfatal02.scn, spfatal03/spfatal03.scn, spfatal04/spfatal04.scn, spfatal05/spfatal05.scn, spfatal06/spfatal06.scn, spfatal07/spfatal07.scn, spfatal08/spfatal08.scn, spfatal09/spfatal09.scn, spfatal10/spfatal10.scn, spfatal11/spfatal11.scn, spfatal12/spfatal12.scn, spfatal13/spfatal13.scn, spfatal14/spfatal14.scn, spfatal15/spfatal15.scn, spfatal16/spfatal16.scn, spfatal17/spfatal17.scn, spfatal18/spfatal18.scn, spfatal19/spfatal19.scn, spfatal20/spfatal20.scn, spfatal21/spfatal21.scn, spfatal22/spfatal22.scn, spfatal23/spfatal23.scn, spfatal24/spfatal24.scn, spfatal25/spfatal25.scn: Reflect changes from above.
  • Property mode set to 100644
File size: 1.8 KB
Line 
1/*
2 *  Classic API Init task create failure
3 *
4 *  COPYRIGHT (c) 1989-2009.
5 *  On-Line Applications Research Corporation (OAR).
6 *
7 *  The license and distribution terms for this file may be
8 *  found in the file LICENSE in this distribution or at
9 *  http://www.rtems.com/license/LICENSE.
10 *
11 *  $Id$
12 */
13
14/*
15 *  Way too much stack space.  Should generate a fatal error
16 *  on the init task create.
17 */
18#define CONFIGURE_HAS_OWN_INIT_TASK_TABLE
19#define CONFIGURE_INIT_TASK_STACK_SIZE   RTEMS_MINIMUM_STACK_SIZE
20rtems_initialization_tasks_table Initialization_tasks[] = {
21  { rtems_build_name('I', 'N', 'I', ' '),
22    RTEMS_MINIMUM_STACK_SIZE,
23    1,
24    RTEMS_DEFAULT_ATTRIBUTES,
25    Init,
26    RTEMS_DEFAULT_MODES,
27    0
28  }
29};
30#define CONFIGURE_INIT_TASK_TABLE Initialization_tasks
31#define CONFIGURE_INIT_TASK_TABLE_SIZE \
32  sizeof(CONFIGURE_INIT_TASK_TABLE) / sizeof(rtems_initialization_tasks_table)
33
34#define SPFATAL_TEST_CASE_EXTRA_TASKS 1
35
36#define FATAL_ERROR_TEST_NAME            "5"
37#define FATAL_ERROR_DESCRIPTION          "Core fall out of a task"
38#define FATAL_ERROR_EXPECTED_SOURCE      INTERNAL_ERROR_CORE
39#define FATAL_ERROR_EXPECTED_IS_INTERNAL TRUE
40#define FATAL_ERROR_EXPECTED_ERROR       INTERNAL_ERROR_THREAD_EXITTED
41
42rtems_task EmptyTask( rtems_task_argument unused );
43
44rtems_task EmptyTask(
45  rtems_task_argument unused
46)
47{
48}
49
50void force_error()
51{
52  rtems_id          id;
53  rtems_status_code status;
54
55  status = rtems_task_create(
56    rtems_build_name('T','A','0','1' ),
57    4,
58    RTEMS_MINIMUM_STACK_SIZE,
59    RTEMS_DEFAULT_MODES,
60    RTEMS_DEFAULT_ATTRIBUTES,
61    &id
62  );
63  directive_failed( status, "rtems_task_create" );
64
65  status = rtems_task_start( id, EmptyTask, 0 );
66  directive_failed( status, "rtems_task_start" );
67
68  status = rtems_task_wake_after( 100 );
69  directive_failed( status, "rtems_task_wake_after" );
70
71  /* we will not run this far */
72}
Note: See TracBrowser for help on using the repository browser.