Esempio n. 1
0
void Fatal_extension(
    uint32_t   source,
    bool       is_internal,
    uint32_t   error
)
{
    printk( "Fatal error (%s) hit\n", FATAL_ERROR_DESCRIPTION );

    if ( source != FATAL_ERROR_EXPECTED_SOURCE ) {
        printk( "ERROR==> Fatal Extension source Expected (");
        Put_Source( FATAL_ERROR_EXPECTED_SOURCE );
        printk( ") received (");
        Put_Source( source );
        printk( ")\n" );
    }

    if ( is_internal !=  FATAL_ERROR_EXPECTED_IS_INTERNAL )
    {
        if ( is_internal == TRUE )
            printk( "ERROR==> Fatal Extension is internal set to TRUE expected FALSE\n" );
        else
            printk( "ERROR==> Fatal Extension is internal set to FALSE expected TRUE\n" );
    }

    if ( error !=  FATAL_ERROR_EXPECTED_ERROR ) {
        printk( "ERROR==> Fatal Error Expected (");
        Put_Error( source, FATAL_ERROR_EXPECTED_ERROR );
        printk( ") received (");
        Put_Error( source, error );
        printk( ")\n" );
    }

    /* return and let the CPU halt */
}
Esempio n. 2
0
void Fatal_extension(
  uint32_t   source,
  bool       is_internal,
  uint32_t   error
)
{
  print_test_begin_message();
  printk( "Fatal error (%s) hit\n", FATAL_ERROR_DESCRIPTION );

  if ( source != FATAL_ERROR_EXPECTED_SOURCE ){
    printk( "ERROR==> Fatal Extension source Expected (");
    Put_Source( FATAL_ERROR_EXPECTED_SOURCE );
    printk( ") received (");
    Put_Source( source );
    printk( ")\n" );
  }

  if ( is_internal !=  FATAL_ERROR_EXPECTED_IS_INTERNAL )
  {
    if ( is_internal == TRUE )
      printk(
        "ERROR==> Fatal Extension is internal set to TRUE expected FALSE\n"
      );
    else
      printk(
        "ERROR==> Fatal Extension is internal set to FALSE expected TRUE\n"
      );
  }

  if ( error !=  FATAL_ERROR_EXPECTED_ERROR ) {
    printk( "ERROR==> Fatal Error Expected (");
    Put_Error( source, FATAL_ERROR_EXPECTED_ERROR );
    printk( ") received (");
    Put_Error( source, error );
    printk( ")\n" );
  }

  if (
    source == FATAL_ERROR_EXPECTED_SOURCE
      && is_internal == FATAL_ERROR_EXPECTED_IS_INTERNAL
      && error == FATAL_ERROR_EXPECTED_ERROR
  ) {
    printk( "*** END OF TEST FATAL " FATAL_ERROR_TEST_NAME " ***\n" );
  }

  if ( _System_state_Is_up( _System_state_Get() ) )
    _Thread_Stop_multitasking();
}
Esempio n. 3
0
void Fatal_extension(
  rtems_fatal_source source,
  bool               is_internal,
  rtems_fatal_code   error
)
{
  print_test_begin_message();
  printk( "Fatal error (%s) hit\n", FATAL_ERROR_DESCRIPTION );

  if ( source != FATAL_ERROR_EXPECTED_SOURCE ){
    printk( "ERROR==> Fatal Extension source Expected (");
    Put_Source( FATAL_ERROR_EXPECTED_SOURCE );
    printk( ") received (");
    Put_Source( source );
    printk( ")\n" );
  }

  if ( is_internal !=  FATAL_ERROR_EXPECTED_IS_INTERNAL )
  {
    if ( is_internal == TRUE )
      printk(
        "ERROR==> Fatal Extension is internal set to TRUE expected FALSE\n"
      );
    else
      printk(
        "ERROR==> Fatal Extension is internal set to FALSE expected TRUE\n"
      );
  }

#ifdef FATAL_ERROR_EXPECTED_ERROR
  if ( error !=  FATAL_ERROR_EXPECTED_ERROR ) {
    printk( "ERROR==> Fatal Error Expected (");
    Put_Error( source, FATAL_ERROR_EXPECTED_ERROR );
    printk( ") received (");
    Put_Error( source, error );
    printk( ")\n" );
  }
#endif /* FATAL_ERROR_EXPECTED_ERROR */

  if (
    source == FATAL_ERROR_EXPECTED_SOURCE
      && is_internal == FATAL_ERROR_EXPECTED_IS_INTERNAL
      && is_expected_error( error )
  ) {
    rtems_test_endk();
  }
}